-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: How to order agregate functions?
PostPosted: Sat Oct 01, 2005 5:55 pm 
Beginner
Beginner

Joined: Fri Dec 10, 2004 11:46 pm
Posts: 37
What's the best way to order an agregate function?

It doesn't seem that it can be done with Criretria Queries or HSQL?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 7:08 am 
Newbie

Joined: Sat Jul 23, 2005 8:31 am
Posts: 18
a code example would be helpful.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 6:44 pm 
Beginner
Beginner

Joined: Fri Dec 10, 2004 11:46 pm
Posts: 37
The only other way I see is to right custom sql?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 8:57 pm 
Regular
Regular

Joined: Tue Mar 01, 2005 2:35 pm
Posts: 60
session.createCriteria(MyClass.class)
.setPojection(Projections.alias(Projections.rowCount(), "count"))
.addOrder(Order.asc("count"))...

That doesn't make much sense, but you get the idea.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.