-->
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 an object from a many-to-may relation
PostPosted: Thu Nov 24, 2005 5:45 am 
Newbie

Joined: Sat Oct 22, 2005 4:17 am
Posts: 7
Hello,

I have a many-to-many relation to "Player" and "PlayerGroup".

I have the following mappingfiles:
Code:
<bag name="players" table="PLAYER_GROUPS2PLAYERS" order-by="PLAYERS_FK" inverse="true" cascade="all" lazy="true">
...
</bag>

<bag name="playerGroups" table="PLAYER_GROUPS2PLAYERS" order-by="PLAYER_GROUPS_FK" inverse="false" cascade="all" lazy="true">
...
</bag>


When i delete a Player, which still is connected to groups, the player and all the referenced groups are deleted.
But i only want to delete the player and its relations.

I think it's something with the cascades...

Can someone help me with this?


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.