Tuesday, October 27, 2009

Re: Strange belongsTo problem

Please copy/paste the actual model associations from each model, so
that we may better be able to help you ;)
Enjoy,
John

On Oct 27, 9:26 pm, kdubya <kenwin...@winanstech.com> wrote:
> More info.
>
> With all belongsTo associations in place (per original post) find()
> works ONLY if I set recursive LESS than the maximum depth from that
> level.
>
> So
> $this->Page->recursive = 2;
> $page = $this->Page->find('first', array('conditions'=>array('title
> like'=>'%Home%')));
>
> works OK but the Image data I need is not retrieved (as you would
> expect).
>
> If recursive in the above example is 3 instead of 2 I get the weird
> debug output and the page is not rendered (the only output is the
> repetitious debug stuff).
>
> Likewise if I do
> $this->DisplayArea->recursive = 1;
> $da = $this->DisplayArea->find('first', array('id'=>'1'));
>
> works OK but still the Image data I need is not there in the returned
> array (as you would expect).
> If I set recursive = 2 then the weirdness comes back.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: