Rob Broadhead wrote:

I am doing a select with a like as shown below and I have to enter the column name as a string instead of using the static member of the peer. If I use the member then it builds the sql to find tablename.tablename.columnname instead of tablename.columnname is this me using the API incorrectly or is it something I set wrong when generating the peers? I am using torque 3.1 with Postgres if that helps.

String name = "test client%";
Criteria crit = new Criteria;
crit.add(ClientsPeer.TABLE_NAME,"CLIENTNAME",name,Criteria.LIKE); // works


// crit.add(ClientsPeer.TABLE_NAME,ClientsPeer.CLIENTNAME,name,Criteria.LIKE); // does not work

Try:


crit.add(ClientsPeer.CLIENTNAME, name, Criteria.LIKE);

Scott

--
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to