Bug or feature?
CategoryModel:
=================================
hasMany=>array(
'Category'=>
array(
'className'=>'Category',
'foreign_key'=>'parent_id'
))) //category has many categories.
================================
Category->find('all') returns an array like this:
array(
[id],
[name],
[parent_id]
[0]=>row from joined model
[1]=>row from joined model
....
)
instead of:
array(
[id],
[name],
[parent_id]
[Category] => array(
[0]=>row from joined model
[1]=>row from joined model
...
))
This happens only if association name is equal to the name of main
model.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---