Socket
Socket
Sign inDemoInstall

cascading-relations

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cascading-relations - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

6

index.js

@@ -160,4 +160,6 @@ var Q, dot, mongoose;

if (isArray) {
orig.push(data._id);
this.set(path, orig);
if (orig.indexOf(data._id) < 0) {
orig.push(data._id);
this.set(path, orig);
}
} else {

@@ -164,0 +166,0 @@ this.set(path, data._id);

{
"name": "cascading-relations",
"version": "0.7.2",
"version": "0.7.3",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -263,3 +263,3 @@ var barClass, barSchema, bazClass, bazSchema, dot, fooClass, fooSchema, mongoose, relations, should;

});
return it('should still work with deep dot notation', function() {
it('should still work with deep dot notation', function() {
var obj;

@@ -343,2 +343,27 @@ obj = {

});
return it('should be accurate when you put with less relations (implicit delete)', function(done) {
var foo,
_this = this;
foo = new fooClass({
title: 'My Foo',
_related: {
_bars: [
{
title: 'First Bar'
}, {
title: 'Second Bar'
}
]
}
});
return foo.cascadeSave(function(err, res) {
foo._bars.pop();
foo._related._bars.pop();
return foo.cascadeSave(function(err, res) {
res._bars.length.should.equal(1);
res._related._bars.length.should.equal(1);
return done();
});
});
});
});

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc