https://www.prisma.io/ logo
#random
Title
# random
a

Arpan Bagui

09/27/2022, 12:18 PM
how to multiple fields from same model refer to another one model model . for ex: model tbl_delegate_map { id Int @id @default(autoincrement()) self_user_id Int? self_user tbl_user? @relation(fields: [self_user_id], references: [id]) delegate_user_id Int? delegate_user tbl_user? @relation(fields: [delegate_user_id], references: [id]) } model tbl_user { id Int @id @default(autoincrement()) self_users tbl_delegate_map[] delegate_users tbl_delegate_map[] }
Copy code
AnotherUser     AnotherUser? @relation(fields: [authorFirstName, authorLastName], references: [firstName, lastName])
you can add more than one fields to make relation
a

Arpan Bagui

09/27/2022, 5:29 PM
No not like that but anyway i got the solution in git. Thank you 😊
j

Jarupong

09/27/2022, 7:17 PM
That's awesome
5 Views