I got PostUpdateEventListener working very good for me, but it does not detect @ManyToMany collection update. I tried also other possibilities like checking PostCollectionUpdateEventListener, PreUpdateEventListener, PreCollectionUpdateEventListener with no success. Everywhere I got collection after update.
I agree, i didn’t describe problem. Let me fix it
In my DB I have a one audited entity. I need very limited change log. For every change I need to store only information of added, deleted or updated record. For update I need changed fields and date. No content/value info at all. Only for relationships I need information which entity was linked/unlinked and time. Additionally I need only information about the last change, so I do not care how many times a record/field was deleted. Final date and scope are important. The change log is valid up to next checkpoint, when changes are approved and the log is cleared.
I was considering envers, but this looks like overkill for me. Listeners was simplest solution, but ManyToMany problem appeared. Now it needs some work, but I still believe this can be easily solver. With envers there was tons of data, and building final change log seemed to be very complicated (for described above taks).