Contain is not grabbing my related model and I don't know why. Tried with
fields or without and still nothing.
 
public function getUser($auth_id)

 {
  $params = array(
        'conditions' => array(
                'User.id' => $auth_id),
        'fields' => array(
                'User.firstname',
                'User.lastname',
                'User.username',
                'User.email',
                'User.slug',
                'User.id',
                'User.reset',
                'User.confirm_code'),
        'contain' => array(
                'Profile' => array(
                        'conditions' => array(
                        'Profile.id' => $auth_id)))
);
        $data = $this->find('first', $params);
        return $data;
} 

Relation:
User model

var $hasOne = array(
        'Profile' => array(
                'className' => 'Profile',
                'foreignKey' => 'id',
                'dependent' => false
                )
        );

The Profile.id is the same as User.id

Any ideas or help would be great.

thanks

Dave

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