Hi
I'm currently struggling with a complex data model, and one of the most frequent problems I encounter is the
"Deleted object would be re-saved by cascade" exception.
I know the causes of this exception: I am trying to delete some entities which are still contained in collections on other entities. When I manage to find out which collection is still referencing the entity, it is easy to avoid the exception, but sometimes I need hours and days to find the bug.
Is there a possibility to let NHibernate tell me what collection I have to change? The exception message only tells me what entity I'm trying to delete, but it does not include the details about the collection where the entity is still contained.
Thank you Jonas
|