'Doctrine ODM(mongoDB) query command
I've a problem with executing Doctrine command:
php bin/console doctrine:mongodb:query "db.store.find({})"
and the result is:
Not enough arguments (missing: "query").
can anyone explain what is the correct way of providing a query to the command? In the documentation I can't find any examples.
Solution 1:[1]
Ok, I've managed to make it work.
For anyone interested, the correct format is:
php bin/console doctrine:mongodb:query App\\Document\\Store\\Store '{"name": "Store A"}'
where the first part is the name of a class, and the second one is a text query that can be decoded to a JSON.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ArturoO |
