-->
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.  [ 1 post ] 
Author Message
 Post subject: Hibernate hql query : setMaxResult with LEFT JOIN FETCH
PostPosted: Thu Dec 08, 2011 10:25 am 
Newbie

Joined: Fri Aug 22, 2008 9:28 am
Posts: 1
Hi,

I use hibernate-core-3.6.3 && hibernate-jpa-2.0-api-1.0.0.Final
I have found a bug in hibernate with setMaxResult and setFirstResult with LEFT JOIN FETCH hql query. Hibernate is not able to create the query for doing the LIMIT/OFFSET in the query. Thus, Hibernate does the filtering in memory (it generates a warning message for it).
It's the filtering in memory which is bugged.
For getting the right result i use this code :
Code:
List<Object> resultList = (List<Object>) query.getResultList();
return resultList.subList(start, Math.min(start + end, resultList.size()));


There is a bugzilla web site for creating a bug report ?

Cordially,
Sylvain


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

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.