Hello guys, I hava a very basic Schema with implic...
# orm-help
a
Hello guys, I hava a very basic Schema with implicit many to many relation between two models (User > Post > Likes) here: I Just want to know how can i query through prisma if the many to many relation exist for the given userID? scratching my head for so long! any help would be much appreciated. Thank you
Copy code
model User {
  id                         Int                          @id @default(autoincrement())
  username                   String?                      @unique 
  Post                       Post[]   
  PostLike                   Post[]                       @relation("likeTable")
}

model Post {
  id          Int           @id @default(autoincrement())
  content     String?
  userId      Int
  user        User          @relation("posts", fields: [userId], references: [id])
  Likes       User[]        @relation("likeTable")
}
n
Hey Ankit 👋 What query are you trying to invoke?