Why can't two foreign keys refer the same primary key of a table ? #2410
Replies: 6 comments 2 replies
-
This is really meant for stack overflow. You solve with 2 separate
|
Beta Was this translation helpful? Give feedback.
-
Thanks for replying, Error validating model "FollowRequest": Ambiguous relation detected. The fields
|
Beta Was this translation helpful? Give feedback.
-
Updated original answer |
Beta Was this translation helpful? Give feedback.
-
Now getting following error. Error validating model "FollowRequest": Automatic related field generation would cause a naming conflict. Please add an explicit opposite relation field. |
Beta Was this translation helpful? Give feedback.
-
Try StackOverflow then. This is really for bug or feature request. I know this works, but I am not sure how to help, I am new to this. |
Beta Was this translation helpful? Give feedback.
-
@Akxe Figured out above is the way to achieve the same. |
Beta Was this translation helpful? Give feedback.
-
@relation(fields: [userId, followId], references: [id]) throws unexpected error!
Why can't two foreign keys refers the same primary key of a table ?
Beta Was this translation helpful? Give feedback.
All reactions