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: many-to-one deleting child when parents get deleted
PostPosted: Mon Jun 02, 2008 10:28 am 
Regular
Regular

Joined: Tue Apr 01, 2008 5:39 pm
Posts: 61
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
hibernate 3.2.5 GA

Name and version of the database you are using:
oracle 10g


Hi I have general question I have a unidirectional many-to-one mapping.
With child B depending on parent A.

I know that if parent A has a

<set name="childB" cascade="delete-all-orphan">
</set>

it will delete everything however, I want it so that if parent A is deleted in application, childB will also get deleted and i don't want parents to contain child mapping. (like no <set name="childB" in parent class).

Whats the best way to do 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.