/** * @return \yii\db\ActiveQuery */ public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id'])->joinWith('profile'); }
/** * @return \yii\db\ActiveQuery */ public function getUser() { return $this->hasOne(User::className(), ['id' => 'user_id']); }
/** * @return \yii\db\ActiveQuery */ public function getAuthor() { return $this->hasOne(User::className(), ['id' => 'author_id']); }