Return .single() for an inner join? #7610
Replies: 6 comments 25 replies
-
Hm, so would you say that for your model, a user always has a single subscription and it's a single customer? |
Beta Was this translation helpful? Give feedback.
-
Any progress on this? I'm in the same situation where the inner join for a parent should always be singular. |
Beta Was this translation helpful? Give feedback.
-
is there a plan to implement this in supabase_flutter also? |
Beta Was this translation helpful? Give feedback.
-
@steve-chavez have you guys published something related to this recently? After adding a Small add-on to my plan, my inner joins are now returning {} instead of an array [{}]. That change broke my entire application. |
Beta Was this translation helpful? Give feedback.
-
Has anyone gotten the correct typescript types to be generated here? I'm on the new version of Postgrest (10.1.2) but typescript still thinks this could be either a list or a single item (even though it always returns just a single object) |
Beta Was this translation helpful? Give feedback.
-
What is working in my case is: |
Beta Was this translation helpful? Give feedback.
-
I have a query I'm running like this:
This returns a User object, with a nested array of Customers and Subscriptions. Each User however should only have one Subscription and Customer object attached though. Is there a way to essentially call
.single()
on those inner joins?EDIT: To clarify, I have a
customers
andsubscriptions
table, and each have auser_id
column tied tousers
.Beta Was this translation helpful? Give feedback.
All reactions