Hi all. New to supabase here. I am trying to selec...
# help
p
Hi all. New to supabase here. I am trying to select from a table in the "public" schema, and join it to the users table in the
auth
schema, but I get an error. Query:
Copy code
let q = supabase
    .from<Message[]>('messages')
    .select('*, channel:channel_id(id, name), user:user_id(id, email)')
    .order('created_at', { ascending: false })
    .limit(100)
Error:
Copy code
"Could not find a relationship between 'messages' and 'user_id' in the schema cache"`
n
Hello @philnat0r! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
g
You cannot use the auth schema thru the api. You.need to make a public copy of your desired user data https://supabase.com/docs/guides/auth/managing-user-data. You can also use a security definer function to access it.
p
Thanks @garyaustin - Will read up on it. I've found that the structure of the documentation very often makes me go to Google to find stuff, but I can't really point out a specific reason why that is 😦