|hibernate gotchas [message #715979]
||Tue, 16 August 2011 02:43
| Tom Eugelink
Registered: July 2009
I found this in a hibernate gotcha article and was wondering if the same applies to EclipseLink:|
When mapping a relation as One-to-One or Many-to-One on the "One" side of the relation you can't have lazy loading unless you specify the field as not nullable.
Why is that?
Essentially on the many side of the relation hibernate can use collection proxies and lazily load instances when required.
On the "One" side there is no collection interface but instead a reference to one of your model classes.
Hibernate can proxy that one as well but only if it is sure the reference will never be null!
Powered by FUDForum
. Page generated in 0.01418 seconds