Full Bushy Path

Posts   
 
    
ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 09-Sep-2008 13:21:14   

Adapter, C#, Newest

Is there a really simple way to get all the paths of an object with out setting all the Prefetch paths on the WithPath?

Here's some psudeo code:


var q = (from d in metaData.Customer
         select d).WithAllThePaths();


Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 09-Sep-2008 13:38:01   

Would this mean all the paths and their subpaths? (might end up with the entire database)

ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 09-Sep-2008 13:40:07   

Yes. In certain cases the object is we defined, but may have 10 children tables.

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 09-Sep-2008 14:07:06   

That's not available, and I think it's not recommended, as you can have a method that returns to you that required preftechPath tree and then use it inside the linq routine.

ianvink
User
Posts: 394
Joined: 15-Dec-2006
# Posted on: 09-Sep-2008 14:15:00   

Great! What's the method called that returns them all?

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 09-Sep-2008 15:56:49   

Sorry, I meant you develop such a method, to exactly specify the prefetchPaths needed to be fetched.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39865
Joined: 17-Aug-2003
# Posted on: 10-Sep-2008 10:02:13   

One way to do that is by using an include template and generate it simple_smile You simply have to loop over relations in the entity and emit calls to the UtilizingPropertyName (the field mapped onto a relation). We didn't add these methods as they'll bloath the code and won't be used by a lot of people.

Frans Bouma | Lead developer LLBLGen Pro