-->
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: version counter increased even object has not been changed
PostPosted: Wed Apr 27, 2011 9:03 am 
Newbie

Joined: Wed Apr 27, 2011 8:57 am
Posts: 1
We use Hibernate on backend inside JBoss. We use stateless session beans with a smart client.
Hibernate config contains for all entities select-before-update=true and dynamicUpdate = true.
We use optimistic locking via a version column per entity.

Still when I use saveOrUpdate on an entity read by the server, transfered to the client, resend to the server, the version counter of the entity is increased every time. If I read the entity server side and save in the same server side thread, the version counter will not be increased.

Background info: we detach the entities from the backend, transfer them to the client, i.e. the saveOrUpdate occurs on a different Hibernate session then the reading.

Is there any way to circument the increasing of the version?


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.