Hi everyone, i have a question. async function ...
# help
f
Hi everyone, i have a question. async function getPost() { const { data, error } = await supabase .from('posts') .select(
Copy code
user_id (
        email
      )
) getPosts(data) console.log(data, error) } This code doesn't work Error message: {message: "Could not find a relationship between 'posts' and 'user_id' in the schema cache", hint: "Verify that 'posts' and 'user_id' exist in the sch…ship was created, try reloading the schema cache."}
g
If user_id is a foreign key to another table, you need to put the table name there.
f
Yes another table but auth.users table
is it problem?
g
You can't access auth from supabase.js
f
😦
You can create a public user table, or you can use an rpc function.
f
how do i solve that problem, any ideas?
I try. but doesn't work. i create new user, but profiles tables didn't update
g
In general the public table insert trigger works. Many users do that, I do that with a profile table. Probably need to debug or ask for help on your issues with that.
f
Okey, thank you