nodee-model
Advanced tools
Comparing version 0.9.8 to 0.9.9
@@ -88,4 +88,3 @@ 'use strict'; | ||
if(!doc.ancestors) next(new Error((doc.constructor._name||'Tree')+' updateParent: missing ancestors, ID "' +doc.id+ '"').details({ code:'INVALID', validErrs:{ ancestors:['required'] } })); | ||
else if(doc.ancestors.length && (doc.constructor.getDefaults().options.storeChildren || | ||
doc.constructor.getDefaults().options.storeChildrenCount)) { | ||
else if(doc.ancestors.length && (doc.constructor.getDefaults().options.storeChildren || doc.constructor.getDefaults().options.storeChildrenCount)) { | ||
var updateExp = {}, | ||
@@ -92,0 +91,0 @@ parentId = doc.ancestors[doc.ancestors.length-1]; |
@@ -250,3 +250,3 @@ 'use strict'; | ||
data[i].createdDT = data[i].createdDT || now; | ||
data[i].modifiedDT = data[i].createdDT; | ||
data[i].modifiedDT = data[i].modifiedDT || data[i].createdDT; | ||
if(data[i].id) ids.push(data[i].id); | ||
@@ -253,0 +253,0 @@ else data[i].id = generateId(); |
@@ -199,3 +199,3 @@ 'use strict'; | ||
data[i].createdDT = data[i].createdDT || now; | ||
data[i].modifiedDT = data[i].createdDT; | ||
data[i].modifiedDT = data[i].modifiedDT || data[i].createdDT; | ||
if(data[i].id) ids.push(data[i].id); | ||
@@ -202,0 +202,0 @@ else data[i].id = generateId(); |
@@ -280,3 +280,3 @@ 'use strict'; | ||
data[i].createdDT = data[i].createdDT || now; | ||
data[i].modifiedDT = data[i].createdDT; | ||
data[i].modifiedDT = data[i].modifiedDT || data[i].createdDT; | ||
if(data[i].id) ids.push(data[i].id); | ||
@@ -370,5 +370,4 @@ else data[i].id = defaults.options.shortId ? generateId() : mongo.ObjectID(); // generate new objectId (_id), if it is not set | ||
/* | ||
* Model instance methods - inherited from DataSource | ||
*/ |
@@ -538,4 +538,4 @@ 'use strict'; | ||
data[i].id = data[i].id || generateId(); // generate new id, if it's not set | ||
data[i].createdDT = now; | ||
data[i].modifiedDT = now; | ||
data[i].createdDT = data[i].createdDT || now; | ||
data[i].modifiedDT = data[i].modifiedDT || data[i].createdDT; | ||
@@ -542,0 +542,0 @@ // exec request, and parse result as single resource |
{ | ||
"name": "nodee-model", | ||
"preferGlobal": false, | ||
"version": "0.9.8", | ||
"version": "0.9.9", | ||
"author": "NODEE - Matus Szabo <matus@nodee.io>", | ||
@@ -6,0 +6,0 @@ "description": "Advanced, database agnostic ODM", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
235656
5005