[JAVA-1291] [Update] : the result "updatedExisting" is not correct Created: 23/Jun/14  Updated: 15/Oct/15  Resolved: 23/Jun/14

Status: Closed
Project: Java Driver
Component/s: Write Operations
Affects Version/s: 2.12.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Dong [X] Assignee: Ross Lawley
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Java Source File UpdateTest.java    

 Description   

I am using MongoDB 2.6.1 and mongo java driver 2.12.1.

When I use function “db.update(arg..)” to update a nonexistent document, the result is “

{ "serverUsed" : "localhost:27017" , "ok" : 1 , "n" : 0 , "updatedExisting" : true}

”, the “updatedExisting” is true , this is incorrect.

When I use mongo java driver 2.11.3, the result is correct.



 Comments   
Comment by Dong [X] [ 24/Jun/14 ]

Ok, I got it. Thank you.

Comment by Ross Lawley [ 23/Jun/14 ]

In the meantime please check the "n" value is greater than zero to ensure there was an update.

Comment by Ross Lawley [ 23/Jun/14 ]

Thanks Rambo this is a duplicate of JAVA-1287. A fix has been committed and it will be released in the next release of 2.12.x

Comment by Dong [X] [ 23/Jun/14 ]

java driver 2.12.2 also have this issue.

Generated at Thu Feb 08 08:54:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.