Comparing version 0.3.9 to 0.3.10
@@ -493,17 +493,13 @@ var util = require('util'); | ||
var pk = self.getPk(); | ||
var parsedOptions = {}; | ||
return this.parseOptions(options).then(function(options){ | ||
parsedOptions = options; | ||
data = self.parseData(data); | ||
return self._beforeAdd(data, options); | ||
}).then(function(data){ | ||
return self.db.insert(data, options, replace); | ||
return self.db.insert(data, parsedOptions, replace); | ||
}).then(function(data){ | ||
//获取插入的ID | ||
var id = self.db.getLastInsertId(); | ||
if (id) { | ||
data[pk] = id; | ||
}; | ||
return getPromise(self._afterAdd(data, options)); | ||
}).then(function(data){ | ||
return data[pk]; | ||
}) | ||
return getPromise(self._afterAdd(id, parsedOptions)); | ||
}); | ||
}, | ||
@@ -510,0 +506,0 @@ /** |
{ | ||
"name": "thinkjs", | ||
"description": "thinkphp web framework for nodejs", | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "welefen", |
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
189562
5679