/** * Meta relation. * @return \yii\db\ActiveQuery */ public function getMeta() { return $this->hasOne(Meta::className(), ['user_id' => 'id']); }
/** * Sets relation with Meta. * @return \yii\db\ActiveQuery */ public function getMeta() { return $this->user->hasOne(Meta::className(), ['user_id' => $this->getId()]); }