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

Commit d20ac15e by rogerc

Added new config variable to return behaviour removed in v1.7.0rc6 to not plural…

…ize associated table names
1 parent 77dbded7
...@@ -116,7 +116,7 @@ module.exports = (function() { ...@@ -116,7 +116,7 @@ module.exports = (function() {
if (this.as) { if (this.as) {
this.isAliased = true this.isAliased = true
} else { } else {
this.as = Utils.pluralize(this.target.tableName, this.target.options.language) this.as = (this.options.freezeTableNameAssociations?this.target.tableName:Utils.pluralize(this.target.tableName, this.target.options.language));
} }
this.accessors = { this.accessors = {
......
...@@ -18,6 +18,7 @@ module.exports = (function() { ...@@ -18,6 +18,7 @@ module.exports = (function() {
classMethods: {}, classMethods: {},
validate: {}, validate: {},
freezeTableName: false, freezeTableName: false,
freezeTableNameAssociations: false,
underscored: false, underscored: false,
syncOnAssociation: true, syncOnAssociation: true,
paranoid: false, paranoid: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!