'NHibernate.AssertionFailure: no collection snapshot for orphan delete' when saving an entity with an empty collection with delete-orphan cascade

Description

When attempting to save an entity with an association to an empty collection with a cascade style of delete-orphan, I'm getting a 'NHibernate.AssertionFailure: no collection snapshot for orphan delete' error.

Environment

None

Attachments

1

Activity

Show:

Fabio Maulo July 31, 2008 at 9:01 PM

Ok... so the issue can be closed here.
Here mean NH issues....
Like you can see this JIRA is for NH and NH.Contrib projects; go to home page and you can find NHMA project to submit the JIRA (remember to write a reference to "NH-1419")

Brandon Kobel July 31, 2008 at 3:33 PM

Fabio Maulo,

You are right, when I used the xml based mappings that you submitted, everything works perfectly, so it appears that the issue is with the NHibernate.Mapping.Attributes assembly? I noticed that the NHibernate.Tests project didn't have a reference added to NHibernate.Mapping.Attributes assembly, and I assume this is because of the recent split between NHibernateContrib and NHibernate.Core. Is there an appropriate place for me to recreate the issue using the attribute based mappings?

Thanks for all of your help so far, I sincerely appreciate it.

Fabio Maulo July 31, 2008 at 9:02 AM

Fabio Maulo July 31, 2008 at 8:59 AM

Hi Brandon.
I try a test in 2.0.0 branch and it appear like "Not an issue".
Note that I write the mapping xml based on the attributes you write using NHMA.
I'm going to commit the test.
Please check it and if you find something else we can reopen this issue.

Brandon Kobel July 29, 2008 at 12:43 PM

Based upon your comment, I changed the cascade style to no longer use the 'all' cascade style to see if it was the 'refresh' cascade function that was causing the error. Even when I changed the cascade style to 'save-update,delete-orphan' I get the same error. If I use the 'all' cascade mode, and exclude 'delete-orphan' I don't get the error anymore.

Not an Issue

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created July 28, 2008 at 12:27 PM
Updated July 31, 2008 at 9:01 PM
Resolved July 31, 2008 at 8:59 AM
Who's Looking?