Hibernate query will return the List Collection Object.
but list is not persistent object right. For ex: if the list is having 200000 records, then server will have heap size problems . Can we replace this List also with persistent collection object?
How to solve this problem in efficient way.
save them into a file and extract as you need it. that way you can avoid the heap size problem
List isn't an object at all, it's an interface. Implementations of it may well be persistent. You can use Hibernate's lazy-loading to mitigate these size problems. You don't have to do anything in code to take advantage of it, Hibernate manages it for you. See the Hibernate docs, or a good Hibernate book, for details on how to configure lazy-loading
Originally Posted by nanaji
What's the point of pulling objects out of a database and sticking them straight back onto disk again??
Originally Posted by kellaw
use it and then modify then store it back rather than having the whole chunk of data out on your memory heap. take out record by record as you need them