how & where to define addHasMany relation ship
|
Sep '14 |
3 |
612 |
0 |
addHasMany is not an abstract method defined in interface model: https://docs.phalcon.io/en/latest/api/Phalcon_Mvc_ModelInterface.html#methods
sorry for mistake check link to see addHasMany method https://docs.phalcon.io/en/latest/api/Phalcon_Mvc_Model_Manager.html
<?php class Robots extends \Phalcon\Mvc\Model { public function initialize() { $this->_modelsManager->addHasMany($this, 'id', 'RobotsParts', 'robots_id', null); } }
getting error
[Wed, 10 Sep 14 10:21:35 +0200][ERROR] [2] Phalcon\Mvc\Model\Manager::addHasMany(): phalcon_get_class expects an object ( Line: [99])