4 Replies Latest reply on Jan 29, 2009 11:03 AM by Adam Warski

    Auditing on abstract question

    David Lilley Newbie

      JBoss 4.2.3
      Envers 3.4.0 snapshot
      Hibernate 3.4 trunk

      I have an abstract with a one-to-many relationship to to another abstract. I defined a join table and an audit join table for the one-to-many relationship.

      The abstract classes are extended to "Set" and "Item" classes using the joined inheritance type. (Set and Item aren't the real names of course; the names have been scrubbed to protect the innocent.)

      The tables and audit tables are all created correctly. When I run my tests, the entities and relationship tables are correctly populated, and the entities' audit tables are populated. However, the audit table for the relationships are empty. (i.e., Item, Item_aud, Set, Set_aud, Set_Item all have the proper data, but Set_Item_aud doesn't have any data.)

      I tested a non-abstract class that has a similar one-to-many relationship, using the same hibernate annotations, with the same type of join table and audit join table. When I run my tests, all tables are correctly populated - including the join audit table.

      Is there an auditing issue with having the one-to-many join on an abstract class?