[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4601) implement orphanRemoval for *ToMany

Edmondo Porcu (JIRA) noreply at atlassian.com
Wed Dec 21 03:57:21 EST 2011


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

Edmondo Porcu commented on HHH-4601:
------------------------------------

Yes I am sorry. I think I have found the issue produces itself only if the cascaded entity has a automatic Generated Id.

What happens is that, when persisting or merging an entity with a @OneToOne to an entity with auto generated ID, the id is not updated in the object.

Therefore, when you try to delete the parent entity, the child is not deleted correctly, because it is missing the id. If you replace your autogenerated ID in the child entity with a manual ID, all works fine.

> implement orphanRemoval for *ToMany
> -----------------------------------
>
>                 Key: HHH-4601
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4601
>             Project: Hibernate Core
>          Issue Type: Sub-task
>          Components: annotations
>            Reporter: Emmanuel Bernard
>            Assignee: Scott Marlow
>             Fix For: 3.5.0-Beta-3
>
>


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