GetRelationInfo() Returns IRelationPredicateBucket?

Posts   
 
    
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 07-Apr-2005 21:40:33   

Just an oddity--it's not really a problem because there are obvious ways to work around it.

I have a method where I declare a generated typed list as ITypedList2, and then call GetRelationInfo on it. I was surprised to discover that this function returns an IRelationPredicateBucket.

I then have to iterate through PRB.Relations and add each them to my mainPRB.Relations.

It seems like it should return a relations collection. I guess I would have to iterate through that and add each relation anyway, since mainPRB.Relations is read only. simple_smile

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 07-Apr-2005 22:59:47   

It returns an IRelationPredicateBucket because you can pass it on directly to the FetchTypedList, as all filtering in adapter is done with that bucket instead of two separate objects.

Frans Bouma | Lead developer LLBLGen Pro
psandler
User
Posts: 540
Joined: 22-Feb-2005
# Posted on: 07-Apr-2005 23:15:45   

Otis wrote:

It returns an IRelationPredicateBucket because you can pass it on directly to the FetchTypedList, as all filtering in adapter is done with that bucket instead of two separate objects.

It just makes it slightly more painful because you have to have separate buckets if you want to add predicates before you get the relations. I guess I can just make sure I create my predicates after I get my relations.

No complaints in any case, as Typed Lists are making my life SO much easier. simple_smile