-->
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: Complete hibernate generated SQL in Interceptors/Events?
PostPosted: Tue Jan 09, 2007 6:30 pm 
Newbie

Joined: Tue Jan 09, 2007 6:25 pm
Posts: 3
Hi,

I have a scenario where I need to log complete SQL statements for audit purposes. I need to pack them with some additional information about the user.

I could turn the default hibernate logging on and this produces the SQL statements, but I need to pack additional information.

Is there a way I could get the complete SQL (insert/update/delete) in Interceptors or Events?

Even if I override the 'EntityPersister' I don't get the SQL, only the attributes and its values.

Where/How can I get the complete hibernate generated SQL, other than the log files. i.e. to manipulate programatically.

Any info is appreciated.

Thanks,
Mel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 10, 2007 7:43 am 
Beginner
Beginner

Joined: Sat Dec 16, 2006 9:53 pm
Posts: 31
Location: Brisbane, Australia
I would suggest that you need to readup on log4j (you can write your own log writer classes to log whatever information you like), except that (from experience) I have to discourage reliance upon log files for auditing purposes. if you have a requirement for auditing write it, properly... just don't forget to charge for it.


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.