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
|