Closed
Description
Bug Report
Q | A |
---|---|
BC Break | no |
Version | 2.10.3 |
Summary
While working on my open source app I found out that scalar column hydration does not return any value, just empty array, when first element of the results is false-like (null, 0, ''…).
How to reproduce
Do something like this but without <> NULL
and <> ''
: https://github.com/TomaszGasior/RadioLista-v3/blob/8a2b4fa0d6d9fb85d83a36a00bd61d2031a1a8b3/src/Repository/RadioStationRepository.php#L68
Simplified example:
return $this->createQueryBuilder('radioStation')
->select('DISTINCT radioStation.'.$column)
->getQuery()
->getSingleColumnResult()
;
If first item from result set is false-like, empty array is returned.
Expected behavior
I would like to get all values from the column, even something like null, ''.
Adding false !==
to
false
for DBMS-es supporting it and how to support that case if it's needed.Metadata
Metadata
Assignees
Labels
No labels