-->
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: Exporting large result sets to a file
PostPosted: Sun Mar 30, 2008 8:30 am 
Newbie

Joined: Fri Apr 07, 2006 9:18 pm
Posts: 3
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


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.