[COMPASS-5077] $unset template is incorrect Created: 08/Sep/21 Updated: 24/Feb/22 Resolved: 24/Feb/22 |
|
| Status: | Closed |
| Project: | Compass |
| Component/s: | Aggregation pipeline |
| Affects Version/s: | None |
| Fix Version/s: | 1.31.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Brian Leonard | Assignee: | Massimiliano Marcon |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Story Points: | 2 |
| Documentation Changes: | Not Needed |
| Description |
|
When adding an $unset stage, you are provided with the following template:
However, $unset expects an array of strings, not an object. So it should be:
|
| Comments |
| Comment by Rhys Howell [ 24/Feb/22 ] |
|
Fixed in |
| Comment by Massimiliano Marcon [ 09/Sep/21 ] |
|
Making this a COMPASS ticket. It's actually a string or array of strings, but yes, not an object. Docs here for reference: https://docs.mongodb.com/manual/reference/operator/aggregation/unset/#syntax. |