recursive -1 for all models cakephp
I want to set recursive -1 for all models, so I will not have to do it
with every find request for each model.
I tried to do it from AppModel, like
function beforeFind($queryData) {
$queryData['recursive'] = -1;
return $queryData;
}
but it does not work, it gives an error, if I want to find some
associative model with Containable - it can not find any field of the
associated model - like
Column not found: 1054 Unknown column 'AssociatedModel.id' in 'field list'
Is there some way to handle this ? I use cake 2.3.1
Thanks
No comments:
Post a Comment