diff options
author | Yasuo Honda <yasuo.honda@gmail.com> | 2016-04-16 09:56:29 +0000 |
---|---|---|
committer | Yasuo Honda <yasuo.honda@gmail.com> | 2016-04-16 10:02:49 +0000 |
commit | 8a4a8b2acad261dc82682773e83af901b838de3e (patch) | |
tree | 6b2da56f92eebdda19e99e0dacc1b63c5ebf5c4e /activerecord | |
parent | 39e087cbf5628ecc351fc86a3a1e320be193bf29 (diff) | |
download | rails-8a4a8b2acad261dc82682773e83af901b838de3e.tar.gz rails-8a4a8b2acad261dc82682773e83af901b838de3e.tar.bz2 rails-8a4a8b2acad261dc82682773e83af901b838de3e.zip |
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) |