doctrine mongodb native query

Solutions on MaxInterview for doctrine mongodb native query by the best coders in the world

showing results for - "doctrine mongodb native query"
Aminata
29 Jul 2017
1/** @var DocumentManager $documentManager */
2$documentManager = $this->container
3	->get('doctrine_mongodb')
4	->getManager();
5
6$mongoClient = $documentManager->getConnection()->getMongoClient();
7
8$db = $mongoClient->selectDB('dbname');
9
10$collection = $mongoClient->selectCollection($db, 'collectionName');
11$results = $collection->find();