need help

Hi!!!

the documentation is an example:

public function getRobotsParts($parameters=null) { return $this->getRelated('RobotsParts', $parameters); }

What is the format of an argument $parameters????

this parametrs for Phalcon\Mvc\Model::find , example (https://phalcon-php-framework-documentation.readthedocs.org/en/latest/reference/models.html?highlight=getRobotsParts#taking-advantage-of-relationships):

$robot = Robots::findFirst(2);

// Robots model has a 1-n (hasMany)
// relationship to RobotsParts then
$robotsParts = $robot->robotsParts;

// Only parts that match conditions
$robotsParts = $robot->getRobotsParts("created_at = '2012-03-15'");

// Or using bound parameters
$robotsParts = $robot->getRobotsParts(array(
    "created_at = :date:",
    "bind" => array("date" => "2012-03-15")
));


25.9k


25.9k

Does it work for hasOne relationship???