users@glassfish.java.net

Re: Lazy loading does not work w Glassfish 3.0.1 + EclipseLink

From: <glassfish_at_javadesktop.org>
Date: Wed, 22 Sep 2010 08:14:14 PDT

Hello,

For Janne, In http://forums.oracle.com/forums/thread.jspa?messageID=1706796
it describes a feature of Toplink/EclipseLink that allows accessing untriggered lazy relationships after they are detached as long as the context is still avalable, which is what you are encountering. As long as the Entity is not serialized, and the connections are still available, you should still be able to get the referenced person entity.

This is probably the same thing that is going on with referenced Bs, assuming that weaving is occuring. 1:1 and M:1 lazy relationships require that weaving occur to inject the valueholders used to proxy the relationships. If you turn on Logging in eclipselink to fine or finest, you should see messages when an SQL statement as well as other messages that might show if weaving is occuring.

Best Regards,
Chris
[Message sent by forum member 'chris_delahunt']

http://forums.java.net/jive/thread.jspa?messageID=483338