-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.6.3
-
Component/s: None
-
Empty show more show less
Code:
// MongoClient.connect(uri, { ignoreUndefined: true }) db.collection('Test').findOneAndUpdate( { test: 'test' }, { $set: { undefined_1: undefined, null_1: null, }, $setOnInsert: { undefined_2: undefined, null_2: null, } }, { upsert: true } )
Expect document:
{ test: 'test', null_1: null, null_2: null }
Actual document:
{ test: 'test', undefined_1: null, null_1: null, undefined_2: null, null_2: null }