Pinchy
Pinchy

Reputation: 1536

Hibernate Envers @NotAudited annotation

On an Envers Audited class I am excluding a field by putting the @NotAudited annotation but Envers ignores my annotation, it only work on getter methods not on the field level.

Can I configure so I can place my annotations on field level?

Upvotes: 3

Views: 6085

Answers (1)

adamw
adamw

Reputation: 8606

Envers looks for annotations in the same place where Hibernate annotations are. So if you have Hibernate mappings on fields, Envers will look at fields.

If you are using xml configuration, then most probably Envers is using the default method for searching for annotations, that is, on getters/setters.

Upvotes: 3

Related Questions