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?