Skip to content

How to investigate "No relationship between table1 and table2" error #258

Discussion options

You must be logged in to vote

Hi @richcorbs.

Looks like you have two relationships between races and registrations - a one-to-many and a many-to-many. In these cases, you need to disambiguate the request for getting your desired response.

If you do:

supabase.from('events').select("*,event_teams(*,teams(*)),races(*,registrations(*),finishers(*))")

Then you'll get the error:

{
  "hint": "By following the details key, disambiguate the request by changing the url to /origin?select=relationship(*) or /origin?select=target!relationship(*)",
  "details": [
    {
      "relationship": "fk_race[id][race_id]",
      "origin": "public.races",
      "cardinality": "o2m",
      "target": "public.registrations"
    },
    {
      "…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kiwicopple
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants