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

Commit 034da3f4 by Mick Hansen

Use name as alias if alias matches tableName, hotfix for specific usercase

1 parent 162ef09e
Showing with 4 additions and 0 deletions
......@@ -21,6 +21,10 @@ module.exports = (function() {
this.isAliased = true
} else {
this.as = Utils.singularize(this.target.tableName, this.target.options.language)
// Hotfix
if (this.as === this.target.tableName) {
this.as = Utils.singularize(this.target.name, this.target.options.language)
}
}
this.associationAccessor = this.isSelfAssociation
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!