AKKAweb
AKKAweb

Reputation: 3807

CakePHP 1.3: How to prevent a find operation from returning [0] arrays - Recursive Does not work

I am trying to understand why CakePHP returns arrays like the following even when recursive=-1 and if there is a way to stop this from happening?

array
(
    [0] => array
        (
            [User] => array
                (
                    ... etc...
                )
        )
)

Thanks,

Upvotes: 0

Views: 157

Answers (1)

del_dan
del_dan

Reputation: 873

Recursive -1, reads the model without any relation.

Now brings this Array, because you do a "find (all)", you should do a "find (first)".

Upvotes: 1

Related Questions