-->
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.  [ 1 post ] 
Author Message
 Post subject: Audit Log does not work with identity key generation
PostPosted: Mon May 10, 2004 11:32 am 
Newbie

Joined: Mon May 10, 2004 11:25 am
Posts: 1
Location: Zurich, Switzerland
I have implemented an audit log using Interceptor.onFlushDirty, using the increment key generation strategy.
When I changed the key generation strategy from increment to identity column, onFlushDirty was not called any more and onSave had an id which was null.
The only method which knows the correct id was postFlush(), but postFlush() is called more than once with the same object and postFlush sees the same object multiple times.
The Lifecycle callbacks are also called before the update.

Is it possible to implement an audit log with identity columns and hibernate, or is it better to use database triggers for that?

Hibernate Version:2.1


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

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.