Browse files

Use a SelectCore rather than a full SelectManager

  • Loading branch information...
1 parent 24ade58 commit e85c6442606a097b497804d3c75b349c621ac369 @jonleighton jonleighton committed Aug 10, 2011
View
5 activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb
@@ -613,8 +613,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
@@ -519,8 +519,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 e85c644

Please sign in to comment.