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

Address ORA-00911 errors because of the heading underscore.

This commit is contained in:
Yasuo Honda 2012-06-11 11:41:07 +09:00
parent f48e7676e9
commit a0363e2ca6
2 changed files with 2 additions and 2 deletions

View file

@ -176,7 +176,7 @@ module ActiveRecord
join_dependency = construct_join_dependency_for_association_find
relation = construct_relation_for_association_find(join_dependency)
relation = relation.except(:select, :order).select("1 AS _one").limit(1)
relation = relation.except(:select, :order).select("1 AS one").limit(1)
case id
when Array, Hash

View file

@ -46,7 +46,7 @@ class FinderTest < ActiveRecord::TestCase
end
def test_exists_does_not_select_columns_without_alias
assert_sql(/SELECT\W+1 AS _one FROM ["`]topics["`]\W+LIMIT 1/) do
assert_sql(/SELECT\W+1 AS one FROM ["`]topics["`]/i) do
Topic.exists?
end
end