Description
anpieber opened DATAJPA-1697 and commented
Dear Spring-Development-Team,
Auditing for users is not working for quite a while now (since the upgrade from 2.0.4.RELEASE to 2.1.4.RELEASE). I know that it worked before the upgrade. It just took me lots of time finding out, that it does no longer work...
The core problem is that the AuditingEntityListener is expecting the object to be modified in place, but the AuditingHandler returns a new object. Therefore the changes never make the way into the DB. In fact I debugged the problem and it's located somewhere in the AuditableBeanWrapper class. If you monitor the target object in the wrapper (AuditableBeanWrapper) it stays bascially the same until this line. auditor.filter(__ -> isNew).ifPresent(foo -> wrapper.setCreatedBy(foo)); (AuditingHandler:198). Debugging the path further down you see that the object inside wrapper is modified in PersistentPropertyAccessor:78 in the accessor.setProperty(leafProperty, value); method call. I tried to debug into this call but intellij does not return any more information on this one.
Please feel free to contact me for any further information. Any idea would be really helpful!
Thank you very much and kind regards,
Andreas
Affects: 2.2.5 (Moore SR5)
Attachments:
- demo.zip (126.58 kB)