-->
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: Return true if you modify state in onFlushDirty/onSave
PostPosted: Fri Nov 05, 2004 8:05 am 
Newbie

Joined: Sun Oct 12, 2003 4:21 pm
Posts: 16
Location: Stockholm, Sweden
Hi, I just want to save you some trouble by informing about the importance of returning correct values in you Interceptor.
I have a combined audit-log and set-default-values interceptor and I could not understand why I got two calls to onFlushDirty when I did saveOrUpdate, (resulting in two audit-log records for each update).
Then I read the javadoc part that said you must return true in onFlushDirty and onSave if you modify state. After I implemented that I only get one call to onFlushDirty. I took me a few hours to figure out, and it was clearly stated in the doc (as always :-)
I saw some other posts asking about multiple calls to onFlushDirty, maybe this info can be of help to you.

/Goran

Hibernate version: 2.1.6


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.