/** * @return \yii\db\ActiveQuery */ public function getAnswer() { return $this->hasOne(QuizAnswer::className(), ['id' => 'answerID']); }
/** * @return \yii\db\ActiveQuery */ public function getAnswers() { return $this->hasMany(QuizAnswer::className(), ['quizID' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getAnswers() { return $this->hasMany(QuizAnswer::className(), ['quizID' => 'id'])->where(['deleted' => 0]); }