[SERVER-9693] Impossible to select a subdocument with blank field name ( "" ) Created: 15/May/13 Updated: 20/Aug/14 Resolved: 20/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying, Shell |
| Affects Version/s: | 2.4.3 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tommaso Urli | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Possibly all. |
||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: | 1. Insert (e.g. through pymongo) a document containing a subdocument with an empty key field. |
||||||||||||
| Participants: | |||||||||||||
| Description |
|
Situation: some MongoDB documents have subdocuments that contain an empty key, e.g. (I stripped ObjectIDs to make the code look nicer):
The problem is line: "" : "../instances/comp/comp20.ectt" it is impossible to get back the value of the field. Querying doesn't work: db.experiments.find( {"batch": ObjectId("...")}, { "parameters.": 1 }) gets the full content of the parameters subdocument. (My guess is that "." is probably ignored if followed by an empty selector.) From the JSON specification (15.12.*) it looks like empty keys are allowed. |
| Comments |
| Comment by Thomas Rueckstiess [ 20/Aug/14 ] |
|
Resolving this as a duplicate of SERVER-6852. |