Does someone know where I can find some informations about Mongodb QueryBuilder in Symfony2 please? Maybe some examples or some tutorials. I googled the question but didn't find something good enough.. More specifically I want to retrieve a field in a document based on the embedded document. Here is an example of document :
{
"name":"Foo",
"age":"25",
"gender":"Male",
"products":[
{
"name":"Apple",
"price":"12.00",
"date":"2015-12-02"
},
{
"name":"Banana",
"price":"9.00",
"date":"201-11-31"
},
]
}
And I want to retrieve the name "Foo" based on the date in products array. At the moment I use distinct() to list all fields in products.