Replies: 3 comments 2 replies
|
I am glad that you were able to figure it out. You can post your answer here in separate thread and mark it as an answer. That way other people can also find the solution. |
|
A reference to a discussion with relevant explanation - issue 1483 Prisma code with solution: model User {
id Int @id @default(autoincrement())
clientAppointment Appointment[] @relation("clientUser")
providerAppointment Appointment[] @relation("providerUser")
}
model Appointment {
id Int @id @default(autoincrement())
clientUser User @relation("clientUser", fields: [clientUserId], references: [id])
clientUserId Int
providerUser User? @relation("providerUser", fields: [providerUserId], references: [id])
providerUserId Int
}Thanks @pantharshit00 |
|
Hi there, To keep our discussions organized and focused on the most relevant topics, we’re reviewing and tidying up our backlog. As part of this process, we’re closing discussions that have already been marked as answered but remain open. If this discussion still requires further input or clarification, feel free to reopen it or start a new one with updated details. Your contributions are invaluable to the community, and we’re here to help! For more details about our priorities and vision for the future of Prisma ORM, check out our latest blog post: https://www.prisma.io/blog/prisma-orm-manifesto. Thank you for your understanding and ongoing support of the Prisma community! |
A reference to a discussion with relevant explanation - issue 1483
Prisma code with solution:
Thanks @pantharshit00