You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set up generated typescript types in my project and they work well until I try to get related data.
I have a call like this: supabase.from('group').select('displayName, event (id)')
And it outputs the following return type: { error: true; } & "could not find the relation between group and event"
If you ignore typescript errors, the query works without errors and gets the correct embeded data.
I attach the chunk of the generated db types from both event and group tables.
This is a one-to-many relationship, one group can have many events assigned (through promoter column in event table). Promoter is not primary key but since it is not a many-to-many relationship I think it is not necessary, right? I would appreciate some help. Thanks!
The text was updated successfully, but these errors were encountered:
Hi @soedirgo, I updated everything but the exact same type error is still there. I remind that the call to supabase actually returns the correct data, it's only the types that fail.
Bug report
Describe the bug
I have set up generated typescript types in my project and they work well until I try to get related data.
I have a call like this:
supabase.from('group').select('displayName, event (id)')
And it outputs the following return type:
{ error: true; } & "could not find the relation between group and event"
If you ignore typescript errors, the query works without errors and gets the correct embeded data.
I attach the chunk of the generated db types from both
event
andgroup
tables.This is a one-to-many relationship, one
group
can have manyevents
assigned (throughpromoter
column inevent
table).Promoter
is not primary key but since it is not a many-to-many relationship I think it is not necessary, right? I would appreciate some help. Thanks!The text was updated successfully, but these errors were encountered: