我有一个这样定义的列表:
flags = ['flag_a', 'flag_b']
查询设置如下:
from(u in User,
left_join: f in Flags,
on: f.account_id == u.account_id and f.name in ^@flags
这给了我这个错误消息:
(Ecto.Query.CastError) lib/service/users.ex:106: value `['flag_a', 'flag_b']` in `join` cannot be cast to type {:in, :string} in query:
... etc ...