(Wrong repo) First row of self referencing table #2270
Unanswered
TheCataliasTNT2k
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
-
How can I add the first row to a table, that has a self referencing column?
There is an example, how to create such a column: https://www.sea-ql.org/SeaORM/docs/relation/self-referencing/
But how to insert the first row into that table?
I can not reference a row if there is none, and if I try to reference the row by itself, I get an error:
Execution Error: error returned from database: (code: 1) foreign key mismatch - "user" referencing "user"
EDIT: Wrong repo, moved here: SeaQL/sea-orm#1354
Beta Was this translation helpful? Give feedback.
All reactions