$this->model->recursive could cause a bug in your application

Published on and tagged with cakephp  problem  tip

If you have updated to the latest version of trunk ( and you use something like

$this->model->recursive = 2;

in your code, it is possible that you have a bug in your application as the findAll() does no longer return all the data you expect. I think, the reason for that behavior is that there was a bug in the recursive handling of CakePHP which is fixed now. Fixing my application was easy: I had to increase the recursive value by 1:

$this->model->recursive = 3;

In this case it paid off that I have tests, otherwise I wouldn’t have noticed that problem in my application that fast.

© daniel hofstetter. Licensed under a Creative Commons License