Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get changed attributes on update using JPA/EclipseLink

How can I get changed attributes (name, old value, new value) on update using JPA/EclipseLink?


1 Answers

You can access the changes from the UnitOfWork or through DescriptorEvents. You can get the new value from the change set, and as of 2.3 I think, you can also get the old value.

See,

http://wiki.eclipse.org/EclipseLink/FAQ/JPA#How_to_access_what_changed_in_an_object_or_transaction.3F

like image 144
James Avatar answered Nov 20 '25 18:11

James



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!