Can someone tell me what I'm doing wrong with the following LargeSelect
code?
LargeSelect ret = null;
Criteria crit = new Criteria();
Criteria.Criterion a = crit.getNewCriterion(HousingPeer.SUBCATEGORYID,
String.valueOf(subCategoryId), Criteria.EQUAL);
Criteria.Criterion b = crit.getNewCriterion(HousingPeer.EMAIL_CONFIRMED,
"false", Criteria.NOT_EQUAL);
crit.add(a.and(b));
crit.addDescendingOrderByColumn(HousingPeer.DATE_POSTED);
crit.setDbName("tonys_raleigh");
ret = new LargeSelect(crit, 10, 2);
Running the code and attempting to access the first page of results
generates the following SQL which has errors (there are no columns specified
after 'SELECT').
SELECT FROM housing WHERE (housing.SUBCATEGORYID='1003' AND
housing.EMAIL_CONFIRMED<>'false')
ORDER BY housing.DATE_POSTED DESC LIMIT 21
Also, why do I have to set the dbName in the Criteria? I never had to do
this when doing a HousingPeer.doSelect but I found that not specifying the
dbName resulted in Torque attempting to get a connection for database named
"default".
Thanks,
Tony
--
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>