Two-level prefetch

Posts   
 
    
sepultura
User
Posts: 1
Joined: 12-Apr-2007
# Posted on: 12-Apr-2007 13:38:45   

I have an entity A, it has a child table B, which has a child table C (a.k.a customer, order, orderdetail). For a specific instance of A, I want to prefetch/extract collections of B and C so I can loop through them without causing a bunch of select's. I can get all B's related to A, however, I can't seem to get all C's that belong to all B's related to A, if I am clear enough simple_smile . I tried using prefetch paths, and they work but not as I want them, they actually retrieve all C's not just the related ones.

Any idea?

arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 12-Apr-2007 13:58:53   

Would you post the LlblGen version numbers and a sample of your code. What you want to do is possible.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 12-Apr-2007 16:09:48   

This should work using PrefetchPath and SubPath. So if it's not working with you, then as arschr said, we will need the LLBLGen Pro runtime library version and a code snippet of what you have tried. To know how to get the RTL version, please refer to this thread: http://www.llblgen.com/TinyForum/Messages.aspx?ThreadID=7722