Exemple #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVotes()
 {
     return $this->hasMany(Vote::className(), ['election_id' => 'id']);
 }
Exemple #2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVotes()
 {
     return $this->hasMany(Vote::className(), ['created_by' => 'id']);
 }
Exemple #3
0
 public function getVotes()
 {
     return $this->hasMany(Vote::className(), ['id' => 'vote_id'])->viaTable('vote_option', ['option_id' => 'id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVote()
 {
     return $this->hasOne(Vote::className(), ['id' => 'vote_id']);
 }
Exemple #5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getVote()
 {
     //return $this->hasMany(Vote::className(), ['code_id' => 'id']);
     return $this->hasOne(Vote::className(), ['code_id' => 'id']);
 }