db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Greene" <agre...@romulin.com>
Subject Torque cannot do OR based selects
Date Thu, 09 Jan 2003 19:34:06 GMT
I am trying to do the following:

Criteria c2 = new Criteria();

c2.add(BuypartsPeer.MAKE,"Honda");

c2.or(BuypartsPeer.PARTYEAR, 1999);

System.err.println(c2);

try {

System.out.println("List Size : " + BuypartsPeer.doSelect(c2).size());

} catch (TorqueException e) {

}

It should print "List Size : 2" as I have one record with MAKE = Honda and
another record where PARTYEAR = 1999, instead it prints 0.  When I check the
Criteria (by printing it), it doesn't do an OR, but instead does an AND.  Am
I doing something wrong or is Torque broken??



Mime
View raw message