Is there a possibility to execute something like:
JavaScript
x
$builder = $this->getEntityManager()->createQueryBuilder();
$builder->select(
'f.id',
'NULL AS missing_attribute'
)
->from( , 'f')
;
And avoid:
JavaScript
DoctrineORMQueryQueryException: got 'NULL'
Advertisement
Answer
Workaround from https://github.com/doctrine/orm/issues/1670#issuecomment-591495663:
select NULLIF(1,1) AS ...
instead of NULL AS ...