[ http://216.121.112.228/browse/NH-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo closed NH-1996.
---------------------------
Resolution: Incomplete
> receive exception: Collection was modified; enumeration operation may not execute. at cascaded delete
> -----------------------------------------------------------------------------------------------------
>
> Key: NH-1996
> URL: http://216.121.112.228/browse/NH-1996
> Project: NHibernate
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.1.0.GA
> Reporter: John Smith
>
> An exception "Collection was modified; enumeration operation may not execute." is thrown while performing a cascaded delete. During the delete I removed the corresponding entity from it's collection (from an interceptor)
> It quickly fixed my problem at Cascade.CascadeCollectionElements(...)
> I replaced:
> foreach (object o in action.GetCascadableChildrenIterator(eventSource, collectionType, child))
> CascadeProperty(o, elemType, style, anything, isCascadeDeleteEnabled);
> by:
> ArrayList list = new ArrayList(); //JS
> foreach (object o in action.GetCascadableChildrenIterator(eventSource, collectionType, child))
> list.Add(o);
> foreach (object o in list)
> CascadeProperty(o, elemType, style, anything, isCascadeDeleteEnabled);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|