ExcludeIncludeFieldsList

Posts   
 
    
simon831
User
Posts: 152
Joined: 19-Jan-2006
# Posted on: 05-Jun-2008 14:46:17   

ExcludeIncludeFieldsList excludedFields = new ExcludeIncludeFieldsList(); excludedFields.Add(OrderFields.MyBigColumn); adapter.FetchEntityCollection(collection, bucket, count, null, prefetch, excludedFields);

Is there a way to set an entity, by default, to not return a column - rather than having to pass in an ExcludeIncludeFieldsList to every Fetch?

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 05-Jun-2008 15:15:32   

If there is a column you'd never want to fetch, then you may use the LLBLGen Pro Designer to execlude this field from the entity fields list.

simon831
User
Posts: 152
Joined: 19-Jan-2006
# Posted on: 05-Jun-2008 15:40:08   

Its not that I never want to bring it back, just usually not. Its for situations like a db column that contains a file. I never want this in the entity except on the specific occasion when a user wants to see the file.

Walaa avatar
Walaa
Support Team
Posts: 14951
Joined: 21-Aug-2005
# Posted on: 05-Jun-2008 15:48:38   

IMHO, the better approach is to map 2 entities onto the same database tables. One without the field being mapped and one with the field. eg. Product & ProductWithPicture. simple_smile

Always use the Product entity to be the default, and in the specific cases use the other rntity which contains the blob field.

simon831
User
Posts: 152
Joined: 19-Jan-2006
# Posted on: 05-Jun-2008 16:17:32   

ok, thanks. That answers my question.

Can I ask that a feature request be put in for this situation?