[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-5908) unnecessary updates when using select-before-update dirty check with entity that has immutable many-to-one properties.

Gail Badner (JIRA) noreply at atlassian.com
Wed May 4 02:02:07 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner updated HHH-5908:
-----------------------------

    Fix Version/s:     (was: 3.6.4)
                       (was: 4.0.0.Alpha3)
                   4.0.0.Beta1
                   3.6.5

> 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.5, 4.0.0.Beta1
>
>         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: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the hibernate-issues mailing list