-->
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: SetMaxResults not dancing well with DISTINCT_ROOT_ENTITY
PostPosted: Wed May 28, 2008 1:58 pm 
Beginner
Beginner

Joined: Wed Mar 05, 2008 10:32 am
Posts: 48
I've been pulling out my hair trying to figure out why my query list has been returning a limited number of rows. Turns out that if i either leave out my DISTINCT_ROOT_ENTITY result transformer or leave out SetMaxResults criteria, then i get the correct # of items... since i need both i want to know how to avoid this.

here is the scenario. in a simple query i get about 10 rows. If i add the max results criteria to lets say 5 i get 5 rows returned. If i add the result transformer i get 2 rows returned.

If i remove the max results criteria i get 6 rows returned (no duplicated) Which is correct but i need the max results for pagination.

It seems that the result transformer is being called after the "5" results are retrived and then trimming out the duplicates. Is there a way i can call the result transformer BEFORE the results are trimmed?


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.