[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3714) Merging lazy bidirectional one-to-one association with CascadeType.MERGE from both sides does not work correctly.

Tihomir Totev (JIRA) noreply at atlassian.com
Thu Jan 15 06:13:38 EST 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32130#action_32130 ] 

Tihomir Totev commented on HHH-3714:
------------------------------------

I just found that lazy is not the case - it does not work correctly even if associations are eager.

> Merging lazy bidirectional one-to-one association with CascadeType.MERGE from both sides does not work correctly.
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-3714
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3714
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.3.1
>         Environment: Hibernate Core 	 3.3.1.GA
> Hibernate Annotations 	3.4.0 GA
> Hibernate EntityManager 	3.4.0 GA
> Hibernate Validator 	3.1.0 GA
>            Reporter: Tihomir Totev
>         Attachments: merge_bug.zip
>
>
> If you merge in the session object that has mappedBy annotation it works fine, but when you merge the other object it is inserted twice in the database. Then "More than one row with the given identifier was found" is given, which is correct since it is really inserted twice.
> I'm attaching a test of this problem.
> This test was working fine with core 3.2.6.ga.

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