/** * @return \yii\db\ActiveQuery */ public function getTitles() { return $this->hasMany(Titles::className(), ['tag_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getTitle() { return $this->hasOne(Titles::className(), ['id' => 'title_id']); }