I've seen a setup which *forces* you to re-assign all children to another parent node, not always the most effective.
Curious to see what other people have to suggest as this is something I need to tackle also. On 27 February 2012 16:24, phpMagpie <p...@webbedit.co.uk> wrote: > Spurred into action (eventually) by Jeremy Burn's (ClassOutfit) talk at > CakeFest Manchester, I have for the first time tuned my database and > included referential integrity relations. The database is now doing > everything that it should be, i.e. stopping me from deleting records that > would result in an orphan record. I was just wondering how people deal > with allowing records with children to be deleted (along with their > children) when having MySQL relations in place. > > I assumed that if I had 'dependent' => true in my model relation that the > children would be deleted and the parent could then be removed, but I keep > getting dbo errors. I hope I am missing something obvious as to have to > manually check for children and delete them seems counter like I am > sacrificing some of Cake's automagic when deleting records and I'm not sure > if that is worth it as it was easier to have CakePHP checks in place when > deleting files that children were not left on relationships if dependent > was set to false. > > Thanks, Paul. > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group > at http://groups.google.com/group/cake-php > -- Kind Regards Stephen http://www.ninjacodermonkey.co.uk -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php