Hi,

just a misspelling, try 'dependent' instead of 'dependant' ;-)

Michael

Jason schrieb:
> I can't figure out what I'm doing wrong here. I'm fairly new to
> CakePHP and have been having a lot of success getting a new app set
> up, but I'm running up against a brick wall trying to get recursive
> delete working.
>
> Here is my Account model:
>
> class Account extends AppModel {
>       var $hasMany = array(
>               'Searchfeed' => array(
>                       'order'          => 'Searchfeed.created DESC',
>                       'dependant'      => true,
>                       'exclusive'      => true
>               ),
>               'Author' => array(
>                       'order'          => 'Author.created DESC',
>                       'dependant'      => true,
>                       'exclusive'      => true
>               ),
>               'Rule' => array(
>                       'order'          => 'Rule.created DESC',
>                       'dependant'      => true,
>                       'exclusive'      => true
>               ),
>       );
> }
>
> I am running this in the controller:
>
> $this->Account->del($id);
>
> Cake generates SQL to delete from the accounts table, but it does not
> even attempt to touch the other tables that are dependent. I even
> tried forcing the $cascade variable (which default to true) like this:
>
> $this->Account->del($id, true);
>
> But I get the same result. It only deletes from the primary model, not
> from the dependent models. What am I doing wrong?
>
> - Jason
--~--~---------~--~----~------------~-------~--~----~
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