# Hibernate ORM OptimisticLocking Behavior

**URL:** <https://discourse.hibernate.org/t/hibernate-orm-optimisticlocking-behavior/4134>\
**Category:** Hibernate ORM\
**Created:** [May 7, 2020, 10:54pm UTC](https://discourse.hibernate.org/t/hibernate-orm-optimisticlocking-behavior/4134 "2020-05-07T22:54:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shibha\_Malik](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/shibha_malik/32/1063_2.png) [@Shibha\_Malik](https://discourse.hibernate.org/u/Shibha_Malik)\
**Post date:** [May 7, 2020, 10:54pm UTC](https://discourse.hibernate.org/t/hibernate-orm-optimisticlocking-behavior/4134/1 "2020-05-07T22:54:00Z")

</div>

Hi Team,

I have a ParentDO with @OneToMany to a List using mappedBy and ChildDO has @ManyToOne to the ParentDO.

I want @ Version annotation on the ParentDO only.

According to my observation, the EntityManager.merge(parentDO) operation is inconsistent and updates the version in ParentDO intermittently ( Not sure due to this “bidirectional child-owning-side-parent association mapping” or what )

Can anyone please answer on when hibernate will update the version considering we have this DO relationship.

Please please help

Thank you  
shibha
