I'm trying to set up some unit tests which need to load a fixture file every time. Unfortunately I get an "SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails" error (also when using "symfony doctrine:data-load") .
I guess doctrine tries to delete data with "onDelete: RESTRICT" relations too early, i.e. not in the order inserted. Changing to "onDelete: CASCADE" would surely solve the problem but destroys my database concept. This is very annoying since i cannot use unit tests this way. Also, to load changed fixture files for testing purposes in the browser i ALWAYS have to drop the whole database. I followed the steps from Day 8 of the Jobeet tutorial, but there onDelete: CASCADE is used. Is there any other way to solve this as writing an own data deletion script which i have to execute every time? -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
