OK so I read this: https://forum.phalcon.io/discussion/3469/modelfindcol-in-with-bind
and it appears that as of 2.0 Phalcon supports binding using an "in" clause. I have two models, model A and model B, which are related:
class A
{
public function initialize(){
parent::initialize();
$this->hasMany("id","B","a_id",array("alias"=>"myA"));
...
}
$field1;
}
in a controller:
$result = A->getMyA(array("conditions"=>"field1 in (:param:)","bind"=>array("param"=>array(1,2,3))));
And I get this error: "SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens"
What am I doing wrong?