I need help with translation MySQL to Doctrine query.
There is a query what I want to translate:
SELECT izo_order.id
FROM izo_order
WHERE izo_order.id
NOT IN (SELECT izo_installation.order_id
FROM izo_installation
WHERE izo_installation.order_id=izo_order.id)
AND izo_order.client_id = 4
I did something like that, but it seems not to work:
$qb = $this->_em->createQuery('SELECT o
FROM AppBundle:Order o
WHERE o.id
NOT IN (SELECT i.order
FROM AppBundle:Installation i
WHERE i.order=o.id)
AND o.clientBelongsTo = :client_id')->setParameter('client_id', $client_id);
return $qb->getResult();