The problem is that persisted object is always dirty in case when component field was set to component instance with null in all fields even if there were not other changes.
So it leads to unnecessary updating of object.
Formally it changes persisted object but not data in DB and has no sense to mark it dirty and schedule update for such changes in persisted object.
And it even worse in case when Interceptor#onFlushDirty(...) is used to do some additional stuffs and if Envers is used to audit changes.
It seems such problem was foxed for NHibernate, see https://nhibernate.jira.com/browse/NH-901 but not in Hibernate
If this is still an issue on ORM 4.2 or 4.3, anyone have a test case to attach?
Note: In an attempt to clean up the HHH JIRA, we will be rejecting any ticket that sits in the "Awaiting Test Case" state for 2-3 months with no response. So, if this issue is critical to you, please attach a reproducing test case ASAP. Thanks!
Bulk rejecting issues lacking a test case or recent response.