# What is inverse in Hibernate ORM

**URL:** <https://discourse.hibernate.org/t/what-is-inverse-in-hibernate-orm/476>\
**Category:** Hibernate ORM\
**Created:** [April 2, 2018, 6:05pm UTC](https://discourse.hibernate.org/t/what-is-inverse-in-hibernate-orm/476 "2018-04-02T18:05:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikas\_Yadav](https://avatars.discourse-cdn.com/v4/letter/v/6a8cbe/32.png) [@Vikas\_Yadav](https://discourse.hibernate.org/u/Vikas_Yadav)\
**Post date:** [April 2, 2018, 6:05pm UTC](https://discourse.hibernate.org/t/what-is-inverse-in-hibernate-orm/476/1 "2018-04-02T18:05:42Z")

</div>

Hi ,

Could any one please explain about inverse .  
this attribute is used to be in XML .  
I tried to google but could not find annotation way.  
Some of the places find that mappedBy attribute is same as inverse in xml.

Kindly explain what is the correct one about inverse.

Thanks,  
vikas

---

<div class="post-metadata">

**Author:** ![vlad](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.hibernate.org/vlad/32/658_2.png) [@vlad](https://discourse.hibernate.org/u/vlad)\
**Post date:** [April 2, 2018, 6:36pm UTC](https://discourse.hibernate.org/t/what-is-inverse-in-hibernate-orm/476/2 "2018-04-02T18:36:12Z")

</div>

Inverse in HBM configuration files is what `mappedBy` is in bidirectional JPA associations.

In a bidirectional association, only one side can control the association. If Hibernate did not enforce this rule, it could be that the two sides be out of sync, in winch case Hibernate would not know what’s to be persisted in the DB.

The inverse/mappedBy side tells Hibernate to ignore that side. For more details, check out [this article](https://vladmihalcea.com/the-best-way-to-map-a-onetomany-association-with-jpa-and-hibernate/).
