Currently the Envers configuration option {{org.hibernate.envers.revision_on_collection_change}} is global and when setting it affects all audited entities. It might be useful for specific scenarios to be able to influence this behavior at a per-site location using an annotation like {{@RevisionOnCollectionChange(boolean)}}?
Given {code} @Entity @Audited public class Soup { ... @OneToMany @RevisionOnCollectionChange(false) private List<Ingredients> ingredients; }
@Entity @Audited public class Ingredients { ... } {code}
See https://stackoverflow.com/questions/59633260/hibernate-envers-prevent-version-on-onpostdelete
This way when the user creates a {{Soup}} with {{Ingredients}} and later deletes the {{Soup}} entity, the {{SOUP_AUD}} table won't end up with {{REVTYPE}}'s 0, 1, and 2 but instead just 0 and 2. |
|