We have a software that is written in Java using Hibernate as ORM.
To audit the tables we use Envers, a solution that is integrated with Hibernate to manage the audit tables and entries.
But our database is not handled only by hibernate, it is changed by outside programs, which leads to a inconsistent audit tables.
We need some MySQL stored procedures that will parse the database and let the audit tables with the correct entries so the Envers can work properly.
The storedprocedures must check for 3 kind of relationships, 1:1, 1:N and N:N.
For every row in a table, all relationships and all revisions must exists.
There's a discussion [url removed, login to view] about it.
More information will be provided to the winner.