According to the documentation of “Working with Objects via PHP API” I tried to set an IN condition for an DataObject listing like this:
$entries = new DataObject\Test\Listing(); $entries->setCondition("`oo_id` IN (:ids)", ["ids" => [123, 456, 789]]);
Because I was not getting any objects, I was checking my MySQL server logs and found this query executed:
SELECT object_test.o_id as o_id, `object_test`.`o_type` FROM `object_test` WHERE ((`oo_id` IN ('Array') AND object_test.o_type IN ('object','folder')) AND object_test.o_published = 1) ORDER BY `title` ASC LIMIT 30
If you check the condition, you see
oo_id IN (‘Array’), so I assume that there is a problem with setting the array of ids in the condition.
Is this a know issue or is this the expected behavior?
For the record: I’m using Pimcore Version: v5.7.1