[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4601) implement orphanRemoval for *ToMany
Edmondo Porcu (JIRA)
noreply at atlassian.com
Mon Dec 19 12:33:19 EST 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-4601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44633#comment-44633 ]
Edmondo Porcu commented on HHH-4601:
------------------------------------
Why this has been closed??
I have a real problem with OneToMany. If I delete an object like the following
public abstract class BondImpl extends SecurityImpl implements BondInterface {
@OneToOne(fetch = FetchType.EAGER,mappedBy = "bond",orphanRemoval = true,cascade = CascadeType.ALL)
@Cascade(org.hibernate.annotations.CascadeType.ALL)
protected BondCouponsCollection bondCouponsCollection;
}
and then I persist a new one with the same name but a different bondCouponsCollection, the join table between the two is not cleaned upon delete.
As a result, when I restart my application and I try to load again the object, it fails with: no single row for entry...
Am I missing something?
> 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