/** * @return \yii\db\ActiveQuery */ public function getProfessions() { return $this->hasMany(Profession::className(), ['id' => 'profession_id'])->viaTable(ResumeProfession::tableName(), ['resume_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getProfession() { return $this->hasOne(Profession::className(), ['id' => 'profession_id']); }
/** * @return \yii\db\ActiveQuery */ public function getProfessions() { return $this->hasMany(Profession::className(), ['user_id' => 'id']); }