Skip to content

Commit

Permalink
Minimal change to query generation of exists? that makes SQLServer an…
Browse files Browse the repository at this point in the history
…d others happy that do not work without a column alias.
  • Loading branch information
iaddict committed May 19, 2011
1 parent a921cab commit 0eae392
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/lib/active_record/relation/finder_methods.rb
Expand Up @@ -185,7 +185,7 @@ def exists?(id = nil)

join_dependency = construct_join_dependency_for_association_find
relation = construct_relation_for_association_find(join_dependency)
relation = relation.except(:select).select("1").limit(1)
relation = relation.except(:select).select("1 AS _one").limit(1)

case id
when Array, Hash
Expand Down

0 comments on commit 0eae392

Please sign in to comment.