Skip to content
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
@mydearxym

Description

@mydearxym

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions