-->
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: @DynamicUpdate and @OptimisticLockType.DIRTY
PostPosted: Wed Jan 10, 2018 2:42 pm 
Newbie

Joined: Tue Mar 22, 2016 11:40 am
Posts: 8
Hi,

We are using Hibernate version 4.2.18 in our application and we are trying to configure Optimistic Locking and tried @Version with Timestamp column and we are facing issues with associated tables and it will take more effort for us to fix the associated entities. So, we have researched on alternate solutions and found an alternate solution with @DynamicUpdate and @OptimisticLocking with OptimisticLockType DIRTY or ALL and completed a quick POC to prove that this is working.

I could see that these annotations are available in Hibernate java doc.
@DynamicUpdate
@OptimisticLocking(type = OptimisticLockType.DIRTY)

But it is not documented as one of the ways to achieve (i.e. alternate to @Version) solution in the Hibernate developer guide documentation.
http://docs.jboss.org/hibernate/orm/4.2 ... e/#d5e1239

Can anyone clarify why it is documented as a Optimistic Lock solution? Are there any known issues with using this solution? Are they deprecated in the latest version or going to get removed in any future Hibernate releases?


Last edited by smartsrini83 on Wed Jan 10, 2018 5:18 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: @DynamicUpdate and @OptimisticLockType.DIRTY
PostPosted: Wed Jan 10, 2018 2:44 pm 
Newbie

Joined: Tue Mar 22, 2016 11:40 am
Posts: 8
Java doc links:
https://docs.jboss.org/hibernate/orm/4. ... pdate.html
https://docs.jboss.org/hibernate/orm/4. ... kType.html


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.