hi olli, carl,

you should try to avoid primitives for fk columns. when you disconnect the reference ojb will not be able to correctly set the fk to null when using primitives ! later when loading the parent object it may contain a fk to a non materializable proxy.

the samples are not a good reference here :(

jakob

[EMAIL PROTECTED] wrote:

Hello,


-----Original Message-----
From: Boyes, Carl [mailto:[EMAIL PROTECTED]


I've currently
mapped it as a 1:1, but the when the foreign key reference is null an extra sql statement with a where condition of fkey = ''
is generated.


this question has been asked fairly often
(for example by myself).  See e.g. thread
"Null references and proxies".

The solution is to use java reference types
as foreign key fields (unlike in the OJB examples / junit tests), Integer instead of int.


I can really highly recommend that.

Olli

---------------------------------------------------------------------
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