-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Environment:OS:
node.js / npm versions:
Additional info:
There are 2 bugs to fix here:
1. v.oid.toString() is always wrapped in single quotes, so any non-string oid round-trips into a string:
- DBRef('col', ObjectId('5e5ea7558d35931a05eafec0')) becomes DBRef('col', '5e5ea7558d35931a05eafec0') an ObjectId becomes a string, which is the common case and will not match the same documents.
- DBRef('col', 1) → DBRef('col', '1')
2. No escaping in collection/db. DBRef("it's", 1) → DBRef('it's', '1'), which is syntactically broken and unparseable. JSON.stringify(v.collection) would handle it (as Code and RegExp already do in the same file).
- related to
-
COMPASS-10957 DBRef "$ref" containing dots gets split and stored as "$db"
-
- Backlog
-