Lazy Loading with Prefetch Paths

Posts   
 
    
mafuba
User
Posts: 8
Joined: 27-Mar-2006
# Posted on: 03-Oct-2008 04:14:58   

I don't know if i'm missing something, but is it possible to use a prefetch path for retrieving entities that are related to an entity that has already been fetched? This seems like a logical thing to do, but since I cannot find a way to do it I assume there is a reason it is not there.

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 03-Oct-2008 08:03:52   

As far as I know, you can only pass PrefetchPaths to FetchEntity/Collection (or GetMulti) calls. Why are you interested in doing this? Are you using Adapter or SelfServicing? LLBLGen version?

David Elizondo | LLBLGen Support Team
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39863
Joined: 17-Aug-2003
# Posted on: 03-Oct-2008 10:52:05   

You fetch the whole graph again, but this time you add the entity you already have fetched to a Context object. This will add the entities fetched through the prefetch path to the existing entity.

Frans Bouma | Lead developer LLBLGen Pro