/** * @return \yii\db\ActiveQuery */ public function getDeptNo() { return $this->hasOne(\giiant\sakila\models\Departments::className(), ['dept_no' => 'dept_no']); }
/** * @return \yii\db\ActiveQuery */ public function getDeptNos0() { return $this->hasMany(\giiant\sakila\models\Departments::className(), ['dept_no' => 'dept_no'])->viaTable('dept_manager', ['emp_no' => 'emp_no']); }