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

Commit e4218a23 by Tommy van der Vorst Committed by Sushant

fix(model): prevent version number from being incremented as string (#10217)

1 parent 61a9b268
Showing with 1 additions and 1 deletions
...@@ -3731,7 +3731,7 @@ class Model { ...@@ -3731,7 +3731,7 @@ class Model {
where = this.where(true); where = this.where(true);
where = Utils.mapValueFieldNames(where, Object.keys(where), this.constructor); where = Utils.mapValueFieldNames(where, Object.keys(where), this.constructor);
if (versionAttr) { if (versionAttr) {
values[versionFieldName] += 1; values[versionFieldName] = parseInt(values[versionFieldName], 10) + 1;
} }
query = 'update'; query = 'update';
args = [this, this.constructor.getTableName(options), values, where, options]; args = [this, this.constructor.getTableName(options), values, where, options];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!