-->
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: Limit the results of a lazy loaded entity
PostPosted: Tue Aug 24, 2010 8:38 am 
Newbie

Joined: Tue Aug 24, 2010 8:02 am
Posts: 3
I'm new to hibernate, I built my entity mappings through hibernate and seam but the issue is some of my relationships are one to more than 10,000 rows. I want to be able to only get 50 at a time from these tables. Even when I do a join fetch and set max result list its still loading all of the rows into memory. Is there anyway to do this without having to write a separate query? Can I only return 50 at a time when accessing the Set from the parent entity?

Any input would help.


Top
 Profile  
 
 Post subject: Re: Limit the results of a lazy loaded entity
PostPosted: Tue Aug 24, 2010 12:16 pm 
Beginner
Beginner

Joined: Thu Dec 11, 2008 8:18 am
Posts: 35
I don't think when you set the max result all the rows will be loaded into memory, if you see the hibernate sql query it's checking with where condition for rownum.
If i am wrong, please correct me.


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.