We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to launch the QueryCommand; I get this error:
bin/console odm:query User {} PHP Fatal error: Call to a member function hydrate() on a non-object in /blabla/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/QueryCommand.php on line 83 PHP Stack trace: PHP 1. {main}() /blabla/bin/console:0 PHP 2. Symfony\Component\Console\Application->run() /blabla/bin/console:33 PHP 3. Symfony\Component\Console\Application->doRun() /blabla/vendor/symfony/console/Symfony/Component/Console/Application.php:121 PHP 4. Symfony\Component\Console\Application->doRunCommand() /blabla/vendor/symfony/console/Symfony/Component/Console/Application.php:191 PHP 5. Symfony\Component\Console\Command\Command->run() /blabla/vendor/symfony/console/Symfony/Component/Console/Application.php:881 PHP 6. Doctrine\ODM\MongoDB\Tools\Console\Command\QueryCommand->execute() /blabla/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241 Fatal error: Call to a member function hydrate() on a non-object in /blabla/vendor/doctrine/mongodb-odm/lib/Doctrine/ODM/MongoDB/Tools/Console/Command/QueryCommand.php on line 83 Call Stack: 0.0055 645624 1. {main}() /blabla/bin/console:0 0.0370 5877248 2. Symfony\Component\Console\Application->run() /blabla/bin/console:33 0.0419 6464952 3. Symfony\Component\Console\Application->doRun() /blabla/vendor/symfony/console/Symfony/Component/Console/Application.php:121 0.0423 6464952 4. Symfony\Component\Console\Application->doRunCommand() /blabla/vendor/symfony/console/Symfony/Component/Console/Application.php:191 0.0424 6465120 5. Symfony\Component\Console\Command\Command->run() /blabla/vendor/symfony/console/Symfony/Component/Console/Application.php:881 0.0433 6466096 6. Doctrine\ODM\MongoDB\Tools\Console\Command\QueryCommand->execute() /blabla/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:241
Possible fix:
replace line 81
$cursor = $dm->getRepository($input->getArgument('class'))->findBy((array) $query);
with
$cursor = $dm->getRepository($input->getArgument('class'))->createQueryBuilder()->setQueryArray((array) $query)->getQuery()->execute();
The text was updated successfully, but these errors were encountered:
faf7342
@emri99: Thanks for reporting this. Please let me know if the referenced PR fixed your issue.
Sorry, something went wrong.
No branches or pull requests
Unable to launch the QueryCommand; I get this error:
Possible fix:
replace line 81
with
The text was updated successfully, but these errors were encountered: