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

Cross-table filtering in or() is not supported in query builder #1069

Open
academix-admin opened this issue Oct 21, 2024 · 0 comments
Open
Labels
bug Something isn't working postgrest This issue or pull request is related to postgrest

Comments

@academix-admin
Copy link

The current Supabase Dart/Flutter query builder does not support cross-table filtering inside an .or() clause when using joins. For example, in a query like:

Query: 1
.or('<tableA>.<columnA>.<eq>.<valueA>, <tableB>.<columnB>.<eq>.<valueB>')

Query: 2
.or(<columnA>.<eq>.<valueA>, <tableB>.<columnB>.<eq>.<valueB>',referencedTable: <tableA>)

Throws an Error: code: PGRST100

As supposed on sql query:
SELECT * FROM tableA AS a LEFT JOIN tableB AS b ON a.columnA1 = b.columnB1 WHERE a.columnA2 = <valueA> OR b.columnB2 = <valueB>;

@academix-admin academix-admin added the bug Something isn't working label Oct 21, 2024
@dshukertjr dshukertjr added the postgrest This issue or pull request is related to postgrest label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postgrest This issue or pull request is related to postgrest
Projects
None yet
Development

No branches or pull requests

2 participants