Enterprise replset [direct: primary]> db.test.insertOne({ value: Long(10) }) { acknowledged: true, insertedId: ObjectId("60b795a40a328707b213782a") } Enterprise replset [direct: primary]> db.test.find() [ { _id: ObjectId("60b795a40a328707b213782a"), value: 10 } ]
The value is stored properly on the server, but because the driver defaults the promoteLongs option to true. The legacy shell returns NumberLong(10) instead.