-->
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: Lifecycle.onUpdate() not called from Session.saveOrUpdate()
PostPosted: Wed Jul 21, 2004 6:33 pm 
I have the problem that Lifecycle.onUpdate() is not called from Session.saveOrUpdate() when the updated object was loaded in the same Session; I didn't notice this before because most of the time I use detached objects. I looked into SessionImpl.saveOrUpdate() and saw that the existence of an EntityEntry causes this behavior. Calling Session.evict() before Session.saveOrUpdate() solved my problem, but it is my impression that the contract of Lifecycle.onUpdate() is violated by this behavior, .i.e. Lifecycle.onUpdate() should be called as advertised. Any opinion about his?


Top
  
 
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.