ok. Thank you.

-----Message d'origine-----
De : Thomas Dudziak [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 9 février 2005 13:52
À : OJB Users List
Objet : Re: [newbie] ODMG API : updating an object's primary key.


But as far as OJB and the database is concerned, it is a new one,
because they cannot determine to which 'old' one it corresponds. The
problem here is that OJB and the database use object equality (if two
objects are equal as determined by equals()/hashCode()) whereas you
want to use identity (same java object as determined by ==, i.e.
location in memory). So you either got to delete the old object/row
and then insert the new one, or introduce a separate primary key.

Tom

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


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

Reply via email to