The Open Orchestra model bundle
Service | Badge |
---|---|
Travis | |
Sensio insight | |
Code Climate (Quality) | |
Code Climate (Code coverage) | |
Latest Stable Version | |
Total Downloads |
Once you have installed the bundle, you should activate the aggregator query bundle also in the AppKernel::registerBundles() :
new OpenOrchestra\ModelBundle\OpenOrchestraModelBundle(),
new Solution\MongoAggregationBundle\SolutionMongoAggregationBundle(),
This will allow you to create aggregation query in your repositories by using the method :
AbstractRepository::createAggregationQuery()
With the aggregation, mongo does not return the original document, but by using the $$ROOT
parameter, you can add all
the fields of the document to the response.
To hydrate all the documents using the database result, use the method :
AbstractRepository::hydrateAggregateQuery()