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

You need to sign in or sign up before continuing.
Commit 8cf1f054 by Elliot Chong

Fixing 'identifier' being stored as the raw value of the 'id' rather than being wrapped in an object

Continuation of a fix outlined in [pull request 656](https://github.com/sequelize/sequelize/pull/656)
1 parent 96743a91
Showing with 2 additions and 2 deletions
......@@ -247,13 +247,13 @@ module.exports = (function() {
this.dataValues[attr] = new Date()
return this.save()
} 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)
}
}
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 = {}
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!