I am trying to add a mapping information in Symfony2 using MongoDB as shown here : http://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html [at the Adding Information section] But what I want to do is to add an embedded documents as well. Here is a part of my document with embedded documents :
"_id" : "",
"last_name" :,
"first_name" : "",
"address" : [
{
"Street" : "",
"City" : "",
"Zip_Code" : "",
"Country": ""
}
],
"company" : ""
"purshaed_items" : [
{
"items_id" : "",
"category":"",
"price":"",
"date_of_purshae"
}
]
So as you can see I have the fields "Address" & "Purshaed_items" that are embedded documents. I found this link http://doctrine-orm.readthedocs.org/projects/doctrine-mongodb-odm/en/latest/reference/embedded-mapping.html I guess that my case will be the "Embed Many" but didn't really get how it works?
Can someone please try to explain how it works?
Thank you