コード例 #1
0
ファイル: Sport.php プロジェクト: snezbritskiy/lift-fortress
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEventsSets()
 {
     return $this->hasMany(EventsSet::className(), ['sport_id' => 'id'])->inverseOf('sport');
 }
コード例 #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEventsSet()
 {
     return $this->hasOne(EventsSet::className(), ['id' => 'events_set_id']);
 }