Hello,

I have a VO defined as follows:

class ResultSetVO {
        Object id
        String label;
        int maxRows;
        // details ommitted
};

----------------------------------------------------------------------------
---------------

   <class-descriptor
          class="com.teradata.tap.component.system.resultset.ResultSetVO"
          table="TapResultset"
   >
      <field-descriptor
         name="id"
         column="ID"
         jdbc-type="INTEGER"
         primarykey="true"
         autoincrement="true"
      />
      <field-descriptor
         name="label"
         column="Label"
         jdbc-type="VARCHAR"
      />
      <field-descriptor
         name="maxRows"
         column="MaxRows"
         jdbc-type="INTEGER"
      />
----------------------------------------------------------------------------
---------------

When I do an update, it inserts the object (generates a new ID for it) and
saves it.  Example:  I retrieve a ResultSetVO with label 'Test1', an id of
4, and maxRows = 100.  I change maxRows to 200, and call
odmg.currentTransaction.lock( myRs, Transaction.WRITE );

Instead of updating my existing 'Test1' ResultSetVO in the database, OJB
inserts a new ResultSetVO - generates ID (5 in this case), and saves another
with label 'Test1'.  It doesn't delete the old ResultSetVO or anything like
that.

Question: could this be cause by having an INTEGER column in the database,
but using Object to represent the id in the ResultSetVO class??


Thanks in advance,
Alex


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to