https://supabase.com/ logo
Join Discord
Powered by
# help
  • r

    RichCorbs

    09/10/2021, 3:29 AM
    Yep. This assumes you've set up foreign key relationships for team1 and team2.
  • p

    Prodigy7kX

    09/10/2021, 3:30 AM
    i did set up
  • p

    Prodigy7kX

    09/10/2021, 3:31 AM
    but the relationship is between the matches table and the teams table
  • r

    RichCorbs

    09/10/2021, 3:31 AM
    Sorry, I didn't study your schema closely enough. Those should be inside the "matches" parentheses.
  • r

    RichCorbs

    09/10/2021, 3:32 AM
    matches(*,local...(*),local...(*))
  • p

    Prodigy7kX

    09/10/2021, 3:33 AM
    no worries
  • p

    Prodigy7kX

    09/10/2021, 3:33 AM
    i did this, and it is throwing me an error
  • p

    Prodigy7kX

    09/10/2021, 3:34 AM
    "failed to parse select parameter (*,matches(local_team1:teams!team1(*),local_team2:teams!team2(*)),)" (line 1, column 66)
  • r

    RichCorbs

    09/10/2021, 3:34 AM
    Is it the extra comma?
  • p

    Prodigy7kX

    09/10/2021, 3:34 AM
    oh, it might be
  • p

    Prodigy7kX

    09/10/2021, 3:35 AM
    let me sese
  • p

    Prodigy7kX

    09/10/2021, 3:35 AM
    it was
  • p

    Prodigy7kX

    09/10/2021, 3:35 AM
    thank you very much sir
  • r

    RichCorbs

    09/10/2021, 3:35 AM
    Cool. What does
    single()
    do? Return one row?
  • p

    Prodigy7kX

    09/10/2021, 3:36 AM
    it returns a single object instead of returning an array with one object only
  • p

    Prodigy7kX

    09/10/2021, 3:36 AM
    with single
  • r

    RichCorbs

    09/10/2021, 3:37 AM
    TIL... That's nice. Didn't know that.
  • p

    Prodigy7kX

    09/10/2021, 3:37 AM
    hehe
  • p

    Prodigy7kX

    09/10/2021, 3:37 AM
    I'd buy you a beer if i could
  • p

    Prodigy7kX

    09/10/2021, 3:37 AM
    thank you very much, again
  • r

    RichCorbs

    09/10/2021, 3:38 AM
    You're welcome. Someone else helped me with that one when I came across it. :-)
  • p

    Prodigy7kX

    09/10/2021, 3:39 AM
    I'll be on the lookout to help the next one
  • r

    RichCorbs

    09/10/2021, 3:43 AM
    👍
  • r

    RLoris

    09/10/2021, 12:00 PM
    Hello, I would like to know if it's possible to add CORS rule policy to access a database only from a specific client ? If it's possible, can someone link me to the documentation, would really appreciate it ! thank you
  • s

    Scott P

    09/10/2021, 12:49 PM
    There's a thread on this message which has a discussion about it: https://discord.com/channels/839993398554656828/839993398554656831/871166066871636024 - There's also a different thread with more details: #871172819201953822
  • j

    jon

    09/10/2021, 1:57 PM
    yes, that's it. thanks!
  • j

    jmnoz

    09/10/2021, 2:25 PM
    hi - I am trying to create a trigger on my auth.users like this: https://github.com/supabase/supabase/issues/563#issuecomment-772954907 to update my public.users when a new user signs up but I get
    server_error&error_description=Database+error+saving+new+user
    returned when trying to sign up via Oauth on the client. Anyone have a clue?
  • h

    huga

    09/10/2021, 2:26 PM
    Hi! Can i use Prisma and Supabase Realtime APIs together?, im trying to make a query using Supabase API on a DB generated with Prisma, but i get this error: message: 'permission denied for schema public', I turn on all my tables, and im using service_role KEY, to bypass RLS, many thanks!
  • r

    RLoris

    09/10/2021, 2:35 PM
    thank you !
  • u

    user

    09/10/2021, 2:35 PM
    I had a similar issue and I saw a workaround which said to change the name of public.users to something else (I.E. accounts). I tried it whilst implementing this https://github.com/supabase/supabase/issues/563#issuecomment-772954907 (obviously swapping public.users to public.accounts) and it worked for me.
1...818283...316Latest