I need to construct DQL with a QueryBuilder like this
QueryBuilder
[QUERY]... AND WHERE e.type = x OR e.type = Y OR e.type = N [...]
I hav
@DEY his answer can be simplified. No need for the foreach, this also works:
$conditions = array('e.type = x', 'e.type = Y', 'e.type = N'); $orX = $qb->expr()->orX(); $orX->addMultiple($conditions); $qb->where($orX);