for the life of me, I can not find the answer to this problem. So, I'll ask here.
Let's say I have 3 document types in my mongo.
// provider
{
$id: ObjectId('xxx'),
"name": "some name",
}
// category
{
$id: ObjectId('yyy'),
"name": "some category"
}
// item
{
$id: ObjectId('zzz'),
"name": "some item",
"references": {
"provider": {
$ref: "provider",
$id: ObjectId('xxx')
},
"category": [
{
$ref: "category",
$id: ObjectId('yyy')
}
// etc etc, more referenced categories
]
}
}
Now, how would I annotate my Doctrine entity so I can read out and simply query the referenced objects. For clarity I really would like to keep all the external references within the "references" block.
Any help would be greatly appreciated.
Marc