Model::$recursive (http://book.cakephp.org/view/66/models#recursive-439)
Also, if you're using Cake 1.2, findAll has been deprecated, replaced
with find ('all', ... );

(in your controller)
     $this->z->find ('all', array('recursive' => 2));

On Wed, Jun 25, 2008 at 10:53 AM, Dave <[EMAIL PROTECTED]> wrote:
>
> So lets say, for example, I have a model x:
>
> class x extends AppModel
> {
> }
>
> and another model, y, which "hasOne" x:
>
> class y extends AppModel
> {
>    var $hasOne = array( 'x' => array('className' => 'x', 'foreignKey'
> => 'id');
> }
>
> and one more model, z, which "hasOne" y:
>
> class z extends AppModel
> {
>   var $hasOne = array('y' => array('className' => 'y', 'foreignKey'
> => 'id');
> }
>
>
> If i were to z->findAll(), i'd get something like:
>
> $result = 'z' => whatever...
>               'y' => whatever...
>
> but x would be nowhere to be found, despite the face that y hasOne.
> Is there any way to elegantly solve this problem in cakePHP?
>
>
> >
>

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