Empirically if the value is 0 then OJB will assign it a unique id. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: None To: [EMAIL PROTECTED] Subject: primary key initialisation
I am sorry if this has already been answered on this list, but the list archives are offline and I am kinda in a hurry. In the tutorial it says: ----8<---- On storing of newProduct OJB detects that the attribute is not properly set and assigns a unique id. ----8<---- How does OJB determine if a primary key attribute "is not properly set" if it is an primitive type (as in int) and not an object type? Should I initialise the PK attribute to any special value (0, -1, whatever) in the constructor? Greetings Lars Soltau --------------------------------------------------------------------- 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]