cakephp / datasources

CakePHP Datasources
http://cakephp.org
237 stars 115 forks source link

ArraySource find empty records #83

Open ghost opened 10 years ago

ghost commented 10 years ago

Created by Gallagher, 30th Nov 2012. (originally Lighthouse ticket #45):


If you do a find on a model which uses ArraySource datasource and the Model::records property is empty, then the returned value is something like: array( 'Model' => array() ) Whereas I think the returned value should be: array() If you want I can fix this myself, add a test and create a pull request, but I am wondering is there a situation (maybe when the model is a related model) where it should return the value which it does or is it just plan incorrect.

ghost commented 10 years ago

30th Nov 2012, Gallagher said:


BTW, this is for the 2.0 branch.