]
Gail Badner updated HHH-5908:
-----------------------------
Fix Version/s: 4.0.0.Alpha1
3.6.2
unnecessary updates when using select-before-update dirty check with
entity that has immutable many-to-one properties.
----------------------------------------------------------------------------------------------------------------------
Key: HHH-5908
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5908
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.6.0, 3.6.1
Reporter: Howard Kelsey
Priority: Critical
Fix For: 3.6.2, 4.0.0.Alpha1
Attachments: patch.zip, update-testcase.zip
Entities with many-to-one properties that have insert="false"
update="false" are always marked as dirty! This is because when creating the
sqlSnapshotSelectString in AbstractEntityPersister.getPropertyUpdateability() is used to
identify which properties should be returned in that select and immutable many-to-one
props are not. The AbstractEntityPersister.findModified(Object[] old, Object[] current,
Object entity, SessionImplementor session) is used to work out if the object has in fact
changed, however AbstractEntityPersister.propertyColumnUpdateable is always used to
determine which properties are to be checked which means that immutable many-to-one
properties are checked even though they're not returned by snapshot select. This is a
side effect of the change made for HHH-2350 which changed ManyToOne.isAlwaysDirtyChecked
to always return true. So I think it should be changed so that when comparing with the DB
snapshot only the properties returned by the
AbstractEntityPersister.sqlSnapshotSelectString should be checked by using
AbstractEntityPersister.getPropertyUpdateability() instead of
AbstractEntityPersister.propertyColumnUpdateable
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: