I have created a test.
the bug may be in \Doctrine\ORM\Internal\Hydration\AbstractHydrator at line 246.
i think...
remove
if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) || $value !== null) {
and replace with :
if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value !== null) {
this will fix the bug
I have created a test.
the bug may be in \Doctrine\ORM\Internal\Hydration\AbstractHydrator at line 246.
i think...
remove
if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) || $value !== null) {
and replace with :
if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value !== null) {
this will fix the bug