views:

30

answers:

1

I have 2 models that are associated but don't want it to use joins when I make database updates.. from the cakephp cookbook, I can't quite gather how I am supposed to set "recursive" to -1, also, do I do it for the model that has the association, the other one, or both

such as if model1 "belongs to" model2 and I am trying to make it so that when doing an update from within model1's control on model1's data that it doesn't do a join with model2..

any advice on the proper syntax to implement this is appreciated

+1  A: 

$this->YourModel->recursive = -1; in your controller before query.

OR

$this->YourModel->find('all', array('recursive' => -1));

bancer
thanks, that helps
Rick