I am having a problem where the $results array is being formatted
differently for two different NON-primary calls ($primary == false).

Here's my setup:
- Model_A hasMany Model_B
- Model_B hasOne Model_C
- Model_C has an afterFind() callback to modify the results.

Now, here is what happens:

Case 1:
----------------------------------------------------------------
>From the Model_A controller I run:
$this->Model_A->find('all');

Using debug($results) in Model_C I get:
Array
(
    [content] => stuff
)

And, the $primary variable is false as you would expect.  So far, so
good...


Case 2:
----------------------------------------------------------------
>From the Model_A controller I run:
$this->Model_A->Model_B->findById($id);

Using debug($results) in Model_C I get:
Array
(
    [0] => Array
        (
            [Model_C] => Array
                (
                    [content] => stuff
                )
        )
)

The $primary variable is false, but the $results array is formatted as
though it were accessed directly.

Please help.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to