Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.12.1
-
None
-
None
Description
I use Mongodb 2.6.1.
Reproduce steps:
1. used Mongdb command db.test.insert({item:'a',qty:12}) to create a document.
2. use command `db.test.aggregate({$match:{qty:12}})` to query document, the result is:
{ "_id" : ObjectId("53b9fcd6a50ca592c6e34b34"), "item" : "a", "qty" : 12 }
|
3. use java api function “dbCollection.aggregate(args…)” to query document, the result is
{ "_id" : { "$oid" : "53b9fcd6a50ca592c6e34b34"} , "item" : "a" , "qty" : 12.0}
|
As the result from step 2 and step 3, the field "qty" value is different.
The java api result should not have ".0".