-->
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.  [ 2 posts ] 
Author Message
 Post subject: about FetchMode.JOIN and order by clauses
PostPosted: Wed Nov 21, 2007 1:47 pm 
Newbie

Joined: Thu Jul 22, 2004 7:24 am
Posts: 10
Hibernate version: 3.2.2

I'm using the Criteria API to dynamically perform joins with multiple associated collections. In the generated SQL I find that for each dynamically associated entity, there's a left outer join (which is expected), and in addition an "order by" clause as well on the respective foreign keys of associated collections. Is there a reason for the additional order by clauses? Because of this, the sort criteria that the client (a list display in web tier) specifies are not effective, and sorting of the result set does not happen as expected.

Sorting works fine if I use FetchMode.SELECT instead of JOIN, but that leads to a performance issue with too many queries being generated.

Can anyone shed some light on this?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 22, 2007 5:57 am 
Newbie

Joined: Fri Aug 11, 2006 4:12 am
Posts: 13
Hi Spartacus,
Looks like this is an issue in hibernate .

http://opensource.atlassian.com/project ... e/HHH-1928



Thx,
Alok.


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