different find results for models null values.

2012-05-08 Thread Michael Gaiser
So sometimes the results for my model finds seem to very between the two formats: $results['Faction'] = array() and $results['Faction'] = array('id'=null, 'name'=null) What determines the two? I would prefer that it always give me the listed fields with null values, but I am unsure what is

Re: different find results for models null values.

2012-05-08 Thread euromark
you can usually find the latter in belongsTo relations. cake will then return the result with those values set to null. if you have hasMany relations (a separate query) it doesnt make sense to return lots of empty result sets and therefore it would just be an empty array Am Dienstag, 8. Mai

Re: different find results for models null values.

2012-05-08 Thread Michael Gaiser
Thanks. On Tue, May 8, 2012 at 1:39 PM, euromark dereurom...@googlemail.com wrote: you can usually find the latter in belongsTo relations. cake will then return the result with those values set to null. if you have hasMany relations (a separate query) it doesnt make sense to return lots of