We're updating the issue view to help you get more done. 

ComponentType has incorrect dirty checking

Description

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

Environment

None

Status

Assignee

Unassigned

Reporter

Eugene Goroschenya

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

3.3.1

Priority

Critical