I have a bidirectional one-to-many relationship with orphan delete. Since saying all orphan children should be deleted, it seems logical that the DB schema won’t allow orphaned children, meaning Child.Parent_id should have a NOT NULL constraint. However, when I add this constraint and try to do a cascading orphan delete, NHibernate yells at me because I’ve set the Child.Parent to null / nothing.
When an entity will be deleted, whether in a cascade or explicitly with session.delete, it seems illogical to bother checking all of the not-null properties. I've blogged the whole thing with entity classes, FNH mappings, and a failing test plan. Can anyone explain the reason behind this behavior? http://jasondentler.com/blog/2009/08/bidirectional-one-to-many-with-orphan-delete/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
