How to limit the fields returned to an entity?

Posts   
 
    
sbalaji123
User
Posts: 26
Joined: 13-Oct-2006
# Posted on: 03-May-2007 12:25:41   

LLBLGen 2.0.0.0 Final (July 2006) Using SelfServicing

Issue: I am trying to figure out how to limit the fields returned to an entity. We don't need to use views or typedlists. Specifically I want to be able to search via whatever fields I want in the WHERE clause, but not return EVERY field in the SELECT clause. Viz:

SELECT table1.a, table1.b WHERE table1.c = 1

The issue is that our llblgen queries are returning a huge amount of data (because we have wide columns) to our business layer which is causing performance problems.

Can anyone suggest how to proceed this and provide any sample code?

Thanks Balaji

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 03-May-2007 15:23:02   

This is a feature that's added in the next version 2.x

For now you have the following options: 1- use a Dynamic List with the needed fields only, and that's it. 2- use a Dynamic List with the needed fields only, and then project the results to an entityCollection 3- A design time solution is to use a typedList, typedView or even map another entity to the same table but only select the set of fields you want.