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

`where` automatically uses bind values now

上级 66e03211
......@@ -292,11 +292,8 @@ def exists?(conditions = :none)
when Array, Hash
relation = relation.where(conditions)
else
if conditions != :none
column = columns_hash[primary_key]
substitute = connection.substitute_at(column, bind_values.length)
relation = where(table[primary_key].eq(substitute))
relation.bind_values += [[column, conditions]]
unless conditions == :none
relation = where(primary_key => conditions)
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册