I have a issue when fetching and saving documents in the shell have a DBRef id that is a NumberInt
If you insert this document and then view the document json is fine
{ "_id" : ObjectId(), "string" : "1", "int" : NumberInt(9087), "float" : 1.1, "refLong" : DBRef("ReferenceList", NumberLong(9087), "Reference"), "refInt" : DBRef("ReferenceList", NumberInt(9087), "Reference") }
But if you run a shell script that finds the document and then saves it again, the field "refInt" changes from
- "refInt" : DBRef("ReferenceList", NumberInt(9087), "Reference")
To - "refInt" : DBRef("ReferenceList", 9087.0, "Reference")
The field "int" does not change
I have checked a few versions and have the same issue
When running the steps to reproduce, if you run only step one, the data is fine, if you run Step 2, dbref id changes from int to float