Interceptor.onFlushDirty is called for unchanged object update with SelectBeforeUpdate

Description

When Entity is SelectBeforeUpdate, Interceptor.onFlushDirty should not be called for unchanged object update. However, onFlushDirty is wrongly called if the Entity has ManyToOne association with JoinColumn(updatable=false)

This bug is very serious because onFlushDirty is usually used to track audit logging (who updated the record and when.) With this bug, all updates result in audit logging even when they are unchanged!

This bug has been around since Hibernate 3.5.5. I am unable to upgrade Hibernate above 3.5.4 because of this issue.

Environment

None

Assignee

Chris Cranford

Reporter

Taro App

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure