/** * @return \yii\db\ActiveQuery */ public function getHole() { return $this->hasOne(Hole::className(), ['id' => 'hole_id']); }
/** * @return \yii\db\ActiveQuery */ public function getHoles() { return $this->hasMany(Hole::className(), ['id' => 'hole_id'])->viaTable('score', ['scorecard_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getHoles() { return $this->hasMany(Hole::className(), ['tees_id' => 'id']); }