Overloads for PrefetchPath.Add

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 31-May-2007 21:03:50   

Frans,

Quick question I got from a co-worker today that I couldn't answer:

Why do fetches take a RelationPredicateBucket as a parameter, while PrefetchPath.Add takes separate parameters for relations and predicateexpressions?

Thanks,

Phil

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39914
Joined: 17-Aug-2003
# Posted on: 01-Jun-2007 11:31:19   

psandler wrote:

Frans,

Quick question I got from a co-worker today that I couldn't answer:

Why do fetches take a RelationPredicateBucket as a parameter, while PrefetchPath.Add takes separate parameters for relations and predicateexpressions? Thanks, Phil

With some methods I used separate predicate and relations parameters, to avoid having to make a relationpredicatebucket as in these situations it would be likely that you would have a filter on the same entities as you're fetching but not with relations.

This is in a time where there wasn't a constructor on the relationpredicatebucket which accepts a predicate, so it would take extra code in these situations. Admitted, it should have been more consistent. simple_smile

Frans Bouma | Lead developer LLBLGen Pro