1 Reply Latest reply on Oct 23, 2018 12:32 AM by nk2611

    An audited relation to a non-audited entity failing on db update

    nk2611

      @Entity

      @Audited

      class A extends BasicEntity{

          @ManyToOne

          @JoinColumn(name="b_id")

          @Audited(targetAuditMode=RelationTargetAuditMode.NOT_AUDITED)

          private B b;

      }

       

      @MappedSuperclass

      public abstract class BasicEntity implements Serializable{

          @Id

          private String id;

      }

       

      @Entity

      class B extends BasicEntity{
      }

      For the given example insert to db is working fine but update is failing with log:

       

      Error accessing field [private java.lang.String BasicEntity.id] by reflection for persistent property [B#id] : {id}; nested exception is org.hibernate.property.access.spi.PropertyAccessException: Error accessing field [private java.lang.String B.id] by reflection for persistent property [B#id] : {id}


      I am using "5.2.10.Final" envers jar