db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mickey Mokotov" <mic...@fetchbook.info>
Subject Criteria.addDescendingOrderByColumn and column names
Date Thu, 22 Sep 2005 14:40:40 GMT
I think something is a bit weird with
It throws a TorqueException if you call it with a column name without a "."
in the middle, which is usually a good thing to do, but it doesn't allow you
to sort by a column you aliased using "as".
For example - if you have a table UserReview, which holds several entries
per userId and you want to see the top reviewers you'll have a problem:
select UserReview.userId, count(UserReview.userId) as count from UserReview
order by count desc
I'm probably not the first one to have this problem, so I might be missing

 <http://www.fetchbook.info/> www.FetchBook.Info
Find the lowest price - Compare more then a hundred book stores in a click.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message