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?
|