Using FetchProjection

Posts   
 
    
Emmanuel
User
Posts: 167
Joined: 13-Jan-2006
# Posted on: 30-Aug-2006 12:01:32   

I need to use a RetrievalAction SPROC but want to get an enumerable collection rather than a DataTable. Seems that a Projection is the perfect solution but I am confused about how to setup the ResultsetFields object passed to FetchProjection.

I see the example under "Projecting Dynamic List resultset onto custom classes" in the llblgen2 user manual which shows assignments of entity field members to the ResultsetFields array items but what do I do if one of my resultset columns do not map to any Entity (table)?

In my specific case, the column in question is a int value that is calculated in the SPROC for each row.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 30-Aug-2006 15:20:40   

If you don't want it, then don't map anything to it. Just ignore it. But if you want it then you might want to manually add an extra property/field to your entity class in the CustomEntityCode code region.