2 Replies Latest reply on Sep 18, 2010 3:20 PM by vakopian

    Keeping track of entites in a transaction

    vakopian

      Currently Envers provides no way of finding which entities have been affected in a given transaction. I.e. given a revision number it's impossible to find all the versions of all the entities for that revision. For example, all the search methods in the AuditQuery API take the entity class as a parameter. In our application we need to be able to retrive all the changes for a given revision number. Similar questions and requests have been posted in this forum before.

      The attached patch has a simple implementation for this feature. It adds 2 simple methods to the RevisionListener interface, that are called from AuditProcess and allow the Revision Entity to keep track of the entity names that are changed. The test cases show the simple usage for this. The patch is against hibernate 3.5.5.

       

      Please consider this for inclusion in envers.

       

      Thanks.

       

      P.S. I fist tried to open a jira feature request, but it seams that the jboss jira "create issue" page at https://jira.jboss.org/secure/CreateIssue!default.jspa does not have Envers in the project dropdown.