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

Commit d30e1dc2 by Matthew Ohlman

Allow field names to be same as property name

1 parent ff4b7850
Showing with 1 additions and 1 deletions
...@@ -555,7 +555,7 @@ module.exports = (function() { ...@@ -555,7 +555,7 @@ module.exports = (function() {
} }
// Field name mapping // Field name mapping
if (self.Model.rawAttributes[attr].field) { if (self.Model.rawAttributes[attr].field && self.Model.rawAttributes[attr].field !== attr) {
values[self.Model.rawAttributes[attr].field] = values[attr]; values[self.Model.rawAttributes[attr].field] = values[attr];
delete values[attr]; delete values[attr];
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!