-->
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.  [ 3 posts ] 
Author Message
 Post subject: How To Achieve Order By Clause Functionality in Hibernate
PostPosted: Tue Aug 01, 2006 8:41 am 
Newbie

Joined: Tue Aug 01, 2006 8:31 am
Posts: 6
In one of my table i have four records count, age, number of family members.

i want the sort out the records based on count,age,number of family members.

how i can achive this functionality in Hibernate.

Its an urgent requirement for me.

please help me.

Regards

Sreenivasula Reddy A


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 01, 2006 9:40 am 
Beginner
Beginner

Joined: Fri Oct 15, 2004 4:54 pm
Posts: 32
hibernate has order-by clauses


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 01, 2006 11:13 am 
Newbie

Joined: Thu Feb 16, 2006 2:18 pm
Posts: 4
Location: Colorado
The below link gives some information on how to use HQL and the Order By Clause. Look at section 11.9.

http://www.hibernate.org/hib_docs/refer ... ryhql.html

Other than that, you could use a criteria query with a clause like

criteria.addOrder( Order.asc("age"));


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.