The table editor shows an incorrect foreign key relation with composite foreign keys #16916
Replies: 8 comments
-
Hey there! Sorry it took us so long to get to your issue - we're just looking into this right now As at the current state of the dashboard the relation descriptions under but the relation descriptions under |
Beta Was this translation helpful? Give feedback.
-
How is this topic going? |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. My composite foreign key was defined like this: We can see in the screenshot below how it looks like both course id and number have hole_information.number as its foreign key relation. |
Beta Was this translation helpful? Give feedback.
-
Hey folks - me and the team here are looking at a visual solution for composite foreign keys today and I'll post an update shortly on what we might propose. This will be so we officially support composite foreign keys in the dashboard, and issues like this won't be an issue anymore. We would also like to solve the issue of creating composite foreign keys in the dashboard which will probably mean having some 'mapping UI' so you can easily associate the right columns together to a target table. will update shortly. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
We'll probably look at implementing this soon, we are just prioritizing some other areas right now. Feel free for anyone else to take this though and implement it themselves, if you don't want to wait on the supabase team to implement it. |
Beta Was this translation helpful? Give feedback.
-
Related to #2481 perhaps, as we can maybe handle naming of FK constraints as well |
Beta Was this translation helpful? Give feedback.
-
Hi @MildTomato, it seems like half of this was implemented (showing/creating composite FKs) but when inserting a new record, the bug remains.
What we see when clicking "Insert row": "Has a foreign key relation to public.sample1.pk1" under each of pk1 and pk2 (instead of respectively __.pk1 and __.pk2). And when clicking the Any updates on this? |
Beta Was this translation helpful? Give feedback.
-
Bug report
Describe the bug
The table editor shows an incorrect foreign key relation when a table has a composite foreign key.
To Reproduce
Screenshots
System information
Beta Was this translation helpful? Give feedback.
All reactions