-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Referencing missing column #930
Comments
Is there any PR which fixes those? I recently updated supabase-js version and generated new types and got similar issue, some database fields are not recognized anymore. I cant pinpoint the exact moment it stated to break tho. Edit: For me this solved it - #974 |
i got the same error |
Same here! |
same here... |
still an issue |
Same here. Weirdly, this works...
and this doesn't...
|
still an issue |
Got the issue too |
Same issue |
Any solution? |
I have the feeling it depends on in which direction or on which side the relation is defined. Still need to verify this. |
@ohrrkan As mentioned in the documentation here: We can infer types by doing this:
Worked for me. |
this works for me
|
A fix has been released in |
I am using v2.46.1, and I have same issue here |
Same issue |
We had to revert the fix in Please give |
Happy to announce that we just released v2.47.8 that include the typing inference rework which should fix this issue. |
@supabase/supabase-js": "^2.39.0" using Supabase CLI to [generate the types] "supabase": "^1.123.0"
Query the same referenced table multiple times work but give you a Typescript error as it expect an array.
to reproduce you can use the datasource (doc example)
query :
now using data[0].sender_id.name will work but will give you an typescript error. "sender_id: SelectQueryError<"Referencing missing column
name
">[];Bypass temporary solution :
type patch = { content: text; sender_id: Tables<"users">; receiver_id: Tables<"users">}[];
The text was updated successfully, but these errors were encountered: