-->
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: Delete-orphan inconsistency
PostPosted: Tue Aug 18, 2009 7:48 pm 
Beginner
Beginner

Joined: Fri Mar 21, 2008 8:07 pm
Posts: 23
I have a situation where I delete an Entity that contains a Set<OtherEntity> with delete-orphan cascade on the relationship. If there are one or two OtherEntity objects in the set, they are deleted properly. But if there are three or four in the set, one or two of them doesn't get deleted. Basically, a max of two OtherEntity objects seems to be deleted. I end up with orphans in my database. I haven't tried with more than 4 elements since the business logic only allows up to 4 in the set.

There are no other references to these OtherEntity instances, so I'm not sure why the cascading delete doesn't complete properly. I'm using basically the same code on many other relationships in my app, and they all work correctly. Just this one relationship is having problems.

I know there is probably some mistake on my end, but I'm not sure how to best debug it. I'm looking for suggestions on where to start. For instance, is there a particular hibernate package that I should focus on? Something specific to delete-orphan? I'd like to add trace or debug to log4j output on whatever package that might be.

Thanks,
Tauren


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.