Hello,

I set the auto-retrieve attribute at repository to false for a 1:1 relationship.
I need the reference for a query but in most cases I do not want to read the referenced object.


After reading a instance I tried to store the same unmodified object again.
I run into a SQL error during the update statement "can not write null into not null field".
After some debugging I realized that the missing field is the FK field of not materialized 1:1 reference object.


If I remove the reference descriptor from the mapping everything works fine, but my queries won't work.
For me it looks like storing an object when auto-retrieve is set to false fails.
I expected that ojb recognize that the auto-retrieve attribute was set to false and then takes
the fk attribute field for the update and not the reference which may be null (because not retrieved).
The fk field is of type Integer. The integer Object is filled with the correct value.


Any idea?

best regards,

Guido

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



Reply via email to