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

Commit bb9e60b0 by Overlook Motel

Default as for many-to-many self-associations

Default as for many-to-many self-associations v2
1 parent a03d2ab8
Showing with 5 additions and 0 deletions
......@@ -118,6 +118,11 @@ module.exports = (function() {
this.isAliased = true
} else {
this.as = Utils.pluralize(this.target.name, this.target.options.language)
if (this.isSelfAssociation && this.doubleLinked && this.as == this.targetAssociation.as) {
this.as = this.target.name + Utils.pluralize('Reverse', this.target.options.language)
this.associationAccessor = this.as
this.isAliased = true
}
}
this.accessors = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!