awesome, thanks! I can't believe I missed that.

On Dec 3, 10:58 pm, Grant Cox <[EMAIL PROTECTED]> wrote:
> Set 'dependent'=>true in your $hasMany definition.  
> Seehttp://manual.cakephp.org/chapter/modelsfor more details.
>
> On Dec 4, 2:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi, I'm new to cakePHP and I'm wondering if there is an easy way to
> > setup automatic referential data integrity so that when I delete a
> > parent, all of it's children are automatically deleted? Right now I
> > have a $hasMany relationship setup in the parent's model and a
> > $belongsTo relationship setup in the child's model. As it is now, when
> > I delete a parent data objects, it's children are not deleted. If you
> > know how to do this, other then manually deleting all of the children
> > in the parents delete function, let me know.
>
> > Thanks,
> > Dave

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to