Using a Predicate on Dynamic Typed List

Posts   
 
    
Devildog74
User
Posts: 719
Joined: 04-Feb-2004
# Posted on: 29-Nov-2004 04:07:28   

I have created a dynamic typed list. I have added the following relations and predicate expression:


ResultsetFields fields = CustomResultsetFields.AuthorContentList();
//.... other code here
filter.Relations.Add(UsersEntity.Relations.CmsContentEntityUsingByline);
filter.Relations.Add(CmsContentEntity.Relations.CmsContentNotesEntityUsingContentID);
filter.PredicateExpression.Add(PredicateFactory.CompareValue(UsersFieldIndex.UserID,ComparisonOperator.Equal, userId));

Users.UserId is not in the ResultsetFields. When using a dynamic typed list, must a filter field be included in the select list?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 29-Nov-2004 09:22:41   

No, fields in filters and sorters just have to be in hte entities in the relations in the relation collection simple_smile

Frans Bouma | Lead developer LLBLGen Pro