Empty related collections : how to figure out the reason why collection is empty

Posts   
 
    
Walter Almeida avatar
Posts: 150
Joined: 27-Aug-2007
# Posted on: 07-Oct-2010 13:31:49   

In Llglgen, when using adapter templates, and retrieving an entity (let's say a CustomerEntity), related entity collections (let Say CustomerEntity.Orders) will not be loaded. A prefetchpath is required to load the related entity collection.

When no prefetchpath is set, CustomerEntity.Orders will not be set to null but to a collection of Length 0

If I set a prefetchpath: the collection is loaded

Question is: when CustomerEntity.Orders is of length 0: Is there a way to know the reason why length is 0 (reason can be: no prefetch path set , so no data loaded OR prefetch path set but no orders in database for this customer.)

Thanks in advance

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39861
Joined: 17-Aug-2003
# Posted on: 07-Oct-2010 14:30:59   

Debated before: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=2013

Everything I've to say about it, is worded there.

Frans Bouma | Lead developer LLBLGen Pro
Walter Almeida avatar
Posts: 150
Joined: 27-Aug-2007
# Posted on: 07-Oct-2010 14:54:17   

Otis wrote:

Debated before: http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=2013

Everything I've to say about it, is worded there.

Oups that's a long threadwink Ok I'll try to find what I need there