Hi Sarah;
If your relationships are set up correctly and you have recursive >
-1, the usual 'find' method on User model should be returning the
parent 'Animal' anyway - what do you see if you put this in one of
your user controller functions:
$example = $this->User->find('first');
debug($example);
?

On Aug 28, 6:01 am, Sarah <sarah.e.p.jo...@gmail.com> wrote:
> This is my setup:
>
> A 'user' hasMany 'userpage's.
> A 'user' belongsTo an 'animal'.
>
> I would like to be able to display user information as well as some
> information about the user's animal on a userpage view.
>
> I perform a find query to get the userpage id, user_id, animal_id.
>
> Is there a way to search for Animal information as well?
> This won't work because of the last field, but this is conceptually
> what I want:
>
> 'fields'=>array('user_id', 'id', 'User.animal_id',
> 'User.Animal.frontfilename')
>
> Thanks in advance!
> ~Sarah
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to