-->
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: Session.merge() and Lifecycle
PostPosted: Sun Dec 25, 2005 10:47 pm 
Newbie

Joined: Sun Dec 25, 2005 10:35 pm
Posts: 1
A simple test indicates that the behavior of Session.merge() is inconsistent when a model object implements the Lifecycle interface. The onLoad(), onSave() methods of Lifecycle are invoked at appropriate times during the Session.merge() method, but the onUpdate() method is never invoked.

On the other hand, the Session.saveOrUpdate() method invokes onLoad(), onSave() and onUpdate() correctly.

I need this function to update the LastUpdateTime column of several tables. Is there an alternative, other than creating triggers for each table?

I'm using Hibernate 3.1/3.0.5 at WebLogic 8.1 SP3.


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.