[Hibernate-JIRA] Created: (HHH-6947) Optionally ignore modifications to the non-owning side of relationships
by Michael Rudolf (JIRA)
Optionally ignore modifications to the non-owning side of relationships
-----------------------------------------------------------------------
Key: HHH-6947
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6947
Project: Hibernate Core
Issue Type: New Feature
Components: envers
Affects Versions: 3.6.9
Reporter: Michael Rudolf
The JPA specification requires bidirectional relationships between entities to be implemented using "both an owning side and an inverse (non-owning) side" (§2.9). However, it does not deem this distinction an implementation detail only and, in fact, I have a use case where it is explicitly part of the business model. Unfortunately it then seems that Envers does not support differentiating between the owning side and the inverse of a relationship, since a modification to the relationship will cause a new revision to be generated for both sides instead of just for the owning side. As a consequence, the affected entity at the non-owning side will have a new revision stored in its corresponding version table although no physical but only logical modifications have taken place. In order to ignore these additional revisions, it would then be required to compute the difference to the previous revisions and determine whether physical changes were performed. In general this quickly becomes a complex, error-prone and performance-critical task I would like to avoid. Therefore, in order to be able to expose the distinction between owning side and inverse side of a relationship between entities in the business model, it would be nice to have a new option added to Envers to switch off generating revisions for the non-owning side.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 9 months