This content has been marked as final.
Show 2 replies
-
1. Re: foreign key constraint fails
frodo May 23, 2002 6:17 PM (in response to shogun)This problem exists with RC2 and MySQL as well. The only way way I could get around it was to remove the not null attribute on the foreign key column in MySQL. Can a set method for a non null foreign key column be placed in ejbPostCreate()?
Thanks for your help. -
2. Re: foreign key constraint fails
shogun May 24, 2002 2:08 AM (in response to shogun)I reported this behavior as a bug. This bug was closed with the comment, that with Version 3.1 it should be possible to set CMR fields before the physical insert into the database.
Till now, the only workaround is do delete the foreign (indexed row)in the mysql database. But after this, you have no referential integrity. Under Bea Weblogic you can place your setter into the ejbPostCreate() method. I think, with 3.1 it will also be possible with JBoss.