Details
-
Bug
-
Resolution: Done
-
Major - P3
-
2.4.0
-
None
-
Minor Change
-
ALL
Description
It's hard to find any documentation on DBRefs.
But I believe the intention is that the $id field can be anything that can be stored as _id.
The JSON parser however insists that it is a quoted 24 char hex string, or "ObjectId(...)".
See:
https://github.com/mongodb/mongo/blob/master/src/mongo/db/json.cpp#L663
https://github.com/mongodb/mongo/blob/master/src/mongo/db/json.cpp#L467
These should be valid objects:
fromjson("{myref:DBRef('coll',1)}")
|
fromjson("{myref:{$ref:'coll',$id:1}}")
|
But they both fail.
Attachments
Issue Links
- is duplicated by
-
SERVER-9045 mongoimport doesn't accept dbref
-
- Closed
-