-->
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.  [ 2 posts ] 
Author Message
 Post subject: Question about @Version value check
PostPosted: Wed Jan 12, 2011 10:26 am 
Newbie

Joined: Fri Jun 06, 2008 7:14 pm
Posts: 2
I have an entity containing an attribute with annotation @Version and every time I update the entity, the version has incremented. It's OK.
If the version of my entity in database is a number X then the version of an entity that I make a merge, must be the same number X.
But, if an entity is persistent (obtained with a find), and we change the @Version attribute manually, the OptimisticLockException doesn't throw, and the entity is updated!
Why hibernate doesn't checks the value of the @Version attribute that I have setted?
Is only because it is persistent?


Top
 Profile  
 
 Post subject: Re: Question about @Version value check
PostPosted: Fri Jan 14, 2011 2:15 pm 
Newbie

Joined: Fri Jun 06, 2008 7:14 pm
Posts: 2
Any idea?


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