This repository was archived by the owner on Nov 8, 2022. It is now read-only.
This repository was archived by the owner on Nov 8, 2022. It is now read-only.
support read=false on paged contents query #103
Open
Description
when query read=true, i can use:
read == true ->
queryable
|> join(:inner, [content, f, c], viewers in assoc(content, :viewers))
|> where([content, f, c, viewers], viewers.user_id == ^user.id)
but came to read=false, this is not work as except
read == true ->
queryable
|> join(:inner, [content, f, c], viewers in assoc(content, :viewers))
|> where([content, f, c, viewers], viewers.user_id != ^user.id)
because the viewers
assoc only have records of viewed user, the unviewed user is not in that table
left_join is not working either, need help...