[SERVER-13749] Allow array of fields for $unset value Created: 25/Apr/14  Updated: 06/Dec/22  Resolved: 22/Jul/19

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Chandresh Maurya Assignee: Backlog - Query Team (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Assigned Teams:
Query
Participants:

 Description   

$unset operator follow syntax like this :
{$unset:{field: "irrelevant value"}} what is the use of this irrelevant value? (is it to maintain JSON format key:value)

shouldn't it have syntax something like {$unset:[field1, field2]} ..array of fields to unset without values and it will not be confusing anymore.

thanks



 Comments   
Comment by Asya Kamsky [ 22/Jul/19 ]

Version 4.2 introduced ability to use aggregation syntax in update, including the stage

{$unset:[ "field1", "field2", ... ] }

so I'm closing this ticket.

Generated at Thu Feb 08 03:32:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.