/** * @return \yii\db\ActiveQuery */ public function getDegree() { return $this->hasOne(Degree::className(), ['id' => 'degree_id']); }
public function getDegrees() { return $this->hasMany(Degree::className(), ['id' => 'degree_id'])->viaTable('student_profile', ['project_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getDegrees() { return $this->hasMany(Degree::className(), ['faculty_id' => 'id']); }