[JAVA-1149] $inc operator not supported with $set operation in update Created: 19/Mar/14 Updated: 11/Sep/19 Resolved: 19/Mar/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Write Operations |
| Affects Version/s: | 2.11.4 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Divya Jain | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | driver | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Description |
|
I am trying to do an $inc operator from within the $set operation. db.S_M_users.update( { "sni" : 4 , "ki" : 0 , "ts" : 1184437800000, "snun" : "Amazon"}, , $inc : { "oc" : 1}},true,false) But when I try to form the same query through java driver using update method it gets created like : updateCriteria: }} DB db = client.getDB("S_M_users"); db.S_M_users.update( { "sni" : 4 , "ki" : 0 , "ts" : 1184437800000 , "snun" : "Lorem ipsum dolor"}, }},true,false) And in java driver I get following exception: , "connectionId" : 19680328 , "ok" : 1.0} There should be a way to use $inc from within a set operation using Java Driver |
| Comments |
| Comment by Gianfranco Palumbo [ 19/Mar/14 ] |
|
Closing this a duplicate |