In Hibernate, the PostUpdateEventListener implementation allows you to plug in a Hibernate workflow and gives you the ability to check and compare old and new values ββof Entity properties as they are saved ( PostUpdateEvent has getOldState () and getState () methods that return an array of these values). For standard properties, this works fine. However, if one of these properties is a collection whose contents have changed, this will not help: the "old value" and "new value" are the same reference to the collection (since the collection itself has not changed, just its contents). This means that you can only see the last "new" content of this collection.
Does anyone know if there is a way to determine how the elements of a collection owned by Entity changed at this point in the workflow?
source
share