diff --git a/lib/drivers/node-mongodb-native/collection.js b/lib/drivers/node-mongodb-native/collection.js index 2fb6804c3f4..784fe4be582 100644 --- a/lib/drivers/node-mongodb-native/collection.js +++ b/lib/drivers/node-mongodb-native/collection.js @@ -9,6 +9,7 @@ const MongooseError = require('../../error/mongooseError'); const Collection = require('mongodb').Collection; const ObjectId = require('../../types/objectid'); const getConstructorName = require('../../helpers/getConstructorName'); +const internalToObjectOptions = require('../../options').internalToObjectOptions; const stream = require('stream'); const util = require('util'); @@ -377,7 +378,7 @@ function format(obj, sub, color, shell) { } const clone = require('../../helpers/clone'); - let x = clone(obj, { transform: false }); + let x = clone(obj, internalToObjectOptions); const constructorName = getConstructorName(x); if (constructorName === 'Binary') {