Hi there, I'm following the <many-to-many tutorial...
# orm-help
z
Hi there, I'm following the many-to-many tutorial and I tweaked that to "tags" and I'm wondering, how can I get all tags associated with a user? I did like this but I'm not sure if that is the best way:
Copy code
const tags = await prisma.tag.findMany({
      where: {
        users: {
          every: {
            user: {
              id
            }
          }
        }
      }
    })
a
Try with "some". Or the other way around, query for the user and include the "tags"
👍 1
z
Thank you