コード例 #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEmployees()
 {
     return $this->hasMany(Employee::className(), ['position_id' => 'position_id']);
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEmployee()
 {
     return $this->hasOne(Employee::className(), ['employee_id' => 'employee_id']);
 }
コード例 #3
0
 public function getEmployees()
 {
     return $this->hasMany(Employee::className(), ['department_id' => 'id']);
 }