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

Commit cdd8c3be by Jan Aagaard Meier

Fix qouting of attributes in the update part of upsert query for mysql. Closes #2668

1 parent 92052541
Showing with 2 additions and 1 deletions
...@@ -172,8 +172,9 @@ module.exports = (function() { ...@@ -172,8 +172,9 @@ module.exports = (function() {
options.onDuplicate = 'UPDATE '; options.onDuplicate = 'UPDATE ';
options.onDuplicate += Object.keys(updateValues).map(function (key) { options.onDuplicate += Object.keys(updateValues).map(function (key) {
key = this.quoteIdentifier(key);
return key + '=VALUES(' + key +')'; return key + '=VALUES(' + key +')';
}).join(', '); }, this).join(', ');
return this.insertQuery(tableName, insertValues, rawAttributes, options); return this.insertQuery(tableName, insertValues, rawAttributes, options);
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!