Project

General

Profile

Actions

Bug #80781

closed

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

Added by Martin Born over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2017-04-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

Files

Actions

Also available in: Atom PDF