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

Commit 70a0cb3e by Mick Hansen

non-id primary key support for dao.reload, courtesy of @ZonkedZebra

1 parent fc7f88d2
Showing with 1 additions and 1 deletions
...@@ -449,7 +449,7 @@ module.exports = (function() { ...@@ -449,7 +449,7 @@ module.exports = (function() {
DAO.prototype.reload = function(options) { DAO.prototype.reload = function(options) {
var where = [ var where = [
this.QueryInterface.quoteIdentifier(this.Model.tableName) + '.' + this.QueryInterface.quoteIdentifier(this.Model.primaryKeyAttribute)+'=?', this.QueryInterface.quoteIdentifier(this.Model.tableName) + '.' + this.QueryInterface.quoteIdentifier(this.Model.primaryKeyAttribute)+'=?',
this.id this.get(this.Model.primaryKeyAttribute, {raw: true})
] ]
return new Utils.CustomEventEmitter(function(emitter) { return new Utils.CustomEventEmitter(function(emitter) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!