Have you tried turning off foreign key constraints when running DbUnit? http://raibledesigns.com/rd/entry/dbunit_tip_turn_off_foreign
Matt On 8/29/07, dylan schleppe <[EMAIL PROTECTED]> wrote: > Julien, > wish I had an answer for you but I run into this at times. The problem for > me seems to be xdoclet not putting the ON DELETE CASCADE statements in the > create tables statements. > I'd love to hear if anyone else has gotten this to work with mysql. I'm > using mysql 5.x and all the tables are innodb on AppFuse 1.9.4. I'm sure > there's some config missing but I just haven't run across it. > Any suggestions appreciated. > Dylan > > > On 8/29/07, Julien C. <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I've got a problem using dbunit. I have a class "Element" which have an > collection of "Element" and etc... So when dbunit wants to delete content > before insert it makes an error : > > > > Embedded error: > com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: > Cannot delete or update a parent row: a foreign key constraint fails > (`Element`, CONSTRAINT `FK1BB6DCD894131D` FOREIGN KEY (`ELEMENT_ID`) > REFERENCES `Element` (`id`)) > > > > any ideas ? > > thanks, Julien Chanséaume. > > > > > > -- http://raibledesigns.com
