[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4726) Add support for delete-orphan cascading to <one-to-one/>

Steve Ebersole (JIRA) noreply at atlassian.com
Sat Jan 16 15:40:32 EST 2010


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

Steve Ebersole commented on HHH-4726:
-------------------------------------

This commit (http://fisheye.jboss.org/changelog/Hibernate?cs=18568) adds support for "reversed" fk-based, logical 1-1 (both bidirectionally and unidirectionally) orphan-removal.  Thats a mouthful :)  Basically you can now specify the orphan removal on the many-to-one side of a fk-based 1-1, either:
1) unidirectionally : http://fisheye.jboss.org/viewrep/Hibernate/core/trunk/testsuite/src/test/java/org/hibernate/test/orphan/one2one/fk/reversed/unidirectional/Mapping.hbm.xml?r=18568#l26
2) bidirectionally : http://fisheye.jboss.org/viewrep/Hibernate/core/trunk/testsuite/src/test/java/org/hibernate/test/orphan/one2one/fk/reversed/bidirectional/Mapping.hbm.xml?r=18568#l26

This is only currently supported for single column fks in terms of hbm binding.  In terms of the model this support is driven by org.hibernate.mapping.ManyToOne#isLogicalOneToOne (see http://fisheye.jboss.org/viewrep/Hibernate/core/trunk/core/src/main/java/org/hibernate/mapping/ManyToOne.java?r1=14993&r2=18568) and ultimately org.hibernate.type.ManyToOneType#isLogicalOneToOne (see http://fisheye.jboss.org/viewrep/Hibernate/core/trunk/core/src/main/java/org/hibernate/type/ManyToOneType.java?r1=14993&r2=18568).  So the annotation binder should be able to utilize that info to support this as well.

> Add support for delete-orphan cascading to <one-to-one/>
> --------------------------------------------------------
>
>                 Key: HHH-4726
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4726
>             Project: Hibernate Core
>          Issue Type: New Feature
>          Components: core
>            Reporter: Steve Ebersole
>            Assignee: Steve Ebersole
>             Fix For: 3.5.0-Beta-4
>
>          Time Spent: 1 day, 4 hours, 45 minutes
>  Remaining Estimate: 0 minutes
>
> JPA 2 requires support for this.  See section "11.1.37 OneToOne Annotation" wrt the orphanRemoval attribute

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