Skip to content

Commit

Permalink
Merge pull request #104 from mkozjak/master
Browse files Browse the repository at this point in the history
Get dbColumnName instead of id property name for Model.update so that ch...
  • Loading branch information
joeferner committed Sep 12, 2014
2 parents 38914c9 + 5a32709 commit bbc6b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/driver.js
Expand Up @@ -113,7 +113,7 @@ var Driver = Class.extend({
throw new Error("No columns to update.");
}

var idColumndName = model.getIdPropertyName();
var idColumndName = model.getIdColumn().dbColumnName;
values.push(id);

var sql = util.format('UPDATE %s SET %s WHERE %s = %s', model.tableName, columnNamesSql.join(','), idColumndName, this.getValuesSubstitutionString(valueSubstitutionIndex++));
Expand Down

0 comments on commit bbc6b38

Please sign in to comment.