Hello I am having a Users friend model which belongs to User Model which
hasOne Profile, so:

UsersFriend(user_id, friend_id):
var $belongsTo = array('User' => array('foreignKey'=>'friend_id',
                                         'fields'=>array('User.id',
'User.uid', 'User.first_name',
                                                'User.last_name',
'User.picture_path')));

User:
var $hasOne = array('Profile' => array(
                            'className' => 'Profile',
                            'dependent' => true));

when i call paginate on UsersFriend:

$data = $this->paginate('UsersFriend',
                        array('UsersFriend.user_id'=>$user['User']['id']));

I dont get the user's friend's profile though a User hasOne association with
Profile. Any idea on how to do this?

Thanks.


-- 
Thanks & Regards,
Novice.

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