-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.3.4, 3.4.0, 3.5.0, 3.5.1, 3.5.2
-
Component/s: None
-
Empty show more show less
Update hint was improved in 3.3.4 according to this:
https://jira.mongodb.org/browse/NODE-2263
Errors are thrown in versions >=3.3.4
Works correctly in versions <3.3.4, not sure if hint is simply being ignored or there's a change to the implementation.
code snippet to reproduce:
await db.collection('events').updateOne( { "url": "https://mysite.com", }, { "$inc": { "total": 1 }, "$setOnInsert": { "date": 1579651200000, } }, { "upsert": true, "hint": { "url": 1, } } )
Error thrown:
MongoError: BSON field 'update.updates.hint' is an unknown field. errmsg: "BSON field 'update.updates.hint' is an unknown field.", code: 40415, codeName: 'Location40415',
- is related to
-
NODE-2263 support ability to pass hint to update
- Closed