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

Commit 791b44d5 by Mick Hansen

fix(include): fixes bad logic on when to use attribute with subquery naming and …

…when to use attribute directly in joins
1 parent e23ff90b
Showing with 2 additions and 2 deletions
...@@ -954,7 +954,7 @@ module.exports = (function() { ...@@ -954,7 +954,7 @@ module.exports = (function() {
joinOn = joinOn =
// Left side // Left side
( (
(subQuery && !include.subQuery && include.parent.subQuery && !(include.hasParentRequired && include.hasParentWhere)) && self.quoteIdentifier(tableLeft + '.' + attrLeft) || (subQuery && !include.subQuery && include.parent.subQuery && (include.hasParentRequired || include.hasParentWhere)) && self.quoteIdentifier(tableLeft + '.' + attrLeft) ||
self.quoteTable(tableLeft) + '.' + self.quoteIdentifier(attrLeft) self.quoteTable(tableLeft) + '.' + self.quoteIdentifier(attrLeft)
) )
...@@ -962,7 +962,7 @@ module.exports = (function() { ...@@ -962,7 +962,7 @@ module.exports = (function() {
// Right side // Right side
( (
(subQuery && !include.subQuery && include.parent.subQuery && (include.hasParentRequired && include.hasParentWhere)) && self.quoteIdentifier(tableRight + '.' + attrRight) || (subQuery && !include.subQuery && include.parent.subQuery && (include.hasParentRequired || include.hasParentWhere)) && self.quoteIdentifier(tableRight + '.' + attrRight) ||
self.quoteTable(tableRight) + '.' + self.quoteIdentifier(attrRight) self.quoteTable(tableRight) + '.' + self.quoteIdentifier(attrRight)
); );
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!