-->
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.  [ 5 posts ] 
Author Message
 Post subject: Callback after update or save?
PostPosted: Mon Jan 05, 2004 5:26 pm 
Newbie

Joined: Wed Dec 31, 2003 9:45 pm
Posts: 19
I'd like to implement some logic each time a save is done to a particular persistent object. This seems like a perfect opportunity to use the callbacks, but it looks like the ones for update and save only work before the update or save, not after. Is there another Hibernate oriented option?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 5:32 pm 
Regular
Regular

Joined: Mon Nov 24, 2003 6:36 pm
Posts: 105
I can't answer your question, but I am curious as to why you would need to do this. In the 6 months or so of using HIbernate on many projects, i've never needed to use them. Perhaps if you say what code you're going to put in there, we can suggest another way?

Good luck

James


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 05, 2004 6:35 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Do you need to perform the action immediately after save()? Would preFlush(), postFlush(), or onFlushDirty() do the trick?

Also, the roadmap for 2.2 (http://www.hibernate.org/44.html#A10) seems to imply that you'll get your wish. (full event API)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 4:31 pm 
Beginner
Beginner

Joined: Thu Dec 11, 2003 11:59 am
Posts: 24
greg_barton wrote:
Also, the roadmap for 2.2 (http://www.hibernate.org/44.html#A10) seems to imply that you'll get your wish. (full event API)


How is the development of this coming along?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2004 6:06 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
No date will ever be published on a future version of Hibernate. Only when it's time to.
The 2.1 family has been released not so long ago...

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.