4 Replies Latest reply on Dec 21, 2012 10:13 AM by adamw

    Audit subclass that extends non-audited superclass

    barnouille

      Hi all,

       

      First of all sorry for my bad english, i hope that you will understand my problem :-)

       

      I currently use Envers 3.6.10-FINAL into a E-commerce Framework named "Broadleaf" and extends his own classes in order to add my custom attributes, eg : MyCustomer extends Customer

       

      When I add the annotation @Audited on MyCustomer, i have the following error :

       

      Caused by: org.hibernate.MappingException: Entity 'my.company.profile.domain.MyCustomer' is audited, but its superclass: 'org.broadleafcommerce.profile.core.domain.CustomerImpl' is not.

       

       

      The problem is i can't add the annotation @Audited on Broadleaf class !

       

      I have tried to add the annotation @Audited(auditParents={Customer.class}) but it doesn't work i have the same error.

       

      Is there a mean to audit my custom class?

       

      Thanks in advance for your help.