When I run:
$this->createQueryBuilder('debtor')
->join('debtor.deals', 'deal')
->addSelect('...something... as closed_deals_count')
->getQuery()
->getSingleResult()
It results in the following structure:
array:3 [
0 => Debtor {...},
'closed_deals_count' => 0
]
How could I get a single Debtor record with 'closed_deals_count' in it instead of an array?