> 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
> _deleteHasMany will loop through the preferences and delete each one.
> This would be the recommended way of deleting preferences since it
> would be done by the model.
HI,
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 asso
My bad, I just realised I misread the question and you don't want to
delete the User object.
--~--~-~--~~~---~--~~
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@googlegro
Hi Joel,
CakePHP makes this very easy for you. I'm assuming you've setup the
models so that User hasMany Preference and Preference belongsTo User.
To have it that CakePHP automatically deletes all the Preference
entries when you delete the parent User just set 'dependent' to true in
the hasMany
> What is the Cake way of deleting all the prefences for a User (but not
> the User itself) without having to loop over all the users prefences
> and call DELETE on the Preference model?
Look in the API at the model class. Specifically, checkout the del
method, and the _deleteHasMany method. Ther
Hi all,
I'm new to the Cake framework but not to PHP.
I apologise in advance for asking any dumbo questions if this is an
advanced group etc.
My simple question is this
I have a test Cake web app with two models - User and Preference - a
user has many preferences.
What is the Cake way of d