Hibernate version: 3.2.6
Name and version of the database you are using: Oracle 10g
We will have an export process that lets the user dump a result set that could potentially be millions of records (and hundreds of thousands for sure) to a file that they can then download. We don't want to pull all of that data back in a collection due to the memory impact.
So I was wondering two things:
* Is there any out of the box way to work with the result set but still get the benefit of Hibernate performing all of it's usual mapping of the result set to my domain model? I've done a bunch of digging around and don't see a way so...
* Is there a way to hand either the result set or a map to some Hibernate class to allow it to map that to the domain objects? I've been looking at the ResultTransformer interface, but there's not a whole lot of docs on that, and I don't quite know how I'd get a handle to one if I wanted to. I just want to prevent having to maintain duplicate mappings of SQL to domain object.
Oops, I should explicitly mention that the data being exported is data that is viewed/managed in the application so is already mapped in Hibernate. We just limit the amount of data that they can look at at one time inside of the application.
Thanks,
Scott
|