Comparing version 0.2.7 to 0.2.8
@@ -282,6 +282,9 @@ var eventEmitter = require('events').EventEmitter; | ||
Document.prototype.delete = function(options, callback) { | ||
var self = this; // The document | ||
var model = this.getModel(); | ||
// save(callback) is a valid signature | ||
if ((typeof options === 'function') && (callback == null)) { | ||
callback = options; | ||
options = null; | ||
} | ||
if ((options == null) || (options.deleteJoin == null)) { | ||
if ((options == null) || (options.saveJoin == null)) { | ||
options = { | ||
@@ -291,3 +294,6 @@ deleteJoin: false | ||
} | ||
var self = this; // The document | ||
var model = this.getModel(); | ||
var docSettings = self.getDocSettings(); | ||
@@ -294,0 +300,0 @@ var query, cb; |
{ | ||
"name": "thinky", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "RethinkDB ORM for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -167,2 +167,15 @@ var thinky = require('../lib/index.js'); | ||
}); | ||
it('should delete the doc -- other signature', function(done){ | ||
Cat = thinky.createModel('Cat', { id: String, name: String }); | ||
catou = new Cat({name: 'Catou'}); | ||
catou.save(null, function(error, result) { | ||
should.exist(result.id); | ||
catou.delete(function(error, result) { | ||
catou.getDocSettings().saved.should.be.false | ||
done(); | ||
}) | ||
}) | ||
}); | ||
}); | ||
@@ -169,0 +182,0 @@ |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1178656
333
26197
1
72
29