What is inverse in Hibernate ORM

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.


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.