Actually the concept of primary key is not always used in a database. Let's imagine a table person with fields firstname and lastname but no id. As OJB needs a primary key I will use the couple (firstname,lastname) as a primary key for the mapping. But if I change the property firstname in the java object, it is still the same object and not a new one.
-----Message d'origine----- De : Thomas Dudziak [mailto:[EMAIL PROTECTED] Envoyé : mercredi 9 février 2005 13:28 À : OJB Users List Objet : Re: [newbie] ODMG API : updating an object's primary key. Why would you want to do that ? The primary key identifies the object uniquely, so if you change the value of the corresponding java field(s), then OJB and the database think that you have created a new instance of the class/new row in the table. 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]