[hibernate-issues] [Hibernate-JIRA] Reopened: (HHH-7160) Method NaturalIdXrefDelegate#cache() misses to remove obsolete entry in naturalIdToPkMap when NaturalId values changed

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Mar 15 11:47:48 EDT 2012


     [ https://hibernate.onjira.com/browse/HHH-7160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole reopened HHH-7160:
---------------------------------

    Suitable for new contributors: [Yes, likely]
                         Assignee: Steve Ebersole

> Method NaturalIdXrefDelegate#cache() misses to remove obsolete entry in naturalIdToPkMap when NaturalId values changed
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-7160
>                 URL: https://hibernate.onjira.com/browse/HHH-7160
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.1.1
>         Environment: Hibernate4.1.1
>            Reporter: Guenther Demetz
>            Assignee: Steve Ebersole
>              Labels: naturalId
>         Attachments: TestCaseNaturalIdChangeBetweenPersistAndFlush.jar
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Method NaturalIdXrefDelegate#cache() misses to remove obsolete entry in naturalIdToPkMap when NaturalId values changed,
> thus NaturalIdAccess delivers results even by searching with obsolete values (see attached Testcase).
> Cause:
> following instruction is missing in Method NaturalIdXrefDelegate#cache():
> if ( initial != null ) {
> 	if ( areSame( naturalIdValues, initial.getValues()) ) {
> 		return false;
> 	}
> 	naturalIdToPkMap.remove(initial); // <-- this instruciton is missing
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list