1 Reply Latest reply on Mar 8, 2011 3:49 AM by Adam Warski

    Understanding MappedSuperClass with Envers

    Travers Snyman Newbie

      Hi ,

       

      I have a few questions with regards to @MappedSuperClass with Envers.

       

      I have a @MappedSuperclass that is subclassed by several entities. I am only interested in auditing some of these entities. The MappedSuperclass is not annotated with @Audited. In the MappedSuperClass I have a ManyToOne relationship with annotation @Audited(targetAuditMode=RelationTargetAuditMode.NOT_AUDITED)

       

      Firstly with the @Audited(targetAuditMode=RelationTargetAuditMode.NOT_AUDITED) , I get that all subclasses are automatically audited even though MappedSuperclass is not audited. Is this correct (expected) behaviour?

       

      Secondly is there a way to explicitly only audit subclasses that are annotated as @Audited in the above scenario.

       

      I am using Envers with Hibernate3.6.0.Final