Permalink
Browse files

Minimal change to query generation of FinderMethods#exists? that make…

…s SQLServer and others happy that do not like columns without an alias.
  • Loading branch information...
1 parent a37ae63 commit 22762d8a1745f15e2acde5dc528c5eaa319de698 @iaddict committed May 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/relation/finder_methods.rb
@@ -173,7 +173,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

0 comments on commit 22762d8

Please sign in to comment.