> i've been looking at the API but I just don't see how I call
> _deleteHasMany? I do not want to cascade delete to child associations
> if I delete the master (in this case User). I want to delete ALL the
> rows on the many side of the relationship (in my case 'preferences')
> but the "one" side (the User) is not to be deleted.

_deleteHasMany method will not delete the User, just the child
(profile) records.
$this->User->_deleteHasMany($user_id, true);

However, if you have other "HasMany" associations, then they too will
also be deleted.

If that doesn't work for you... there's nothing wrong with doing it the
easy way:
$this->Preference->execute("DELETE FROM preferences WHERE user.id =" .
$user_id);


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" 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