-->
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: many-to-manys and effect of the cascade type
PostPosted: Tue Nov 08, 2005 1:31 pm 
Beginner
Beginner

Joined: Thu Nov 03, 2005 4:11 pm
Posts: 25
I am unclear about how the cascade attribute works in a many-to-many. If you have a categories that have a many-to-many relationship with items through the CATEGORIES_ITEM_JOINER_TABLE what cascade type would you use if you want to only affect the joiner table?

So i want it so if I add an item to the Categories' items set it would create a new joiner. If i delete one it would delete the joiner, but it wouldn't create a new item or delete an item? I would guess this is cascade all, but from some of reading it seems like this might be cascade none?


What would the proper cascade type be if I wanted it to save new items in addition to auto creating and deleting the joiner?

What if I wanted it to actually delete items? Is this all-delete-orphans?

Basically i am unclear as to whether the cascade option affects the joiner or the table it is joining too?


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.