when saving (updating) an object that you call EntityManager.persist (entity) , passing the complete object. Can be intercepted using @PreUpdate .
Does anyone have a recipe on how to determine which properties were changed in this interceptor method? Somehow comparing the old and the new object? It is even better to implement a general method instead of comparing fields by field for each class.
Thanks for any input!
Sven
, persist() (insert) . , , .
JPA , . , , API- JPA.
EclipseLink, preUpdate EclipseLink DescriptorEventListener JPA, ObjectChangeSet, Event, .
JPA, , ChangeTracker _persistence_getPropertyChangeListener(), getObjectChangeSet().
TopLink Essentials, , .