是否可以使用联接值模式用于where子句?
filtered = [name: "show", name: "comedy"]
query = from s in Core.Serie, join: t in assoc(s, :tags), where: ^filtered
结果是下一个
#Ecto.Query<from s in Core.Serie, join: t in assoc(s, :tags),
where: s.name == ^"show" and s.name == ^"comedy">
我需要使用标签架构来匹配正确的记录,但默认情况下使用Serie架构。例如
#Ecto.Query<from s in Core.Serie, join: t in assoc(s, :tags),
where: t.name == ^"show" and t.name == ^"comedy">
我怀疑t.name == ^"show" and t.name == ^"comedy"
首先是您想要的,主要是因为它永远不匹配(name
不能同时是"show"
和