db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mickey Mokotov" <mic...@fetchbook.info>
Subject RE: Criteria.addDescendingOrderByColumn and column names
Date Sun, 25 Sep 2005 17:51:21 GMT
It's in rc1

-----Original Message-----
From: Greg Monroe [mailto:Greg.Monroe@DukeCE.com] 
Sent: Thursday, September 22, 2005 4:33 PM
To: Apache Torque Developers List
Subject: RE: Criteria.addDescendingOrderByColumn and column names


What version of Torque are you using?  This sounds like a duplicate of:

TRQS251: allow expressions in ORDER BY clause

http://issues.apache.org/scarab/issues/id/TRQS251

This bug is marked as fixed and should be in the last two RC versions.

> -----Original Message-----
> From: Mickey Mokotov [mailto:mickey@fetchbook.info]
> Sent: Thursday, September 22, 2005 10:41 AM
> To: 'Apache Torque Developers List'
> Subject: Criteria.addDescendingOrderByColumn and column names
> 
> 
> Hi,
>  
> I think something is a bit weird with
> Criteria.addDescendingOrderByColumn(String).
> 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 something...
> 
>  
> --
>  <http://www.fetchbook.info/> www.FetchBook.Info
> Find the lowest price - Compare more then a hundred book 
> stores in a click.
>  
> 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are
confidential communication or may otherwise be privileged or confidential
and are intended solely for the individual or entity to whom they are
addressed.  If you are not the intended recipient you may not rely on the
contents of this email or any attachments, and we ask that you  please not
read, copy or retransmit this communication, but reply to the sender and
destroy the email, its contents, and all copies thereof immediately.  Any
unauthorized dissemination, distribution or copying of this communication is
strictly prohibited.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message