get errors or nothing at all?
Just to compare your two finds, could you remove User,
RegistrationLocation and Activity from the second find and retry!
Enjoy,
John
On Feb 25, 9:22 am, "Arak Tai'Roth" <nielsen.dus...@gmail.com> wrote:
> So I've been searching for a solution to my problem for a little while
> now. However everything I find seems to imply that what I am doing is
> correct, so I am rather confused about this at the moment. Likely it's
> something simple, but I'm sure as heck not seeing it.
>
> I have a model named Leader, which belongsTo Country and ProvState.
> When I retrieve Leader information, I also want to get info on Country
> and ProvState. I also have a model Permit, which belongsTo Leader.
>
> I am using Containable, and it is in app_model.
>
> This find call works properly and retrieves everything from Leader,
> Country, and ProvState properly.
> $dbleader = $this->Leader->find('first', array(
> 'conditions' => array(
> 'Leader.id' => $id
> ),
> 'contain' => array(
> 'Country', 'ProvState'
> )
> ));
>
> However, this does not:
> $dbpermit = $this->Permit->find('first', array(
> 'conditions' => array(
> 'Permit.id' => $id
> ),
> 'contain' => array(
> 'Leader' => array('Country', 'ProvState'), 'User',
> 'RegistrationLocation', 'Activity'
> )
> ));
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 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:
Post a Comment