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:
parent
6cd4e8f51f
commit
5ea9813003
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue