Is it possible to use OR
statement in Doctrine findBy()
method?
I know that given array is interpreted as case1 AND case2...
Like this
As far as I know this is not a supported feature by Doctrine to use IN() queries with findby. You could do two things:
Implement a findByStatus(array $statusTypes)
method in your (custom) 'notif' repository class. If you like this approach I can give you a example.
Convert your findBy to the following:
$qb = $this->repos['notif']->createQueryBuilder('n');
$data = $qb->where($qb->expr()->in('status', array(1,2,3)))->getQuery()->getResult();
That should work either :)