© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
Bomzelis

Filtering results by foreign key via cURL request

Hello, I've just recently started with Supabase and RESTapi request and I've came across the issue where my results cannot be filtered by foreign key value. When I filter them with the same table column, everything works perfectly. However, once I try to filter it with a foreign key, it returns my filtered query in addition to unwanted data with NULL field instead of previous value.

My example look like this:

Table 1 - Orders

SKU(same value as table 2)
owner_foreign_key(FK)

Table 2 - Vehicles
SKU (same value as table 1)
owner_name [array]

example.supabase.co/rest/v1/orders?owner_foreign_key.owner_name=eq.{owner_name}&select=SKU,owner_foreign_key(owner_name)

Maybe someone could point me to the right direction or assist me into filtering further to ignore the NULL values and only return the queried owner_name value. Thank you!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Filtering by foreign key & .or
SupabaseSSupabase / help-and-questions
4y ago
POST request using foreign key-table
SupabaseSSupabase / help-and-questions
4y ago
Composite key foreign key issue
SupabaseSSupabase / help-and-questions
6mo ago
violates foreign key constraint
SupabaseSSupabase / help-and-questions
4y ago