/** * @return \yii\db\ActiveQuery */ public function getEventsSets() { return $this->hasMany(EventsSet::className(), ['sport_id' => 'id'])->inverseOf('sport'); }
/** * @return \yii\db\ActiveQuery */ public function getEventsSet() { return $this->hasOne(EventsSet::className(), ['id' => 'events_set_id']); }