Is there a possibility to execute something like:
$builder = $this->getEntityManager()->createQueryBuilder();
$builder->select(
'f.id',
...
'NULL AS missing_attribute'
)
->from(..., 'f')
...;
And avoid:
Doctrine\ORM\Query\QueryException: ... got 'NULL'
Workaround from https://github.com/doctrine/orm/issues/1670#issuecomment-591495663:
select NULLIF(1,1) AS ...
instead of NULL AS ...
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