From: Steve E. (JIRA) <no...@at...> - 2006-02-27 09:16:40
|
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: Hibernate3 Type: Improvement Components: core Reporter: Steve Ebersole Assigned to: 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. - 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 |