-->
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: Why Criteria doesn't support iterate()?
PostPosted: Tue Nov 10, 2009 7:06 am 
Newbie

Joined: Tue Nov 10, 2009 6:22 am
Posts: 1
Hi, dear,

When I am trying to address a memory and performance issue for large data set reading , I found the Query.iterate() best meets my requirement. But the Hibernate Criteria doesn't support iterate(), and it is the best way for me to generate query, instead of HQL. Do I need to convert Criteria to Query(HQL) to get Iterator? how to convert? or is there any other approach to achieve it?
1. I want to use Hibernate Iterator;
2. I want to use Criteria to generate query.

BTW, the ScrollableResultSets (Criteria provides) consumes too big memory to store those EntityKey, so I like to use Iterator to minimize memory usage.

Thanks for any answer!


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.