Category: mongodb

Symfony Api Platform 400 Not Found Error While doing default item operations with MongoDB ODM

I would like to do default item crud operations with odm. I did with ORM it was okay but I have problems with ODM. I created project in terminal with composer composer create-project symfony/skeleton bookshop-api Installed the API Platform’s server…

Attempted to call an undefined method named "allowDiskUse" of class "DoctrineODMMongoDBAggregationBuilder

I am trying to get last purchases with item, location and batch. So I tried to get ids of each by grouping. I can’t use group command because it is huge data and can not be handle by group command….

Symfony Warning: filemtime(): stat failed

it’s an update form, if i try to update the first time it works but the second time i got this error: Warning: filemtime(): stat failed for project-path/vendor/ocramius/proxy-manager/src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php(54) : eval()’d code and the exception is catched here: $form->handleRequest($request); What i…

mongoDB custom query not working with symfony mongo client

I m trying to get a result from MongoDB custom query via the use of mongo-client in Symfony. Controller Code: $query = “db.User.find({}).toArray()”; $client = new MongoClient(“mongodb://ravi.d:[email protected]:27017”); $db = $client->selectDB(“Demo”); $result = $db->execute($query); In my local machine, they give me…