#80781QueryResult in conjunction with \Doctrine\DBAL\Statement returns "Call to a member function fetchAll() on boolean" when converting as array
Description
The code below leads to an exception in \TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbBackend in line 380:
$connection = $this->objectManager->get(ConnectionPool::class)->getConnectionForTable('tx_myext_domain_model_record');
$statement = $this->objectManager->get(
\Doctrine\DBAL\Statement::class,
'select * from tx_myext_domain_model_record',
$connection
);
$query = $this->createQuery();
$query->statement($statement);
$query->execute(true);
or
$result = $query->execute(); $result->toArray();