[SERVER-9082] JSON parser doesn't accept simple DBRef $id values, like ints or strings Created: 22/Mar/13 Updated: 11/Jul/16 Resolved: 29/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | 2.4.0 |
| Fix Version/s: | 2.4.2, 2.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Thomas Rueckstiess | Assignee: | Shaun Verch |
| Resolution: | Done | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| 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: These should be valid objects:
But they both fail. |
| Comments |
| Comment by auto [ 29/Mar/13 ] |
|
Author: {u'date': u'2013-03-28T14:41:57Z', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}Message: |
| Comment by auto [ 29/Mar/13 ] |
|
Author: {u'date': u'2013-03-28T14:41:57Z', u'name': u'Shaun Verch', u'email': u'shaun.verch@10gen.com'}Message: |
| Comment by Scott Hernandez (Inactive) [ 27/Mar/13 ] |
|
It has been fixed but not backported nor deployed: |
| Comment by Shaun Verch [ 27/Mar/13 ] |
|
The docs at http://docs.mongodb.org/manual/reference/mongodb-extended-json/ should also be updated to reflect the correct specification for DBRef. |