Hi,

> I have baked a few controllers, models and views, but if I delete an
> item using threads/delete/3 is there an easy way of deleting all the
> posts (with an thread_id of 3) that "belongTo" the thread with an id
> of 3, which I have defined as "hasMany" posts, or do I need to do it
> manually?

Yes:
http://book.cakephp.org/view/78/Associations-Linking-Models-Together#hasMany-82
- see dependent attribute
http://book.cakephp.org/view/516/Deleting-Data#del-690


Regards,
Piotr

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to