提交 d21f38aa 编写于 作者: A Aaron Patterson

use the columns hash for primary key lookup

上级 399730bd
......@@ -290,7 +290,7 @@ def find_with_ids(*ids)
def find_one(id)
id = id.id if ActiveRecord::Base === id
column = primary_key.column
column = columns_hash[primary_key.name.to_s]
substitute = connection.substitute_for(column, @bind_values)
relation = where(primary_key.eq(substitute))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册