-->
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: INSERT data into audit tables
PostPosted: Wed Oct 24, 2012 4:00 am 
Newbie

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.

Top
 Profile  
 
 Post subject: Re: INSERT data into audit tables
PostPosted: Mon Oct 29, 2012 3:41 am 
Newbie

Joined: Wed Oct 24, 2012 3:47 am
Posts: 10
Location: Germany
Can't believe that no one has any idea of doing this...

_________________
Regards,

Sebastian


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.