diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-07-08 08:46:07 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-07-08 08:46:07 +0900 |
commit | dddb331bd24ab163ac61b4af7abbdb920264bf9b (patch) | |
tree | 82d171294c7c8bff0e27318166cdacca940ea0c1 /activerecord/lib/active_record/relation | |
parent | 74ef67b16de67d2ae2f996e50a18a93aebf68fe6 (diff) | |
download | rails-dddb331bd24ab163ac61b4af7abbdb920264bf9b.tar.gz rails-dddb331bd24ab163ac61b4af7abbdb920264bf9b.tar.bz2 rails-dddb331bd24ab163ac61b4af7abbdb920264bf9b.zip |
Do not use aliases in GROUP BY clause
It appears that Oracle does not allow using aliases in GROUP BY clause
unlike ORDER BY clause.
Fixes #36613.
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/calculations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/calculations.rb b/activerecord/lib/active_record/relation/calculations.rb index 0be9ba7d7b..0a14a33c1d 100644 --- a/activerecord/lib/active_record/relation/calculations.rb +++ b/activerecord/lib/active_record/relation/calculations.rb @@ -340,7 +340,7 @@ module ActiveRecord } relation = except(:group).distinct!(false) - relation.group_values = group_aliases + relation.group_values = group_fields relation.select_values = select_values calculated_data = skip_query_cache_if_necessary { @klass.connection.select_all(relation.arel, nil) } |