db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Campbell, Justin" <jcampb...@profilesys.com>
Subject RE: what's the purpose of Criteria.addSelectColumn?
Date Mon, 31 Mar 2003 15:13:07 GMT
Eric -

	You're correct in thinking that addSelectColumn will only work when
using doSelectVillageRecords as the ordinary variety of doSelect will
attempt to populate your OM objects and all its fields using an offset
method (rather than by field name). Thus, if selecting only one column, when
Torque's auto-generated code attempts to retrieve the second field, the
exception you're receiving will then be thrown.

Hope this helps.

- Justin

-----Original Message-----
From: Eric Emminger [mailto:eric@ericemminger.com]
Sent: Monday, March 31, 2003 10:09 AM
To: Turbine Torque Users List
Subject: what's the purpose of Criteria.addSelectColumn?

If you use addSelectColumn in a doSelect, you get a TorqueException. Is 
addSelectColumn only intended for use in doSelectVillageRecords or am I 
missing something?

For example,

Criteria crit = new Criteria();
List list = SomePeer.doSelect(crit);

will throw TorqueException, saying "Only 1 columns exist!"


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

View raw message