Hi I have a one to many ComplianceSet -> ComplianceItem. ComplianceItem has a one to many ComplianceItem -> ComplianceItemInstance.
I have
ComplianceSet
HasMany(x => x.GetUserComplianceItems()).Inverse().Access.CamelCaseField(Prefix.Underscore).LazyLoad().Cascade.AllDeleteOrphan();
And
ComplianceItem
HasMany(x => x.GetUserComplianceItemInstances()).Inverse().Access.CamelCaseField(Prefix.Underscore).LazyLoad().Cascade.AllDeleteOrphan();
Then in my code I have
userComplianceSet.GetUserComplianceItems().FirstOrDefault(....);
...
userComplianceItem.RemoveUserComplianceItemInstance(userComplianceItemInstance);
this code returns
deleted object would be re-saved by cascade (remove deleted object from associations)[DecisionCritical.Core.Domain.UserComplianceSet#12]
Now this is very frustrating. If I remove the cascade from both collections the code returns success but the db show's that it didn't do anything. the ComplianceItemInstance.ComplianceItemId field is still populated and of course the item is still there. In anycase, I just want to be able to delete a child from a collection, call save on the object holding the collection and have the freakin thing go away. I've tried all manner of permutations of cascade, save ( saving the set, saving the item ) adding delete to the ComplianceItemInstance and so and can't get this to work.
Please help