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

Commit 356a9bb3 by Mick Hansen

Merge pull request #1903 from LJ1102/migrate-reload

Migrate v2 dao instance "reload" to v1.7 to allow for custom primary keys
2 parents 462b6ac1 28e5f5a6
Showing with 2 additions and 2 deletions
...@@ -450,8 +450,8 @@ module.exports = (function() { ...@@ -450,8 +450,8 @@ module.exports = (function() {
*/ */
DAO.prototype.reload = function(options) { DAO.prototype.reload = function(options) {
var where = [ var where = [
this.QueryInterface.quoteIdentifier(this.__factory.tableName) + '.' + this.QueryInterface.quoteIdentifier('id')+'=?', this.QueryInterface.quoteIdentifier(this.Model.getTableName()) + '.' + this.QueryInterface.quoteIdentifier(this.Model.primaryKeyAttributes[0] || 'id') + '=?',
this.id this.get(this.Model.primaryKeyAttributes[0] || 'id', {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!