-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: How to detect which collection references an entity
PostPosted: Mon Feb 08, 2010 2:37 pm 
Newbie

Joined: Wed Sep 02, 2009 11:53 am
Posts: 5
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.