-->
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: Mapped sets and order by
PostPosted: Mon Jun 06, 2005 9:24 pm 
Newbie

Joined: Fri Apr 01, 2005 6:47 pm
Posts: 11
I have a situation where I want to get an ordered list of objects and each object contains a mapped set. I would also like the mapped set to be ordered. If I include both in the order by of my HQL then the proper SQL gets generated and the list of objects gets sorted properly. However, the set collection within each object are not ordered.

I tried adding an order-by clause to my set mapping, however, this seems to override my HQL order by completely. So now the list of objects comes back unordered with the set collection for each object ordered properly.

Is there any way to have both an ordered list of objects, each containing an ordered set collection using either HQL or a setting in the mapping?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 6:07 pm 
Newbie

Joined: Fri Apr 01, 2005 6:47 pm
Posts: 11
Hmm. In Hibernate 3.0, using an order-by in the set mapping completely overrides any order by clause in my HQL. However, in Hibernate 2.1 it concatenates the set mapped order-by to the HQL order by, thus generating the SQL I'm looking for.

Is this a bug with 3.0?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 07, 2005 6:09 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
sounds like a bug, please report to jira


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.