backbone-mongo
Advanced tools
Comparing version 0.6.2 to 0.6.3
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) |
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) |
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) |
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) |
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) |
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -6,0 +6,0 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) |
// Generated by CoffeeScript 1.7.1 | ||
/* | ||
backbone-mongo.js 0.6.2 | ||
backbone-mongo.js 0.6.3 | ||
Copyright (c) 2013 Vidigami - https://github.com/vidigami/backbone-mongo | ||
@@ -39,2 +39,3 @@ License: MIT (http://www.opensource.org/licenses/mit-license.php) | ||
this.db = __bind(this.db, this); | ||
this.deleteCB = __bind(this.deleteCB, this); | ||
this.model_type.model_name = Utils.findOrGenerateModelName(this.model_type); | ||
@@ -159,2 +160,14 @@ this.schema = new Schema(this.model_type, { | ||
MongoSync.prototype["delete"] = function(model, options) { | ||
return this.deleteCB(model, (function(_this) { | ||
return function(err) { | ||
if (err) { | ||
return options.error(err); | ||
} else { | ||
return options.success(); | ||
} | ||
}; | ||
})(this)); | ||
}; | ||
MongoSync.prototype.deleteCB = function(model, callback) { | ||
return this.connection.collection((function(_this) { | ||
@@ -169,5 +182,5 @@ return function(err, collection) { | ||
if (err) { | ||
return options.error(err); | ||
return callback(err); | ||
} | ||
return options.success(); | ||
return Utils.patchRemove(_this.model_type, model, callback); | ||
}); | ||
@@ -204,17 +217,3 @@ }; | ||
} | ||
}, query), (function(model_json, callback) { | ||
return Utils.patchRemoveByJSON(_this.model_type, model_json, function(err) { | ||
if (err) { | ||
return callback(err); | ||
} | ||
return collection.remove(_this.backbone_adapter.attributesToNative({ | ||
id: model_json.id | ||
}), function(err) { | ||
if (err) { | ||
return callback(err); | ||
} | ||
return callback(); | ||
}); | ||
}); | ||
}), callback); | ||
}, query), _this.deleteCB, callback); | ||
}; | ||
@@ -221,0 +220,0 @@ })(this)); |
{ | ||
"name": "backbone-mongo", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "MongoDB storage for BackboneORM", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Please refer to the following release notes when upgrading your version of BackboneORM. | ||
### 0.6.3 | ||
* Bug fix for join tables | ||
### 0.6.2 | ||
@@ -4,0 +7,0 @@ * Added dynamic and manual_ids capabilities |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
100333
1003