Joined: Wed Oct 24, 2012 3:47 am Posts: 10 Location: Germany
|
Hi all,
we use hibernate 4 as our OR-mapper and have envers running to log audit information for our entities. My task is to manage export and import of the complete database. This should - if at all possible - include the audit information.
Now I have successfully exported all data including the audit information into a zip archive using xstream. I had to dig a little to handle associations but now it works quite smooth. With the reimport of such a zip archive into a database I have so far managed to recreate the database schema using hibernates SchemaExport class and importing entities is also working properly. The big problem is the audit data. Since I do not now how I could insert into an audit table. HQL only allows me to have the insert drain data from existent tables. So how can I import the audit data back? For the REVINFO table I can think of a solution. Having a custom RevisionEntity I could use it to import the revision metadata. But I don't want to create a audit entity subclass for each of my entities to be able to insert into the audit logs.
Any sugesstions?
_________________ Regards,
Sebastian
Last edited by s.goetz on Mon Oct 29, 2012 4:08 am, edited 1 time in total.
|
|