未验证 提交 8d58bdda 编写于 作者: S sinsoku

Allow `or` in case of `from` clause with same value

上级 aca85f62
......@@ -18,6 +18,10 @@ def empty?
value.nil?
end
def ==(other)
other.is_a?(FromClause) && name == other.name && value == other.value
end
def self.empty
@empty ||= new(nil, nil).freeze
end
......
......@@ -147,6 +147,7 @@ def test_structurally_incompatible_values
Post.group(:author_id).group(:author_id).or(Post.group(:author_id))
Post.joins(:author).joins(:author).or(Post.joins(:author))
Post.left_outer_joins(:author).left_outer_joins(:author).or(Post.left_outer_joins(:author))
Post.from("posts").or(Post.from("posts"))
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册