public function getProfile() { return $this->hasOne(\app\modules\user\models\Profile::className(), ['user_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getProfiles() { return $this->hasMany(Profile::className(), ['user_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getProfile() { return $this->hasOne(Profile::className(), ['userID' => 'id']); }
public function getProfile() { return $this->hasMany(Profile::className(), ['uid' => 'id'])->andWhere(['target_type' => Profile::TYPE]); }