cascading-relations
Advanced tools
Comparing version 0.7.7 to 0.7.8
10
index.js
@@ -28,7 +28,6 @@ var Q, dot, mongoose, _; | ||
schema.methods.$__movePopulated = function() { | ||
var info, orig, path, val, _ref, _results; | ||
var info, orig, path, val, _ref; | ||
if (this.$__.populated != null) { | ||
this._related = {}; | ||
_ref = this.$__.populated; | ||
_results = []; | ||
for (path in _ref) { | ||
@@ -38,6 +37,9 @@ info = _ref[path]; | ||
orig = dot.get(this, path); | ||
if (orig instanceof Array) { | ||
orig.push = Array.prototype.push; | ||
} | ||
dot.set(this, path, val, true); | ||
_results.push(dot.set(this._related, path, orig, true)); | ||
dot.set(this._related, path, orig, true); | ||
} | ||
return _results; | ||
return delete this.$__.populated[path]; | ||
} | ||
@@ -44,0 +46,0 @@ }; |
{ | ||
"name": "cascading-relations", | ||
"version": "0.7.7", | ||
"version": "0.7.8", | ||
"description": "Alternate populate/save/delete functionality for mongoose to allow for cascading relations", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
50539
877