Skip to content
Browse files

ignore raw_sql_ table alias that is used by Oracle adapter

  • Loading branch information...
1 parent b0fdd29 commit c51fa6bdfc202f78907a7d1cb6bce7b0e2562913 @rsim rsim committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 activerecord/lib/active_record/relation.rb
View
3 activerecord/lib/active_record/relation.rb
@@ -364,7 +364,8 @@ def references_eager_loaded_tables?
def tables_in_string(string)
return [] if string.blank?
# always convert table names to downcase as in Oracle quoted table names are in uppercase
- string.scan(/([a-zA-Z_][\.\w]+).?\./).flatten.map(&:downcase).uniq
+ # ignore raw_sql_ that is used by Oracle adapter as alias for limit/offset subqueries
+ string.scan(/([a-zA-Z_][\.\w]+).?\./).flatten.map(&:downcase).uniq - ['raw_sql_']
end
end

0 comments on commit c51fa6b

Please sign in to comment.
Something went wrong with that request. Please try again.