mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
15d6e4dce7
The combination of a :uniq => true association and the #distinct call in #construct_limited_ids_condition combine to create invalid SQL, because we're explicitly selecting DISTINCT, and also sending #distinct on to AREL, via the relation#distinct_value. Rather than build a select distinct clause in #construct_limited_ids_condition, I set #distinct! and pass just the columns into the select statement. This requires introducing a #columns_for_distinct method to return the select columns but not the statement itself. |
||
---|---|---|
.. | ||
firebird | ||
mysql | ||
mysql2 | ||
oracle | ||
postgresql | ||
sqlite3 |