0

I try to update a state of some rows in my table game. My table has a foreignkey lobby to the lobby table, that has a name and a hash.

I try the following in TypeScript:

supabaseClient
    .from("game")
    .update({ state: closedGameState })
    .eq("lobby.name", lobbyName)
    .eq("lobby.hash", lobbyHash)
    .select("lobby(name, hash)");

But I get this error message:

{
  error: {
    code: "21000",
    details: null,
    hint: null,
    message: "UPDATE requires a WHERE clause"
  },
  data: null,
  count: null,
  status: 400,
  statusText: "Bad Request"
}

I am setting two where-clauses. So what am I doing wrong here? Thanks!

progNewbie
  • 4,362
  • 9
  • 48
  • 107

0 Answers0