-->
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: Problem while deletion
PostPosted: Tue Dec 04, 2007 4:23 am 
Newbie

Joined: Thu Oct 25, 2007 11:38 pm
Posts: 1
We are facing a strange issue while deleting a row in a table.

We have 3 tables. Parent and child 1 and child 2

Child 1 & 2 have multiple entries of parents.

Here parent table - game table.
child 1 - clips (audio and video) belong to the game
child 2 - discussion related to the game table.

So the child 1 & child 2 are linked with the parent table by using the primary key of parent table (game table) as a foreign key.

So when deleting the entries in the parent table ( deleting a game in the game table), the no of queries fired in the child table is directly proportional to the number of entries in the child table.

We used the cascadedelete mapping the hibernate as follows

<set name="gameClips" inverse="true" cascade="delete-orphan">
<key column="game_ID" />
<one-to-many class="SPGameClip" />
</set>

So please help us to solve this issue


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.