users@glassfish.java.net

Re: Ejb3 Entity graph serialization problem?

From: <glassfish_at_javadesktop.org>
Date: Mon, 08 Sep 2008 15:10:47 PDT

With lazy fetching the referential entities only get populated when actually used. If you do not "use" them before returning the list they will be null. You may have to walk your list and call the Set (the nested collection containing the many side of your relationship) with a .size() or such to indicate a "use". Otherwise do not use lazy fetching.
[Message sent by forum member 'dawebsterup' (dawebsterup)]

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