0 Replies Latest reply on Dec 12, 2017 6:49 AM by himanshuarora05

    @AuditJoinTable rows missing


      Hi Experts,

      I am new to Hibernate Envers, I've an entities (A & B) which are audited by Envers, which contains one collection.

      Entity A

          public class A {
          @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
          private int id; ....
          @OneToMany @JoinColumn(name = "a_id")
      @AuditJoinTable(name = "A_B_AUDIT" ,inverseJoinColumns = @JoinColumn(name = "a"))
          private List<B> bs; ....

      Entity B

      public class B {
      private int id; ....

      @Column(name = "a_id")
      private int aId; 

      @JoinColumn(name = "a_id", insertable = false, updatable = false)
      private A a;


      When I run my project following tables gets created :




      I've separate controllers to persist A object and B Object. When I try to save B with aId and A, audit_table (A_B_AUDIT) does not gets updated but B_AUDIT with updated revision gets updated.

      Can someone please let me know what i am missing here.

      Thank you !!

      Hibernate Enver Version : 5.1.4.Final