How to fix this ambiguous relationship in prisma2 ...
# orm-help
r
How to fix this ambiguous relationship in prisma2 datamodel?
ø
This should work 🙂
Copy code
model User {
  id        String @default(cuid()) @id
  name      String
  posts     Post[] @relation(name: "UserPosts")
  bookmarks Post[]
}

model Post {
  id     String @default(cuid()) @id
  title  String
  author User?  @relation(name: "UserPosts")
}
😍 1