The legacy shell does not modify the object being inserted.
Use `forceServerObjectId` to prevent the driver to modify the original object with the _id field.
To reproduce:
const item = { 'item': 'qaz', 'price': 10, 'quantity': 2, 'date': new Date('2014-03-01T08:00:00Z') }; db.sales.insertOne(item); console.log(JSON.stringify(item)); {“item”:“qaz”,“price”:10,“quantity”:2,“date”:“2014-03-01T08:00:00.000Z”,“_id”:“602fe50ec9a59cce9557dc87"}
Expected behavior: item would not have an _id field.