My problem is the following: I have a mongo database which stores such objects
{
"name":"Accord Neo",
"number_of_photos":"3",
"id":"accord_neo",
"description":"Very comfortable sofa.",
"details": {
"chair_is": false,
"Sofa_bed": "delfin",
"Structure_configuration": "corner"
},
"properties":[
{
"property":"2-У-1",
"value":"2150 X 1550 X 880"
},
{
"property":"Sleeping place",
"value":"2150 X 1550 X 880"
}
]
}
I need to retrieve these objects in Symfony2 using Doctrine Mapping Types and the problem is that I don't understand how to create my Custom Classes for Mapping for the field "details" and the field "properties". I tried to make analogy from the official website of doctrine http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/reference/basic-mapping.html#custom-mapping-types but I still don't undertand how it works and how it should be implemented in my case.