Experiencing issues where after updates to a Hibernate entity, no updated data is being flushed to the database. After some debugging, traces show that lazy-loading an entity is causing the entity to be re-initialized, clearing any fields marked as dirty. Prior to lazy-load of relation
After to lazy load of relation
Trace from lazy load
We have currently worked around this issue in our code base by calling either Hibernate.initialize() or eager loading this relation for the services its needed. |