/** * @return \yii\db\ActiveQuery */ public function getSchool() { return $this->hasOne(School::className(), ['id' => 'location_id'])->via('room'); }
/** * @return \yii\db\ActiveQuery */ public function getSchool() { return $this->hasOne(School::className(), ['id' => 'school_id']); }
/** * @return \yii\db\ActiveQuery */ public function getSchools() { return $this->hasMany(School::className(), ['cityId' => 'id']); }