1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Address ORA-00923 error by quoting a reserved word "SIZE"

This commit is contained in:
Yasuo Honda 2016-04-16 09:56:29 +00:00
parent 39e087cbf5
commit 8a4a8b2aca

View file

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