big*_*ato 11 elixir ecto
我试图寻找User在他们的match_history领域中没有某个字符串元素的所有s .我猜了一下:
User
match_history
matched_user = User |> where([u], ^device_id not in u.match_history) |> limit(1) |> VideoChat.Repo.one
但它似乎打破了not部分.有没有办法做到这一点?
not
小智 13
尝试
User |> where([u], not ^device_id in u.match_history)
归档时间:
9 年,6 月 前
查看次数:
3143 次
最近记录:
7 年,4 月 前