users@glassfish.java.net

Re: Entity Problem (2 one-to-many, 1 many-to-one)

From: <glassfish_at_javadesktop.org>
Date: Tue, 23 Oct 2007 17:07:07 PDT

If setting fetch = FetchType.EAGER solves the problem, can it be that the instance is detached prior to accessing the collection? If you loaded an instance (by any means) and then passed it to another tier or explicitly closed or cleared an entity manager, the lazy collection won't be fetched when you try to access it.

Regards,
-marina
[Message sent by forum member 'mvatkina' (mvatkina)]

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