Hi all,
I'm dealing with an issue at this moment and i'm not sure how to fix it.
I have implemented audit logging using Envers 4.3.6 on a existing project.
After creating all the _AUD tables and the custom_revision table (including the FK relations) with a SQL script and filling those tables with lets say,
a copy of all current states of the entities to be audited, Envers is not loading those records i have manually inserted.
When i change a entity in my application, Envers is triggered and a new revision is created in a correct way. This revision IS loaded by a Envers AuditQuery.
So my migrated, manually inserted data is not loaded by Envers, and changes made in the application are.
I have found the following work around in our development environment:
- open Oracle SQL developer.
- open the custom_revision table
- edit the custom_revision with id 1 (in the GUI of SQL developer), this is the revision used to migrate all entities to the _AUD tables. For example the timestamp field.
- save the record in the database.
After those steps, all the migrated entities are correctly loaded in my application.
But when i make the same change to the custom_revision record from the SQL CLI, my entities are not loaded.
On the test and production server, the only available tool is a CLI, so im not able to perform the workaround.
Anyone got an idea how to fix this issue?
Thanks!
Well, just deployed the application to the clients test server, and it seems that this problem didn't occured in their environment.
Still curious what the reason could be, but this topic could be closed for now.