-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:Logical Issue
*Location*: https://docs.mongodb.com/manual/reference/operator/update/inc/
*User-Agent*: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
*Referrer*: https://www.google.co.in/
*Screen Resolution*: 1440 x 900
The following update() operation uses the $inc operator to decrease the quantity field by 2 (i.e. increase by -2) and increase the "metrics.orders" field by 1:
in small bracket quantity field should be (i.e. decrease by 2) :
The following update() operation uses the $inc operator to decrease the quantity field by 2 (i.e. decrease by -2) and increase the "metrics.orders" field by 1: