0 Replies Latest reply on Apr 17, 2015 4:50 PM by Matthew Wedgwood

    @OneToMany + @OrderColumn does not work correctly

    Matthew Wedgwood Newbie

      I have a Tree structure with a one-to-many relationship of children that are ordered via a list with an @OrderColumn("children_order"). When creating a tree with two children, envers is not writing audit records with the correct value for the children_order column. It is in fact entering 0 which causes an error when trying to rebuild the structure via AuditReader. Please see hibernate-envers/EnversTest.java at master · mwedgwood/hibernate-envers · GitHub for full example. See auditTreeTest. If you look at the sql generated you will see that hibernate correctly generates update statements to fill in the children order on the base tree table while envers does not do the same for the tree_AUD table. Any ideas? Seems like a bug.