how to fetch entity collection with filter?

Posts   
 
    
youkebb
User
Posts: 14
Joined: 14-May-2009
# Posted on: 14-May-2009 22:40:32   

Hi i am using adapter connection and i am trying to do adapter.FetchEntityCollection(...) our entity collection class contains a product table. Each product has a category id. Now I want to do something like

select * from product where productID = 10

How do we do this using FetchEntityCollection(...)? I know how to fetch the first n items using FetchEntityCollection(...) but I just don't know how to do it selectively.

I am using v2.6

Any suggestions will be appreciated. James

youkebb
User
Posts: 14
Joined: 14-May-2009
# Posted on: 14-May-2009 23:03:50   

never mind, i figured out the way to do it:

IRelationPredicateBucket filter = new RelationPredicateBucket();

we need to apply a filter and then in my case:

filter.PredicateExpression.Add(ProductFields.CategoryID == "10);

will do the thing. stuck_out_tongue_winking_eye