1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

OUTER JOIN should be LEFT OUTER JOIN

This commit is contained in:
Aaron Patterson 2010-09-12 19:22:19 -07:00
parent 6cd4e8f51f
commit 5ea9813003
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ module Arel
end end
def visit_Arel_Nodes_OuterJoin o def visit_Arel_Nodes_OuterJoin o
"OUTER JOIN #{visit o.right} #{visit o.constraint}" "LEFT OUTER JOIN #{visit o.right} #{visit o.constraint}"
end end
def visit_Arel_Nodes_InnerJoin o def visit_Arel_Nodes_InnerJoin o

View file

@ -252,7 +252,7 @@ module Arel
manager = Arel::SelectManager.new Table.engine manager = Arel::SelectManager.new Table.engine
manager.from Nodes::OuterJoin.new(table, aliaz, table[:id].eq(aliaz[:id])) manager.from Nodes::OuterJoin.new(table, aliaz, table[:id].eq(aliaz[:id]))
manager.join_sql.should be_like %{ manager.join_sql.should be_like %{
OUTER JOIN "users" "users_2" "users"."id" = "users_2"."id" LEFT OUTER JOIN "users" "users_2" "users"."id" = "users_2"."id"
} }
check manager.joins(manager).should == manager.join_sql check manager.joins(manager).should == manager.join_sql
end end