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

Commit 530c1952 by Mick Hansen

Merge pull request #1989 from rogerc/1.7.0

Option to not pluralize associated table names (branch 1.7.0)
2 parents bcbd2400 f8746f02
......@@ -116,7 +116,7 @@ module.exports = (function() {
if (this.as) {
this.isAliased = true
} else {
this.as = Utils.pluralize(this.target.tableName, this.target.options.language)
this.as = (this.options.freezeAssociations ? this.target.tableName : Utils.pluralize(this.target.tableName, this.target.options.language));
}
this.accessors = {
......
......@@ -18,6 +18,7 @@ module.exports = (function() {
classMethods: {},
validate: {},
freezeTableName: false,
freezeAssociations: false,
underscored: false,
syncOnAssociation: true,
paranoid: false,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!