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

You need to sign in or sign up before continuing.
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() { ...@@ -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.freezeAssociations ? 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,
freezeAssociations: 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!