You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Andre Steinmetzger <An...@cimt-ag.de> on 2008/04/09 16:02:19 UTC

Limit selected columns

Hi,
 
how can I limit the selected columns in the resultlist. 
When I create a criteria an call BasePeer.doSelect(criteria) torque generate a SQL like select * from .... but I need something to create a SQL like select column1, column2, .. from ...
 
Thanks for help.
Andre
 
 

RE: Limit selected columns

Posted by Thomas Fischer <fi...@seitenbau.net>.
"Andre Steinmetzger" <An...@cimt-ag.de> schrieb am 09.04.2008
16:02:19:
> how can I limit the selected columns in the resultlist.
> When I create a criteria an call BasePeer.doSelect(criteria) torque
generate a
> SQL like select * from .... but I need something to create a SQL like
select
> column1, column2, .. from ...

There is a method called addSelectColumn (or something similar) in
Criteria. Note, however, that the Result -> Java Object does not work if
you specify the selected columns; you would have to use the villagwe
ResultSet directly.

    Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org