-->
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: Performance Problem in Deleting Parent Object
PostPosted: Thu Jan 31, 2008 5:06 am 
Newbie

Joined: Thu Jan 31, 2008 4:56 am
Posts: 2
hi..
I have a problem in working with parent/child model.....
when I delete the parent.. Hibernate delete each of its children in separate delete command instead of using WHERE Parent_ID=?

That make the delete process very slow... so How to solve that?

Mapping files look like this

Parent Object:
Code:
      <set name="trace" lazy="true" order-by="timeRecieved"
         inverse="true" cascade="all-delete-orphan">
         <key column="vid" />
         <one-to-many
            class="ObjectLocation" />
      </set>


Child Object:
Code:
        <many-to-one name="vehicle" column="vid"
           class="Vehicle" not-null="true"
           cascade="all" />


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 01, 2008 10:54 am 
Newbie

Joined: Thu Jan 31, 2008 4:56 am
Posts: 2
At least someone tell me that it is the right behavior, or where I'm going wrong...


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.