-->
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: Bags, lazy init, and paging collection...
PostPosted: Mon Feb 02, 2004 12:18 pm 
Beginner
Beginner

Joined: Thu Oct 23, 2003 11:22 am
Posts: 20
I need a response to this fairly quickly... A piece of code that was working just quit.

I converted a collection from a <set> to a <bag> both had lazy true, but now the <bag> also has inverse=true. I previously had a smart "iterator" that would page over the collection using the code outlined in 10.13 Tips and Tricks:

Code:
Query q = s.createFilter( collection, "" ); // the trivial filter
q.setMaxResults(PAGE_SIZE);
q.setFirstResult(PAGE_SIZE * pageNumber);
List page = q.list();


When I changed it from a set to a bag (et al), the list returned from this code is empty... Any ideas as to why?


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.