-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Filtering through foreign table doesn't respect join hint syntax #983
Comments
Please provide a reproducible example repo to test this in. The repo should include some data and a database schema. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@teodos this is not related and you should also provide your table details when posting. Your error is making reference to |
This comment was marked as off-topic.
This comment was marked as off-topic.
@teodos the docs clearly states how the |
I’ll see if I can find time to set up an example.
The simplest case I can think of is the messages example from the js docs with a users table and a message table that references users twice, once for sender and once for recipient.
…On Nov 6, 2024 at 4:13 PM -0800, Andrew Smith ***@***.***>, wrote:
@teodos the docs clearly states how the .or_ operator works and you aren't following it's syntax. As I've mentioned before your issue is not related to the OPs issue, you should open your own issue and stop adding to this one.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
@notjustinshaw I tested the message example from the docs and didn't get any issue with it. |
@notjustinshaw here is a screen recording of me testing the sample data you mentioned in the docs with the Python client. Turn your volume down as I might be a bit loud when talking in the video. supabase_py_983.mp4 |
I have a query in supabase-js that works, and when I translate it to supabase-py it doesn't work. I am on the latest version of each. From what I could gather while poking around, the python version doesn't seem to respect the join-hint PostgREST syntax for referencing tables with foreign keys.
Javascript
Python
Schema
The schema is what you would expect; a games table with two foreign keys each pointing at a team_season.
Error Message
In PostgREST, you are supposed to be able to reference aliased foreign keys like this. It shouldn't assume the column is a column on the games table. Instead it should use the join-hint to compute a path to that table based on the constraints/keys available between the games table and team_seasons table (in this case, there are two paths: fk_home_team_id and fk_away_team_id).
The text was updated successfully, but these errors were encountered: