Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.0
Mapping documents: none yet
Code between sessionFactory.openSession() and session.close(): none
Full stack trace of any exception that occurs: n/a
Name and version of the database you are using: many
The generated SQL (show_sql=true): none
Debug level Hibernate log excerpt: none
I see many threads about retrieving large collections, but none seem applicable to my needs. I need to be able to iterate through a very large set of objects and operate on them. Performance is not a huge driver in this issue. All my reading about lazy loading seems to reference associations (like the wiki or Hibernate In Action), but the associations are not relevant in this case - I just don't want to load 200,000 objects at once.
I need to either:
(1) lazy-load the objects themselves, but lazy loading doesn't seem to apply here or
(2) do something more complex like generically retrieve just the ids and then iterate through the id object collection and load the objects one at a time, but I don't see how to do that at runtime. I was hoping metadata would help, but I didn't see how.
Any suggestions? This has to be very generic. I can't specify something in the mappings or hard-code any SQL or HQL. Any suggestions?