-->
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: On delete parent
PostPosted: Wed Aug 19, 2009 4:51 am 
Newbie

Joined: Sun Dec 28, 2008 2:58 pm
Posts: 5
Hi,

I am using the newest Hibernate (hbm) on PostgreSQL. The app I am developing should be modular, ha have for example in core "Article" and in module "ArticleRanking" the article should not know, that it is ranked (core must be independent on modules), what I need to do, is to have simple rule in mapping, that if the parent (Article) is deleted, the child (ArticleRanking) should be deleted too.
The problem is, that this kind of behavious is achieved in parent mapping with cascade or key on-delete, but I cannot remap the parent, I have to declare it in children.

So my question in nutshell...is there a way to generate SQL on delete cascade from child elements?

Thanks.

Pavel


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.