users@glassfish.java.net

Glassfish + TopLink Lazy Loading

From: <glassfish_at_javadesktop.org>
Date: Thu, 13 Dec 2007 01:46:59 PST

Hello,

I'm using netbeans 6 + glassfish V2 + TopLink (default on nb 6).

I make a EJB Module and a WEB Module that use the Session Bean from EJB Module.

In EJB module there are two entity beans related by many to many relationship.
The Fetch Type by default is lazy.
So, The entity A has collection of entity B and viceversa.

But when I call a collection properities (by getBcollection() ) lazy loading not working, the collection is not null but empty.

This work fine with FetchType.EAGER but I don't want this.

Why Top Link can't lazy loading?
[Message sent by forum member 'peppeme' (peppeme)]

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