Details
-
Improvement
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Optimization
-
0
Description
It isn't possible to insert a document with a $ref key at the top-level, so there's no way for the query to ever match anything.
> db.mycoll.insert({$ref: 'mycoll', $id: 1})
|
WriteResult({
|
"nInserted" : 0,
|
"writeError" : {
|
"code" : 2,
|
"errmsg" : "Document can't have $ prefixed field names: $ref"
|
}
|
})
|