-
1. Re: cascade-delete and not null foreign keys
pdelgado0 Jun 18, 2003 3:29 AM (in response to erikdhansen)Hi erikdhansen,
I have a similar problem with the <cascade-delete> tag.
I thought it would have been related with a possible transaction bug or problem but, in my case, the problem was that on the database Jboss did not create correctly the CONSTRAINT. I mean, it creates something like this ...
Foreign Key constraints: xxxxxxx ON UPDATE NO ACTION ON DELETE NO ACTION
instead of
Foreign Key constraints: xxxxxxx ON UPDATE CASCADE ON DELETE CASCADE
I did not understand why Jboss put NO ACTION instead of CASCADE but the fact was this, so I solved running a little shell script that change the CONSTRAINT directly on the database after deploying and creating the tables.
The hole history is http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= I hope this may help you.
Pablo