Permalink
Browse files

pass the outer joins to join_constraints

  • Loading branch information...
1 parent d059fa6 commit 796c0fc1b065bc4248a410110e728e5b2c6db19e @tenderlove tenderlove committed Oct 20, 2013
@@ -84,7 +84,8 @@ def apply_tables!(node)
node.children.each { |child| construct_tables! node, child }
end
- def join_constraints
+ def join_constraints(outer_joins)
+ outer_joins.each { |oj| merge_outer_joins! oj }
make_joins join_root
end
@@ -950,11 +950,7 @@ def build_joins(manager, joins)
join_list
)
- stashed_association_joins.each do |dep|
- join_dependency.merge_outer_joins! dep
- end
-
- joins = join_dependency.join_constraints
+ joins = join_dependency.join_constraints stashed_association_joins
joins.each { |join| manager.from(join) }

0 comments on commit 796c0fc

Please sign in to comment.