Is there an option to add "ON DELETE CASCADE" to the foreign key generated as a result of a joined-subclass? For example, if I have class Child defined as a joined-subclass of Parent using the key "foo". Then Hibernate would issue a:
ALTER TABLE Child ADD CONSTRAINT "FKxxxxxxxx" (foo) REFERENCES Parent;
However, this is missing a "ON DELETE CASCADE". As a result, a deletion of an instance from the Parent causes a foreign key violation. What I want to have is:
ALTER TABLE Child ADD CONSTRAINT "FKxxxxxxxx" (foo) REFERENCES Parent ON DELETE CASCADE;
What would be the solution/workaround to this problem? I can't find any option to add this "ON DELETE CASCADE" to the "<joined-subclass ..." declaration.
Thanks.
-- Jiang
|