diff --git a/Helper/AclHelperAgent.php b/Helper/AclHelperAgent.php index 97ec65f..991d04d 100644 --- a/Helper/AclHelperAgent.php +++ b/Helper/AclHelperAgent.php @@ -88,11 +88,13 @@ public function findBy( ; if (!empty($criteria)) { - $predicates = []; + $predicates = $builder->expr()->andX(); foreach ($criteria as $field => $criterion) { - $predicates[] = is_array($criterion) + $predicates->add( + is_array($criterion) ? $builder->expr()->in("e,$field", ":$field") - : $builder->expr()->eq("e.$field", ":$field"); + : $builder->expr()->eq("e.$field", ":$field") + ); $builder->setParameter(":$field", $criterion); }