GetRelationInfo?????

Posts   
 
    
NickD
User
Posts: 224
Joined: 31-Jan-2005
# Posted on: 08-Apr-2005 00:20:22   

Using Adapter Mode

I have an Entity set up already with my primary key

StudentEntity s = new StudentEntity("1234567");

..and I want to pull that student's registration collection BUT I want to add some of my own predicate filters. So I want to use the entity's GetRelationInfoRegistration method, but can't quite seem to figure out how to add my own predicate expressions to the existing GetRelationInfoRegistration. I understand that that method only returns a IRelationPredicateBucket, but just can't figure out the place where I add my own filters. I have tried creating my own PredicateFilterBucket but can not add the right thing either to the PredicateExpression collection or the Relations collection. Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 09-Apr-2005 12:24:13   

NickD wrote:

Using Adapter Mode

I have an Entity set up already with my primary key

StudentEntity s = new StudentEntity("1234567");

..and I want to pull that student's registration collection BUT I want to add some of my own predicate filters. So I want to use the entity's GetRelationInfoRegistration method, but can't quite seem to figure out how to add my own predicate expressions to the existing GetRelationInfoRegistration. I understand that that method only returns a IRelationPredicateBucket, but just can't figure out the place where I add my own filters. I have tried creating my own PredicateFilterBucket but can not add the right thing either to the PredicateExpression collection or the Relations collection. Thanks.

IRelationPredicateBucket filter = s.GetRelationInfoRegistration(); filter.PredicateExpression.Add(PredicateFactory.CompareValue(...));

then do: adapter.FetchEntityCollection(s.Registration, filter);

would do I think simple_smile

Frans Bouma | Lead developer LLBLGen Pro