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: problem with version value of persistent object
PostPosted: Tue Nov 22, 2005 8:50 am 
Newbie

Joined: Sat Oct 30, 2004 4:00 am
Posts: 11
Hibernate will ignore value of version property of a persistent object, right?

In our system, we update only a part of properties of entity by values received from UI(include version value).
So we can not use POJO as DTO directly in UI.
Each time to update, load the entity from DB(by id) and merge value from DTO to POJO, include version value.
After merging, update to DB.

But when updating, instance is a persistent object, not transient,
So hibernate will not throw StaleObjectStateException if version change!

Any suggestion?
Regard.
(English is my second language!)


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.