@highoutput/repository
Advanced tools
@@ -99,3 +99,3 @@ "use strict"; | ||
async updateOne(filter, data, options) { | ||
const document = await this._model.findOneAndUpdate(serializeFilter(filter), ramda_1.default.filter((value) => value !== undefined)(serialize(data)), Object.assign({ upsert: false, new: true }, options)); | ||
const document = await this._model.findOneAndUpdate(serializeFilter(filter), ramda_1.default.filter((value) => value !== undefined)(serialize(data)), Object.assign({ upsert: false, new: true, setDefaultsOnInsert: true }, (options || {}))); | ||
return deserialize(document); | ||
@@ -102,0 +102,0 @@ } |
{ | ||
"name": "@highoutput/repository", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Repository class implementation", | ||
@@ -52,3 +52,3 @@ "author": "High Output Ventures", | ||
}, | ||
"gitHead": "05e1baba75919f00b263ca6142ff997fb4e01d43" | ||
"gitHead": "2008a137b5f5cce9c9ce8cadb040f6f2637bcb48" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15758
0.5%