carbon-io / carbond

MIT License
2 stars 5 forks source link

Interplay between options.upsert and config.supportsUpsert #298

Open tfogo opened 6 years ago

tfogo commented 6 years ago

If supportsUpsert is set to true and the query upsert=false is sent with a request, upsert is not turned off. See: https://github.com/carbon-io/carbond/blob/master/lib/mongodb/MongoDBCollection.js#L545-L547

I would expect setting upsert off on the request level to override the setting on the collection level.

tfogo commented 6 years ago

@gregbanks should the query be overriding the collection setting here?