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

Commit 8adb7481 by Mick Hansen

[fix] cover BC cases

1 parent b8767e0d
Showing with 2 additions and 2 deletions
...@@ -45,7 +45,7 @@ module.exports = (function() { ...@@ -45,7 +45,7 @@ module.exports = (function() {
* Map joinTableModel/Name to through for BC * Map joinTableModel/Name to through for BC
*/ */
if (this.through === undefined) { if (this.through === undefined) {
this.through = this.options.joinTableModel || this.options.joinTableName; this.through = this.options.through = this.options.joinTableModel || this.options.joinTableName;
/* /*
* If both are undefined, see if useJunctionTable was false (for self associations) - else assume through to be true * If both are undefined, see if useJunctionTable was false (for self associations) - else assume through to be true
...@@ -105,7 +105,7 @@ module.exports = (function() { ...@@ -105,7 +105,7 @@ module.exports = (function() {
paired = accessor === self.associationAccessor; paired = accessor === self.associationAccessor;
} }
// If through is not default, determine pairing by through value (model/string) // If through is not default, determine pairing by through value (model/string)
else { else if (association.options.through) {
paired = (self.options.through === association.options.through) || paired = (self.options.through === association.options.through) ||
(self.options.through === association.options.through.model) || (self.options.through === association.options.through.model) ||
(self.options.through.model && association.options.through.model && (self.options.through.model === association.options.through.model)) || (self.options.through.model && association.options.through.model && (self.options.through.model === association.options.through.model)) ||
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!