Christian Eugster wrote:
Hi Armin,
DBResult is useless (an older story). The object is written to the
database (a mysql 5.0 database). But the primary key always the value
'0'. When I change back to version 1.0.rc5 the values are assigned.
I checked the source in OJB 1.0.4, the PK will be assigned on insert of
the object (if the PK field value is 'NULL': 0 for primitiv field (int
long,...), 'Null' for non-primitiv).
See this class (scroll to the end):
http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/accesslayer/JdbcAccessImpl.java?revision=365204&view=markup
Are the PK fields initialized with non-Null values?
When do you request the PK value of your object? Is it definitely after
insert of the object?
regards,
Armin
Regards
Christian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]