Hi!
I'm trying to sort results of a ReportQueryByCriteria by calculated field:

Criteria criteria = ...;
ReportQueryByCriteria query = new ReportQueryByCriteria(AClass.class,
criteria);
query.setAttributes(new String[] {"id","count(*)"});
query.addGroupBy("id");


Now i want sort by second field (count)
How can I do that?
query.setAttributes(new String[] {"id","count(*) AS aa"});
query.addOrderBy("aa", false); 
Doesn't work.
Thank in advance.
--
View this message in context: 
http://www.nabble.com/Order-in-ReportQueryByCriteria-t1751968.html#a4763152
Sent from the Apache DB - ObjectRelationalBridge Users forum at Nabble.com.


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

Reply via email to