db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keeney, Thomas" <Keen...@SEC.GOV>
Subject RE: criteria-problem with or/and
Date Mon, 13 Jan 2003 15:15:45 GMT
Marc,

Try using Criterions, i.e.:

Criteria crit = new Criteria();
Criteria.Criterion fielda = crit.getNewCriterion(TABLE.fielda, new int[]{0,
11}, Criteria.IN);

Criteria.Criterion fieldb = crit.getNewCriterion(TABLE.fieldb, xxx,
Criteria.EQUAL);

crit.add(fielda.and(fieldb));

Regards,

Tom

-----Original Message-----
From: Marc Lustig [mailto:mail@marclustig.com]
Sent: Saturday, January 11, 2003 4:54 AM
To: Torque Users List
Subject: criteria-problem with or/and


Hi,
can somebody give me a hint how to use criteria to build a WHERE-clause that
looks like this:

WHERE (fielda=0 or fielda=11) and fieldb=xxx

I looked into the various or() methods, but still not sure how to use it.

Thanks.
Marc


--
To unsubscribe, e-mail:
<mailto:turbine-torque-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:turbine-torque-user-help@jakarta.apache.org>

Mime
View raw message