2

Somehow it must be possbile to generate a result when DBReferences are resolved and the value of the referenced object is given back together whit the original object.

example: first object has a reference

{
"_id" : ObjectId("53bd526a5894ca07e60ca414"),
"name": "The name"
"labelnames" : {

    "de" : {
        "$ref" : "nameList",
        "$id" : ObjectId("53bd526a5894ca07e60ca41c")
    }
}
}

Second objects stores the value

{
"_id" : ObjectId("53bd526a5894ca07e60ca41c"),
"lang" : "de",
"labelNameMap" : {
    "9d96cd10-d27f-4579-9f6e-9fd8d9f9c683" : {
        "value" : "the value"
    }
}
}

The result should be: {name: "The name", value: "the value} With SQL it would be a join, how ist this done in MongoDB?

Roland Kofler
  • 1,332
  • 1
  • 16
  • 33

0 Answers0