-->
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: thanks, that helps, one last detail I don't understand thoug
PostPosted: Thu Oct 21, 2004 12:31 pm 
Regular
Regular

Joined: Thu Sep 16, 2004 4:56 pm
Posts: 80
funny you mention it. I am doing this out of the "hibernate in action" book. I do know about the thing you mention already.

That was a very good point. I did such a thing on the add and forgot to do it on the remove but I am confused on one last minor detail.

The only change I made was between all-delete-orphan to delete-orphan and I am trying to understand why the behavior changed when I don't have the code that I should and will add(ie. just looking for understanding here as I read the book)

I understand now I think why delete-orphan does not work. The orphan child still has a reference to it's parent, so it is not really an orphan, more like a half orphan as it is not in the set...ie. The bidirectional relationship was not cleaned up properly by me.

Then my question becomes why in the world is all-delete-orphan working...The only difference here is it adds save-updates to be cascaded also. I haven't changed the child object, just removed it from the collection. How is it that all-delete-orphan is behaving differently then delete-orphan? Bottom line...I expected the same behavior which as you point out should not be to erase it from the database as I did not clean up the bidirectional relationship properly.

thanks,
dean


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.