-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Docs: "More than one relationship was found..." #745
Comments
Hey @AronBe - I'm not entirely sure if this is correct based on your description, but it may just be that PostgREST couldn't figure out which relationship to use. Does this look right? https://postgrest.org/en/v7.0.0/api.html#embedding-disambiguation
|
@kiwicopple I have tested replacing table name with the foreign key name in my query and it worked, thank you! Documentation would be helpful, but I understand I should probably go to the source which is how actually postgrest works 👍 |
Agreed, we should add some examples to our docs. I'll leave this open and see if anyone wants to help out 👍 |
Looks like we already have this example :) https://supabase.io/docs/reference/javascript/select#query-the-same-foreign-table-multiple-times |
I created a view which caused I deleted the view but still get the same error. |
@albertkimdev Can you share the full error message? With the |
@albertkimdev Also share the request |
@steve-chavez the issue was fixed by refreshing the cache after the view was deleted i think. |
It happened to me I deleted a column that had a foreign key constraint and for someone not working with databases, I didn't know it is a nono. It resulted in having multiple foreign keys after I added a new one to replace it.
Maybe we could either prevent it or warn the user that the foreign key should be first removed on the dropped column? Or remove the constraint with the column? Also, why can't have we have more foreign keys between 2 tables?
For those needing to resolve it and not having the column in the table editor, I have used sql editor to do it:
The text was updated successfully, but these errors were encountered: