提交 7d14e03d 编写于 作者: A Aaron Patterson

reorder bind indexes if joins produced bind values

上级 03118bc5
......@@ -844,6 +844,15 @@ def build_arel
arel.from(build_from) if from_value
arel.lock(lock_value) if lock_value
# Reorder bind indexes if joins produced bind values
if arel.bind_values.any?
bvs = arel.bind_values + bind_values
arel.ast.grep(Arel::Nodes::BindParam).each_with_index do |bp, i|
column = bvs[i].first
bp.replace connection.substitute_at(column, i)
end
end
arel
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册