@dhyasama/totem-models 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.npmignore ADDED
@@ -0,0 +1,14 @@
1
+ lib-cov
2
+ *.seed
3
+ *.log
4
+ *.csv
5
+ *.dat
6
+ *.out
7
+ *.pid
8
+ *.gz
9
+
10
+ npm-debug.log
11
+ node_modules
12
+
13
+ .DS_Store
14
+ .idea
@@ -1560,6 +1560,10 @@ module.exports = function(mongoose, config) {
1560
1560
 
1561
1561
  var self = this;
1562
1562
 
1563
+ // https://mongoosejs.com/docs/api.html#model_Model.findOneAndUpdate
1564
+ // options runValidators defaults false which is ok since we have upsert false
1565
+ // new returns the updated document
1566
+
1563
1567
  self.findOneAndUpdate(filter, update, { upsert: false, new: true }, cb);
1564
1568
 
1565
1569
  };