diff options
author | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-19 00:59:38 -0700 |
---|---|---|
committer | Jeremy Daer <jeremydaer@gmail.com> | 2016-04-19 00:59:38 -0700 |
commit | 0575f4646a5c9c838acc0eecfa8f71458ad295e3 (patch) | |
tree | d0bd763c09fcc5ca60f5747d7abd05d3a1ee5300 /activerecord | |
parent | 92d7a4e34a941245d07da120dc7d71e33e127635 (diff) | |
parent | 8a4a8b2acad261dc82682773e83af901b838de3e (diff) | |
download | rails-0575f4646a5c9c838acc0eecfa8f71458ad295e3.tar.gz rails-0575f4646a5c9c838acc0eecfa8f71458ad295e3.tar.bz2 rails-0575f4646a5c9c838acc0eecfa8f71458ad295e3.zip |
Merge pull request #24576 from yahonda/quote_column_name_for_reserved_word_size
Address ORA-00923 error by quoting a reserved word "SIZE"
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/collection_cache_key.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/collection_cache_key.rb b/activerecord/lib/active_record/collection_cache_key.rb index 5dcc98424a..8d41c0d799 100644 --- a/activerecord/lib/active_record/collection_cache_key.rb +++ b/activerecord/lib/active_record/collection_cache_key.rb @@ -16,7 +16,7 @@ module ActiveRecord query = collection .unscope(:select) - .select("COUNT(*) AS size", "MAX(#{column}) AS timestamp") + .select("COUNT(*) AS #{connection.quote_column_name("size")}", "MAX(#{column}) AS timestamp") .unscope(:order) result = connection.select_one(query) |