I've recently been trying to create a database in supabase, but I've encountered a very strange issue.
I've created a few tables, including an intermediary table with foreign keys. As a result, certain columns have the same value many times. In this instance, the table represents which users have which collectibles, and how many, so there are obviously a lot of rows with the same user.
I'm trying to query data using the REST api, and it works fine, unless the data it should return has duplicate values. So this query
/rest/v1/user_collectibles?quantity=eq.2
works totally fine (returning the row that has a quantity of 2) while these are the values for the quantities of existing entries...
...but breaks the moment these are the values for existing entries.
It's not an authorisation issue- at least, not to my knowledge- as even when it fails, I get a code 200 (success) from the result of the http request. It's just that the result body is empty.
I originally thought it might be due to the fact that I was using a composite primary key, but I changed it to use an increasing number as the primary key and it still broke.
Can anybody explain why this is happening? Does the rest API have some issue that only occurs when the returning value would contain two matching pieces of data? If so, that sounds extremely inefficient, so I can only imagine the issue is something that I'm doing.
Edit: My god the screenshots are atrocious. I simply cannot make this bastard website handle images well. Sorry about that.
JackRaven_ is experiencing an issue with the Supabase REST API when querying a database table that contains duplicate values. Although the API returns a 200 success code, the response body is empty when duplicate data is involved. The user has tried changing the primary key setup but the issue persists.