I want to make a findBy
in doctrine with the IN
-Operator, like in SQL:
...WHERE column_name IN (value1,value2,...);
Is it possible to do this in the criteria array of the entity-repository's findBy
?
this->entityRepository->findBy($criteria, $orderBy, $limit, $offset);
Or must I do this with DQL?
Yes, you can!
$repository->findBy(['column_name' => ['value1', 'value2', '...']]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With