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