We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

problem of getBelongsTo

i'm using 0.9.x

a model with two belongsTo : public function initialize() {
$this->belongsTo("student_id", "Account", "id", array('alias' => 'StudentData')); $this->belongsTo("coach_id", "Account", "id"), array('alias' => 'CoachData'); }

getBelongsTo( ) return Array ( [Account] => Array ( [fi] => student_id [rt] => Account [rf] => id [op] => Array([alias] => StudentData) ) ) coach_id is disappear, It should be like Array ( [Account] => Array( ( [fi] => student_id [rt] => Account [rf] => id [op] => Array([alias] => StudentData) ), ( [fi] => coach_id [rt] => Account [rf] => id [op] => Array([alias] => CoachData) ) )



98.9k

Hi, forum is not intended to report bugs, could you please post this on Github? https://github.com/phalcon/cphalcon/issues

of course, thank u :)