1 2 Previous Next 15 Replies Latest reply on Feb 3, 2014 7:11 AM by sandhya rani

    Auditing collection not working

    Nick . Apprentice


            I have two entity as follows


      Class A

      public class A {


           private Set<B> children = new HashSet<B>();


          public Set<B> getChildren() {

                return this.children;





      public class B {


           private A parent;

            private Date fromDate;


          public A getParent() {

                return this.parent;



           public getFromDate() {

                return this.fromDate;









                <class name="A" table="TBL_A">


      <set name="children " table="TBL_B" inverse="true" access="field" cascade="all-delete-orphan">


                                                        <column name="ID_A" />


                <one-to-many class="B" />







        <class name="B" table="TBL_B">


      <many-to-one name="parent" class="A"  cascade="save-update" column="ID_A">



      Now the problem is


      A_AUD table does not generating a relationship with B_AUD and vice versa B_AUD doesn't have any relationship with A_AUD, In this case we wont get the child object changes from parent entity.


      Can anyone please help me to solve this issue, do i have to do anything else apart from @AuditMappedBy() ?

        1 2 Previous Next