[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-1525) multiple cascades to the same transient instance within a single object graph
Gail Badner (JIRA)
noreply at atlassian.com
Thu Jan 19 19:09:10 EST 2012
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1525?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gail Badner resolved HHH-1525.
------------------------------
Resolution: Duplicate
> multiple cascades to the same transient instance within a single object graph
> -----------------------------------------------------------------------------
>
> Key: HHH-1525
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1525
> Project: Hibernate ORM
> Issue Type: Improvement
> Components: core
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
>
> Consider an object graph being saved that contains the same transient instance multiple times (at diffierent levels in the graph) where some of the associations define cascading and some do not and that the associations without cascading are further defined as not-null. Based on the order in which the associations are cascaded there is a potential for that transient instance to cause an "unsaved transient instance" exception if the non-cascaded and not-null association is cascaded to first, even though a subsequent cascaced would in fact cause the instance to become managed.
> Typically this is easy enough to work around by simply reordering the associations in the mapping so that the cascaded association is before the non-cascaded one. However, this is not always possible (the case of inheritence hierarchies comes to mind, where the superclass associations are always cascaded to first).
--
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