On 30 mayo, 20:35, uolax <[EMAIL PROTECTED]> wrote:
> Thanks so much for any time with this:
>
> Forest->hasMany->Trees
> trees->belongsTo->Forest
Do you really have 2 models named forest and tree? I hope not.
Try this approach:
bind a hasOne association for tree to your forest model, give it a
different name than 'tree' e.g. "Charlie".
$onlyBrown = $this->Forest->findAll(array('Charlie.color' =>
'brown'));
pr ($onlyBrown); die;
hth,
AD
PS you don't bind to a controller
PPS Real class names etc. in future please.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---