Issue with cyclic dependency defining foreign keys #4514
Unanswered
outofthisworld
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Having an issue when defining foreign keys on relations which are required to reference each other. Because
userTable
needs to importagencyTable
to referenceagencyTable.id
andagencyTable
needs to importuserTable
to referenceuserTable.id
i'm experiencing issues.Having them in the same file, or even splitting the the table constraints into seperate files doesn't fix the issue. How can I do this and fix the issue? removing one side of the FK works.. but its not ideal because I want to enforce referential integrity on both sides.
Beta Was this translation helpful? Give feedback.
All reactions