-->
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: how to scroll lazy collection?
PostPosted: Sun Jul 06, 2008 5:38 pm 
Newbie

Joined: Thu Jun 14, 2007 4:19 pm
Posts: 6
Hello

The question is:
Can I (elegantly and in Hibernatish way) scroll lazy collection?

Let's assume that I have a following lazy collection:

Code:
@OneToMany(fetch = FetchType.LAZY)
public List<Customer> getCustomers()
{
   return cuctomers;
}


But some entities have a huge number of customers and therefore there is no possibility to loaded them all (no matter if this is LAZY or EAGER).

Can I use scroll mechanism to go through all elements of lazy collection WITHOUT loading them into customers list?

In other words is there a Hibernate feature similar to this PSEUDO-code:
Code:
ScrollableResults scroll = session.createScroll(myLazyCollection).scroll();


Regards!
Adam


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.