[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-511) reattach object from same session

Steve Ebersole (JIRA) noreply at atlassian.com
Thu Apr 12 10:51:04 EDT 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_26701 ] 

Steve Ebersole commented on HHH-511:
------------------------------------

Rodrigo, thanks for the patch.  Initially I am inclined to think that the correct solution is to simply "unset" the session references for collections and proxies during clear (currently, they are simply removed from the session's persistence context, but their session reference is never cleared).  Perhaps a better solution is to basically run evict() on all persistence context entries since evict does all of this work already.

Could you include test cases for all the scenarios you saw failing?

> reattach object from same session
> ---------------------------------
>
>                 Key: HHH-511
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-511
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>            Reporter: Gavin King
>            Priority: Minor
>         Attachments: reattach-same-session.patch, reattach-same-session.patch
>
>
> http://forum.hibernate.org/viewtopic.php?p=2231400#2231400
> There is a problem when you reattach a collection to the same session that it was previously attached to, after calling clear(). Hibernate checks the collections session reference, at reattach and concludes it is  already attached.

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