-->
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: Pagination using criteria for fetching parent-child records
PostPosted: Mon Jan 31, 2011 4:38 pm 
Newbie

Joined: Mon Jan 31, 2011 4:30 pm
Posts: 1
Im fetching entity(parent)-along with child records using detached criteria. And each of these have say 4-5 child records. So when I apply Max results on this root entity object that is If i want to fetch 10 entity objects per page along with their child records, if I use getMaxResults as 10. I only get first 2 entity objects since each of them have 5 child records. I do not get 10 entity objects.

Can someone let me know if we have a solution for this. The query does a top 10 select of the rows disregarding the root entity.


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.