[SERVER-29676] arrayToObject should not error out on explicit value of null for value Created: 15/Jun/17 Updated: 30/Oct/23 Resolved: 22/Jun/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.5.6 |
| Fix Version/s: | 3.4.6, 3.5.10 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Tess Avitabile (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Minor Change | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v3.4
|
||||
| Sprint: | Query 2017-07-10 | ||||
| Participants: | |||||
| Description |
|
If my object is o:{ "foo": null } and {$objectToArray:"$o"} converts it to {k:"foo",v:null} then $arrayToObject must be able to convert it back to the object, but instead it gives the error:
Explicit null is a different type than missing, so we're probably checking for "nullish" when we should be checking for "missing". |
| Comments |
| Comment by Githook User [ 27/Jun/17 ] |
|
Author: {u'username': u'sindbach', u'name': u'Wan Bachtiar', u'email': u'sindbach@gmail.com'}Message: Closes #1158 Signed-off-by: Tess Avitabile <tess.avitabile@mongodb.com> |
| Comment by Githook User [ 22/Jun/17 ] |
|
Author: {u'username': u'sindbach', u'name': u'Wan Bachtiar', u'email': u'sindbach@gmail.com'}Message: Closes #1158 Signed-off-by: Tess Avitabile <tess.avitabile@mongodb.com> |
| Comment by Asya Kamsky [ 15/Jun/17 ] |
|
I believe the test on this line: should be !value.missing() and not !value.nullish() |