DBRef's with extra field fail

Marijn Otte shared this problem 6 years ago
Solved

We have DBRef's with an extra field:

"references" : [
    "$ref": "content",
    "$id": "cf31cc2eca8030b18fb0c2d6c474d30b",
    "$db": "localhost",
    "class": "Integrated\\Bundle\\ContentBundle\\Document\\Content\\Taxonomy"
]
We use Doctrine ODM, which adds the class field because we use multiple classes for one collection.


In NoSQLbooster this is displayed as:

"references" : [
    DBRef("content", "cf31cc2eca8030b18fb0c2d6c474d30b", "localhost")
]
When editing or copying data with this DBref, the "class" field is lost (and the document does not work with our application any more).

Leave a Comment
 
Attach a file