Closed
Description
getOneOrNullResult() and getSingleResult() are supported, but only when explicitly specifying the hydration mode
It was stated here that this should be supported, but it seems like the inferred type is mixed. Or did I misunderstood?
$query = $em->createQueryBuilder()
->addSelect('m.id')
->from(Many::class, 'm');
assertType(
'int',
$query->getQuery()
// ->getSingleScalarResult()
->getSingleResult(Query::HYDRATE_SINGLE_SCALAR)
);
Method getSingleColumnResult seems to be not supported as well, is that correct?
cc @arnaud-lb
Metadata
Metadata
Assignees
Labels
No labels