Hi,

sorry to bring this up again, but I firmly believe that model data
structure is inconsistent. I really don't get the current logic and
haven't found any documentation explaining it.

Suppose you have these models:

class Parent extends AppModel
{
   var $hasMany = array('Node');
}
class Node extends AppModel
{
   var $hasMany = array('Child');
}

Then Parent->find yields something like:

Array
(
    [0] => Array
        (
            [Parent] => Array
                (
                    [id] => 7
                )

            [Node] => Array
                (
                    [0] => Array
                        (
                            [id] => 159
                            [parent_id] => 7
                            [Child] => Array
                                (
[...]

Essentially, the data structure is

Parent
Node
  - Child

I would expect it to be

Parent
   - Node
        - Child


I'd really like to understand why the data structure is as it is and/or
how it can be changed to my expectations.


Thanks and regards,

Roland

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to