EntityCollection: Only selected columns

Posts   
 
    
Rostizh
User
Posts: 7
Joined: 25-Jan-2007
# Posted on: 19-Jul-2007 11:39:44   

Hi,

Is it possible to get an entitycollection (self servicing) to get only pre-selected columns from the table? Maybe in a manner that the omitted columns are left null in the entities.

I know it's possible with a typed list, but I need it to be read/writeable.

Thanks,

Roland

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 19-Jul-2007 13:26:54   

with 2.0 you need to use projection to fill a collection with a subset of fields. see the documentation for more information.

in 2.5 (beta) there is an exclude feature which allows you to fill a collection with a subset of fields. I just read another post by Otis which sounds like there will be modifications to this feature before final release.

arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 19-Jul-2007 13:27:00   

See v2.5 beta.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 19-Jul-2007 15:13:15   

In v. 2.5 beta, you can pass a List<EntityField> to the fetch method, to be execluded from the fetch.

In v.2.0 you may fetch a dynamicList of the needed fields and project the result it to an entityCollection.