[SERVER-7407] Adjust the behavior of $unset for nested arrays Created: 18/Oct/12 Updated: 09/Jul/16 Resolved: 27/Jul/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alberto Lerner | Assignee: | Alberto Lerner |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Major Change | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently, the semantics of $unset is ambiguous when arrays are involved. For instance, the following returns {a:[]}start: { a : [] }update: { $unset : { "a.0" : 1 }} But the following returns {a:[null]}start: { a : ['abc'] }update: { $unset : { "a.0" : 1 }} We'd like the $unset semantics to be that of setting a position to null, when the target of the unset is an array's element. |