-->
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: Hibernate fetch parent & child but with child restrictions
PostPosted: Wed Mar 09, 2016 9:13 am 
Newbie

Joined: Wed Mar 09, 2016 9:00 am
Posts: 2
Hi,

Using hibernate i need to fetch parent along with child(lazy) but need to fetch only first 10 records out of n child objects. Please advice how to achieve this using criteria or hql?


Top
 Profile  
 
 Post subject: Re: Hibernate fetch parent & child but with child restrictions
PostPosted: Wed Mar 09, 2016 9:24 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Select the child entity and join fetch the parent. This way you can limit the result set.


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.