Issue Bug Closed

#80781QueryResult in conjunction with \Doctrine\DBAL\Statement returns "Call to a member function fetchAll() on boolean" when converting as array

Martin Born 04/10/17, 11:25 updated 10/17/17, 23:29

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();

Reviews 1