-->
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: automatic versioning
PostPosted: Thu Feb 21, 2008 11:54 am 
Newbie

Joined: Thu Feb 21, 2008 11:38 am
Posts: 1
Ok, this is an extremely trivial question in my opinion, but I searched long and hard and was surprised not to find a clear answer in the documentation or in the forums.

Here it goes:
"When using Detached objects and automatic versioning (cfr Paragraph 11.3.3 in Reference), do you have to explicitly declare a version-tag in your mapping-configuration and therefor also create an extra column in your DB, or does the word automatic mean that Hibernate takes care of this problem itself?"

I am fully aware of the simplicity of the question, but strangely enough I couldn't find a closing answer! Could someone please clarify.

Thank you in advance.


Top
 Profile  
 
 Post subject: automatic versioning for detached objects
PostPosted: Tue Mar 11, 2008 4:36 am 
Newbie

Joined: Fri Feb 29, 2008 3:37 am
Posts: 3
Hi ndetaeye!

Yes you have to declare a version-tag in your mapping configuration, like
Code:
<class>
<id.../>
<version name="version" access="field" column"VERSION"/>
</class>


Take a look in Gavin King's "Java Persistence with Hibernate" chapter 10.2.2 "Optimistic concurrency control" as well.

regards
AWi


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.