-->
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: Interceptor and update() calls.
PostPosted: Wed Jul 20, 2005 10:30 am 
Beginner
Beginner

Joined: Fri Jun 10, 2005 2:22 pm
Posts: 27
We have a modifiedDate property in all of our model objects, and I was attempting to use an interceptor to set that value on any save or update call. So, in the onFlushDirty() and onSave() methods, I set the modifiedDate property for the entity to "new Date()". This is working great, except that we've found that under some circumstances the onFlushDirty() method gets called during the loading process.

Is this because some of the model objects have initializers for elements like hash sets and so forth?

Is onFlushDirty() the right method to use to watch for update() calls, or would onSave() take care of these, also?

Thanks in advance,
Dave


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.