[SERVER-134] $unset (was: $unset and $rename) Created: 08/Jul/09 Updated: 12/Jul/16 Resolved: 11/Dec/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | None |
| Fix Version/s: | 1.3.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Kristina Chodorow (Inactive) | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 20 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
Right now, you can only do a $set on an update. It would be helpful to be able to delete or rename a field as well. |
| Comments |
| Comment by auto [ 11/Dec/09 ] |
|
Author: {'name': 'Mathias Stearn', 'email': 'mathias@10gen.com'}Message: $unset support in update. |
| Comment by Mathias Stearn [ 28/Oct/09 ] |
|
Splitting to two issues. If you want $reduce, watch or vote for http://jira.mongodb.org/browse/SERVER-394 |
| Comment by Wouter [ 01/Sep/09 ] |
|
Please make $unset compatible with arrays aswell, so that I can unset a value in an array based on it's key: $unset : { 'comments.5' : TRUE } |
| Comment by Wouter [ 08/Jul/09 ] |
|
I would like $unset/$rename too. Let's say we have { _id : 1, toberemoved : 'hello', dontremove : 'world' }
1) $db.foo.save( { _id : 1, dontremove : 'world' }); 2) $db.foo.update( { _id : 1, toberemoved : 'hello', dontremove : 'world' }, { _id : 1, dontremove : 'world' } ); 3) $db.foo.update( { _id : 1 }, { $unset : { toberemoved : 1 } } ); |