[hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-1645) refresh with LockMode on an unitialized proxy does not work

Gail Badner (JIRA) noreply at atlassian.com
Fri Aug 19 17:21:02 EDT 2011


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

Gail Badner reassigned HHH-1645:
--------------------------------

    Assignee: Gail Badner

> refresh with LockMode on an unitialized proxy does not work
> -----------------------------------------------------------
>
>                 Key: HHH-1645
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1645
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.3, 4.0.0.CR1
>            Reporter: Michael Kopp
>            Assignee: Gail Badner
>         Attachments: ProxyTest.java
>
>
> the DefaultRefreshEventListener.onRefresh method checks if the object in question is an UninitializedProxy.
> if ( source.getPersistenceContext().reassociateIfUninitializedProxy( event.getObject() ) ) return;
> If this is the case it will reassociate it and return. 
> The problem is it will lose the LockMode. If the refresh call was actually done with LockMode.upgrade, the result should be a select for update, which does not happen in this case.
> This is especially anoying as it depends on the state of the proxy:
> - unitialized --> no for update
> - initialzed --> select for update

--
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