Skip to content

Commit

Permalink
Add relation from survey to questions (if you don't want to fetch all…
Browse files Browse the repository at this point in the history
… groups)
  • Loading branch information
olleharstedt committed Jun 14, 2021
1 parent 9ad0df6 commit aa2aba5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions application/models/Survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ public function relations()
'correct_relation_defaultlanguage' => array(self::HAS_ONE, 'SurveyLanguageSetting', array('surveyls_language' => 'language', 'surveyls_survey_id' => 'sid')),
'owner' => array(self::BELONGS_TO, 'User', 'owner_id',),
'groups' => array(self::HAS_MANY, 'QuestionGroup', 'sid', 'order' => 'groups.group_order ASC'),
'questions' => array(self::HAS_MANY, 'Question', 'sid', 'order' => 'questions.qid ASC'),
'quotas' => array(self::HAS_MANY, 'Quota', 'sid', 'order' => 'name ASC'),
'surveymenus' => array(self::HAS_MANY, 'Surveymenu', array('survey_id' => 'sid')),
'surveygroup' => array(self::BELONGS_TO, 'SurveysGroups', array('gsid' => 'gsid')),
Expand Down

0 comments on commit aa2aba5

Please sign in to comment.