-->
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.  [ 2 posts ] 
Author Message
 Post subject: Backing Up Hibernate Objects
PostPosted: Fri Jun 06, 2008 2:46 pm 
Newbie

Joined: Sat Mar 29, 2008 4:49 pm
Posts: 19
Is there a recommended method for backing up Hibernate objects to another table? We have a certain class of objects that can be purged from the database but is probably better to back them up to another table or to an external file.

I was wondering if Hibernate has a mechanism to do this.

One approach I was thinking of using (if there was no built-in one) was to do an SQL SELECT INTO (or in the case of Oracle, INSERT SELECT). If one were just given an org.hibernate.Session object, is it possible to do straight SQL queries (JDBC, etc.)? How?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 07, 2008 7:29 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
I'd probably suggest doing it with a trigger right at the database level. It might be more efficient and manageable. Of course, you'd have to talk to one of those database admin people, but it might be worth it.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.