Fix FinderMethods#exists? sql generation to make picky sql servers happy - 3 0 stable #1141

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

@@ -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