Hi, can someone explain what basic fundamental of ORM I am missing? I
am having trouble getting Cake to return the data I am after from
Associated models even though I am pretty sure I have my associations
set correctly:

Location
hasMany -> Cat

Cat:
belongsTo -> Location
hasMany -> Subcat

Subcat :
belongsTo -> Cat
hasMany -> LocalInfo

LocalInfo:
belongsTo->Subcat

However when I run the query below it only returns LocalInfo and
Subcat data. I thought that by setting recursive => 2 it would bring
back all associated data, including up the chain to Location. Is that
not correct?

$params = array('recursive' => 2);
$listing = $this->LocalInfo->find('first', $params);

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