Skip to content
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

Types for column name disambiguation #450

Open
2 tasks done
wyozi opened this issue Jul 26, 2023 · 1 comment · May be fixed by #451
Open
2 tasks done

Types for column name disambiguation #450

wyozi opened this issue Jul 26, 2023 · 1 comment · May be fixed by #451
Labels
bug Something isn't working

Comments

@wyozi
Copy link
Contributor

wyozi commented Jul 26, 2023

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

PostgREST allows disambiguating relationships by using a column name as the target directly (see column name section of https://postgrest.org/en/stable/references/api/resource_embedding.html#embedding-disambiguation). However, select query parser in postgrest-js does not support this yet.

Personally I find column name disambiguation to be the superior method for embeds, so it would be nice to have this

To Reproduce

Use column name instead of foreign key constraint name or relation name as the target, i.e. .select('user:username(*)') instead of .select('user:users(*)')

@wyozi wyozi added the bug Something isn't working label Jul 26, 2023
@wyozi wyozi linked a pull request Jul 26, 2023 that will close this issue
@albinekb
Copy link

I have been using the patch from #451 for three months now, it's working great! Any chance of getting that merged? It's a bit messy to have to manage the patch. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants