-->
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.  [ 2 posts ] 
Author Message
 Post subject: manytomany delete orphan
PostPosted: Wed Jan 21, 2009 2:14 pm 
Newbie

Joined: Wed Oct 08, 2008 3:06 pm
Posts: 13
Location: Seattle
Is there a delete_orphan cascade type option for manytomany? I have a manytomany relationship between two tables with association table. I want to delete a row in a table with everything related in the other table as well as entries in association table..

For instance, we have event table, people table and event-people table.. people can be in different events, and events can have more than one person. When I delete an event, all people in that event should be deleted as well, not just those association entries in the association table..

Thanks..


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 22, 2009 4:04 am 
Expert
Expert

Joined: Thu Jan 08, 2009 6:16 am
Posts: 661
Location: Germany
Are you sure that this is the way you want it? You say, people can be in many events. Why would you delete all people of an event if it gets deleted? Then they would also disappear out of the other events. This sounds like a strange relationship to me.

_________________
-----------------
Need advanced help? http://www.viada.eu


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

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.