@dhyasama/totem-models 10.0.1 → 10.0.2
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/lib/Financials.js +1 -1
- package/lib/Interaction.js +1 -1
- package/lib/LimitedPartner.js +1 -1
- package/lib/Message.js +2 -2
- package/lib/Organization.js +4 -4
- package/lib/Person.js +1 -1
- package/package.json +1 -1
package/lib/Financials.js
CHANGED
package/lib/Interaction.js
CHANGED
package/lib/LimitedPartner.js
CHANGED
|
@@ -765,7 +765,7 @@ module.exports = function(mongoose, config) {
|
|
|
765
765
|
if (!customerId) { return cb(new Error('customerId is required'), null); }
|
|
766
766
|
if (!mongoose.Types.ObjectId.isValid(customerId)) { return cb(new Error('customerId is not a valid ObjectId'), null); }
|
|
767
767
|
|
|
768
|
-
let query = self.
|
|
768
|
+
let query = self.updateOne(
|
|
769
769
|
{ 'customer': customerId },
|
|
770
770
|
{ $set: { people: [] } },
|
|
771
771
|
{ multi : true }
|
package/lib/Message.js
CHANGED
|
@@ -71,7 +71,7 @@ module.exports = function(mongoose, config) {
|
|
|
71
71
|
const self = this;
|
|
72
72
|
|
|
73
73
|
let removeReferences = function removeReferences(callback) {
|
|
74
|
-
self.
|
|
74
|
+
self.updateMany({}, {
|
|
75
75
|
$pull: { 'documents' : [docId] }
|
|
76
76
|
}, callback);
|
|
77
77
|
};
|
|
@@ -92,7 +92,7 @@ module.exports = function(mongoose, config) {
|
|
|
92
92
|
const self = this;
|
|
93
93
|
|
|
94
94
|
let removeReferences = function removeReferences(callback) {
|
|
95
|
-
self.
|
|
95
|
+
self.updateMany({}, {
|
|
96
96
|
$pull: { 'notes' : [noteId] }
|
|
97
97
|
}, callback);
|
|
98
98
|
};
|
package/lib/Organization.js
CHANGED
|
@@ -1052,7 +1052,7 @@ module.exports = function(mongoose, config) {
|
|
|
1052
1052
|
const self = this;
|
|
1053
1053
|
|
|
1054
1054
|
let removeReferences = function removeReferences(callback) {
|
|
1055
|
-
self.
|
|
1055
|
+
self.updateMany({}, {
|
|
1056
1056
|
$pull: { 'flags' : [flagId] }
|
|
1057
1057
|
}, callback);
|
|
1058
1058
|
};
|
|
@@ -1073,7 +1073,7 @@ module.exports = function(mongoose, config) {
|
|
|
1073
1073
|
const self = this;
|
|
1074
1074
|
|
|
1075
1075
|
let removeReferences = function removeReferences(callback) {
|
|
1076
|
-
self.
|
|
1076
|
+
self.updateMany({}, {
|
|
1077
1077
|
$pull: { 'notes' : [noteId] }
|
|
1078
1078
|
}, callback);
|
|
1079
1079
|
};
|
|
@@ -1754,7 +1754,7 @@ module.exports = function(mongoose, config) {
|
|
|
1754
1754
|
var self = this;
|
|
1755
1755
|
|
|
1756
1756
|
self
|
|
1757
|
-
.
|
|
1757
|
+
.updateMany(
|
|
1758
1758
|
{ 'filters.customer': customerId },
|
|
1759
1759
|
{ $pull : { 'filters': { 'customer': customerId } } },
|
|
1760
1760
|
{ multi : true }
|
|
@@ -1768,7 +1768,7 @@ module.exports = function(mongoose, config) {
|
|
|
1768
1768
|
var self = this;
|
|
1769
1769
|
|
|
1770
1770
|
self
|
|
1771
|
-
.
|
|
1771
|
+
.updateMany(
|
|
1772
1772
|
{ 'valuations.customer': customerId },
|
|
1773
1773
|
{ $pull : { 'valuations': { 'customer': customerId } } },
|
|
1774
1774
|
{ multi : true }
|
package/lib/Person.js
CHANGED
|
@@ -304,7 +304,7 @@ module.exports = function(mongoose, config) {
|
|
|
304
304
|
const self = this;
|
|
305
305
|
|
|
306
306
|
let removePersonNoteReferences = function removePersonNoteReferences(callback) {
|
|
307
|
-
self.
|
|
307
|
+
self.updateMany({}, {
|
|
308
308
|
$pull: { 'notes' : [noteId] }
|
|
309
309
|
}, callback);
|
|
310
310
|
};
|