示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getScorecards()
 {
     return $this->hasMany(Scorecard::className(), ['practice_id' => 'id']);
 }
示例#2
0
 /**
  * Returns scorecards for this competition. Ignore registered non-participant.
  *
  * @return \yii\db\ActiveQuery
  */
 public function getScorecards()
 {
     return $this->hasMany(Scorecard::className(), ['registration_id' => 'id'])->viaTable('registration', ['competition_id' => 'id']);
     //return Scorecard::find()->where(['registration_id' => $this->getRegistrations()->select('id')]);
 }
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getScorecard()
 {
     return $this->hasOne(Scorecard::className(), ['id' => 'scorecard_id']);
 }
示例#4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getScorecards()
 {
     return $this->hasMany(Scorecard::className(), ['id' => 'scorecard_id'])->viaTable('score', ['hole_id' => 'id']);
 }
示例#5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getScorecards()
 {
     return $this->hasMany(Scorecard::className(), ['registration_id' => 'id']);
 }