/** * @return \yii\db\ActiveQuery */ public function getPersons() { return $this->hasMany(Persons::className(), ['organization_id' => 'organization_id']); }
/** * @return \yii\db\ActiveQuery */ public function getPerson() { return $this->hasOne(Persons::className(), ['person_id' => 'person_id']); }