未验证 提交 0575f464 编写于 作者: J Jeremy Daer

Merge pull request #24576 from yahonda/quote_column_name_for_reserved_word_size

Address ORA-00923 error by quoting a reserved word "SIZE"
......@@ -16,7 +16,7 @@ def collection_cache_key(collection = all, timestamp_column = :updated_at) # :no
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册