Hello, as stated in the title i have two tables :
group_question AND question
question has a foreign key : id_group_question which points to the group_question_id
I then generated my models with phalcon-devtools and i have these two lines.
$this->hasMany('id', 'Question', 'id_group_question', ['alias' => 'Question']);
$this->belongsTo('id_group_question', 'GroupQuestion', 'id', ['alias' => 'GroupQuestion']);
And when i do :
$group_questions = GroupQuestion::find(); echo count($group_questions); // Works good, return 4 echo count($group_questions->question); // return 0 echo count($group_questions->question) // Doing this since in another post it's said that it doesn't return an arrray, but this doesn't work either
Not sure whats wrong here...