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

Does hasMany support more than one column?

$this->hasMany("id,type", "RobotsParts", "robots_id, robots_type");



3.2k
Accepted
answer
edited Jul '14

Try this:

    $this->hasMany(array("id", "type"), "RobotsParts", array("robots_id", "robots_type"));