Closed fan123199 closed 3 months ago
This is working as intended as primary keys are required to perform upsert.
well. the list of data that has no primary keys works well. That misled me. OK, I will do my work for two part, divide my list to 2 lists. and One insert , another one update, thanks for your reply
Describe the bug
when upsert a list of data, if some data has primary id , and some data has no primary id, it will report error.
if all has id or all has no id, it return ok.
table definition
id | bigint | number | sticker_id | text | string | count | smallint | number | user_id | uuid | string
error print
PostgrestException(message: null value in column "id" of relation "user_sticker" violates not-null constraint, code: 23502, details: Bad Request, hint: null)
Expected behavior It should be return OK
Version (please complete the following information): ├── supabase_flutter 2.3.4 │ ├── supabase 2.0.8 │ │ ├── gotrue 2.5.1 │ │ ├── postgrest 2.1.1 │ │ ├── realtime_client 2.0.1 │ │ ├── storage_client 2.0.1
Additional context Add any other context about the problem here.