-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
The following exception occurs when using toIterable
on a query generated by a repository query builder:
Argument 1 passed to Doctrine\ORM\Internal\Hydration\AbstractHydrator::toIterable() must implement interface Doctrine\DBAL\Driver\Statement, instance of Doctrine\DBAL\ForwardCompatibility\Result given, called in /var/www/some-project/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php on line 1010
The code line triggering this exception is as follows:
$userIterator = $this->userRepository->createQueryBuilder('u')->getQuery()->toIterable();
This started after upgrading this library from 1.12.1 to 1.13.0. It looks like the following line is the cause of this:
dbal/lib/Doctrine/DBAL/Connection.php
Line 1313 in 79a6a84
return $this->ensureForwardCompatibilityStatement($stmt); |
Which triggers the exception finally in ORM in the AbstractQuery
, where the toIterable
doesn't receive the statement object it expects.
For me it looks like the ForwardCompatibilty
isn't fully compatible with the statement object returned previously, so it would seem to be it needs to be fixed here? If that is not the case and this issue needs to be opened on the ORM repository, just say the word!