SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...ct AS a__external_object FROM amvc_items a WHERE (a.parent_i... ^