Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 JPA/EclipseLink 在更新时获取更改的属性(名称、旧值、新值)?
您可以从 UnitOfWork 或通过 DescriptorEvents 访问更改。您可以从更改集中获取新值,我认为从 2.3 开始,您也可以获取旧值。
看,
http://wiki.eclipse.org/EclipseLink/FAQ/JPA#How_to_access_what_changed_in_an_object_or_transaction.3F