[DOCS-3967] Comment on: "manual/reference/operator/update/inc.txt" Created: 02/Sep/14 Updated: 16/Mar/15 Resolved: 10/Sep/14 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual |
| Affects Version/s: | None |
| Fix Version/s: | v1.3.11 |
| Type: | Improvement | Priority: | Blocker - P1 |
| Reporter: | Ian Bentley | Assignee: | Tim Slavin |
| Resolution: | Done | Votes: | 0 |
| Labels: | collector-298ba4e7 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Location: http://docs.mongodb.org/master/reference/operator/update/inc/#up._S_inc |
||
| Participants: | |
| Days since reply: | 9 years, 22 weeks, 6 days ago |
| Description |
|
This page should probably mention what the behaviour of $inc is if the field doesn't exist. Also, no mention of how it works with findAndModify? |
| Comments |
| Comment by Githook User [ 11/Sep/14 ] |
|
Author: {u'username': u'TimSlavinMongoDB', u'name': u'Tim Slavin (MongoDB)', u'email': u'tim.slavin@10gen.com'}Message: Signed-off-by: Sam Kleinman <samk@10gen.com> |
| Comment by Scott Hernandez (Inactive) [ 08/Sep/14 ] |
|
The second sentence of the first paragraph says: {bq}If the field does not exist, $inc adds the field and sets the field to the specified amount.{bq} Not sure there is any value in mentioning findAndModify since it follow the rules of update, which is stated elsewhere – it is just an update that returns a document. |