不要怂,就是干,撸起袖子干!

Commit a875c64b by Sascha Depold

Merge pull request #660 from echong/master

Fixing 'identifier' being stored as the raw value of the 'id' rather than being wrapped in an object
2 parents 1163c545 8cf1f054
Showing with 2 additions and 2 deletions
...@@ -247,13 +247,13 @@ module.exports = (function() { ...@@ -247,13 +247,13 @@ module.exports = (function() {
this.dataValues[attr] = new Date() this.dataValues[attr] = new Date()
return this.save() return this.save()
} else { } else {
var identifier = this.__options.hasPrimaryKeys ? this.primaryKeyValues : this.id var identifier = this.__options.hasPrimaryKeys ? this.primaryKeyValues : { id: this.id };
return this.QueryInterface.delete(this, this.QueryInterface.QueryGenerator.addSchema(this.__factory.tableName, this.__factory.options.schema), identifier) return this.QueryInterface.delete(this, this.QueryInterface.QueryGenerator.addSchema(this.__factory.tableName, this.__factory.options.schema), identifier)
} }
} }
DAO.prototype.increment = function(fields, count) { DAO.prototype.increment = function(fields, count) {
var identifier = this.__options.hasPrimaryKeys ? this.primaryKeyValues : this.id, var identifier = this.__options.hasPrimaryKeys ? this.primaryKeyValues : { id: this.id },
values = {} values = {}
if (count === undefined) count = 1; if (count === undefined) count = 1;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!