Tuesday, July 28, 2009

Re: Deleting items and items that "belongsTo"

Taff, you don't say whther you want to delete the items (i.e. cascade
the delete) or avoid deleting the items

Either way it's controlled by the second parameter to the del method.
See http://book.cakephp.org/view/690/del for details.

David

On Jul 28, 7:43 pm, Taff <taff.law...@googlemail.com> wrote:
> is there a way to make
>
> $this->Todolist->del($id)
>
> automagically delete
>
> Todoitems that had todolist_id relating to that list?
>
> My todolist hasMany todoitems and my todoitems belongsto todolist
>
> Thanks for any pointers.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: