-->
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: cascade="all" --> Is it possible to interrupt t
PostPosted: Wed Jul 14, 2004 7:12 am 
Newbie

Joined: Tue Jun 15, 2004 6:55 am
Posts: 3
Hi,

I'm having a problem writing code according to the following requirements. Any help would be appreciated.


Requirements:
- I have a parent <--> child mapping and I would like to delete my children when the parent is deleted. So : Cascade = "All".

- When the child meets certain criteria I don't want it to be deleted. So I want to specify a condition in the delete statement or intercept the cascade operation and cancel the delete of child-elements in some cases.

Is this possible? I could use the lifecycle onDelete() method and delete the child-elements manually, but then I'm not using the cascade-power.

Thanks,

Kris


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.