Permalink
Browse files

Use a SelectCore rather than a full SelectManager

  • Loading branch information...
1 parent fe0ec85 commit 8778c82e32690ed7b25664522d0bd0324ebea840 @jonleighton jonleighton committed Aug 9, 2011
View
5 activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -591,8 +591,9 @@ def join_to_update(update, select) #:nodoc:
'__active_record_temp'
)
- subselect = Arel::SelectManager.new(select.engine, subsubselect)
- subselect.project(Arel::Table.new('__active_record_temp')[update.ast.key.name])
+ subselect = Arel::Nodes::SelectCore.new
+ subselect.from = subsubselect
+ subselect.projections << Arel::Table.new('__active_record_temp')[update.ast.key.name]
update.where update.ast.key.in(subselect)
else
View
5 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -505,8 +505,9 @@ def join_to_update(update, select) #:nodoc:
'__active_record_temp'
)
- subselect = Arel::SelectManager.new(select.engine, subsubselect)
- subselect.project(Arel::Table.new('__active_record_temp')[update.ast.key.name])
+ subselect = Arel::Nodes::SelectCore.new
+ subselect.from = subsubselect
+ subselect.projections << Arel::Table.new('__active_record_temp')[update.ast.key.name]
update.where update.ast.key.in(subselect)
else

0 comments on commit 8778c82

Please sign in to comment.