Can't join supabase users table on query

Hi everyone! Im facing this issue
I created a table which is called "messages"
messages
  - id int8
  - body varchar(255)
  - user_id uid 

my usecase is that i want to retrieve messages within users ( when signup it will create new record on users table ) but it doesn't work
supabase.from('messages').select("id, body, users (email)")

I searched google and found a solution that because default user table is private, so we need to create another table (account) to store users and create a trigger for DB, everytime when signup then insert record to account table
Was this page helpful?