-
-
Notifications
You must be signed in to change notification settings - Fork 158
Inner Join Types Do Not Work Correctly #536
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
Comments
facing the same issue, but changing the type of is there a way to have the inner join query work for |
Hey @jdgamble555, the right query for this is: await supabase.from('posts').select('*, user:users!inner(*)'); This should make Querying embedded tables through columns ( |
@zineanteoh let me know if that works for you too! We have an example on our docs here but we might need to make it more front and center. |
@soedirgo - Thanks, that solved the problem! The docs show how to query, but as you can see above there is more than one way to query the results. Any query that works should also have correct typing. This would definitely stream line GH issues on the subject and confusion on possible queries. J |
👍 thanks for the feedback - this should get better as we get stricter with the typings, e.g. showing a type error instead of falling back to |
Need to address having MULTIPLE references to users. Like a Direct Message which can have user_id AND recipient_id plz |
Bug report
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
I made a simple repository. You can run
npx supabase start
, but it is not necessary. Just open the file in VS Code and see the problems.Here is the Test Types
Here is the Schema
Or if you want to manually test it:
Expected behavior
A clear and concise description of what you expected to happen.
I want to do an inner join and get the correct types.
What I want
Test 1 Returns
Test 2 Returns
Test 3 Returns
I really just need
test
to return the correct typing. It is clearly a required FK with only one option, so it shouldn't be null nor an array.System information
Additional context
I have looked at these related posts, but none quite state the same problem clearly:
J
The text was updated successfully, but these errors were encountered: