You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updating (via IPostgrestTable.Set) nullable JObject field with null value fails with ArgumentException (Expected Value to be of Type: JObject, instead received: .)
Inserts are Ok, only updates fail.
Steps to reproduce
Table structure (non-relevant fields skipped):
public.analytics (
id bigint generated by default as identity not null,
properties jsonb null
)
varclient=new Supabase.Client(...);JObject?properties=null;varexisting=await client.From<Analytics>().Filter(x =>/* some filtering here */).Limit(1).Single();if(existing!=null){await client.From<Analytics>().Where(x => x.Id == existing.Id).Set(x => x.Properties, properties).Update();}else{varitem=new Analytics {Properties=properties};await client.From<Analytics>().Insert(item);}
Bottom code part (that handles Insert logic) works, but middle one (Update) does not: System.ArgumentException gets raised with Expected Value to be of Type: JObject, instead received: . message.
Expected behavior
Both code parts should work Ok.
System information
OS: Linux (Ubuntu)
NuGet package: Supabase, v1.1.1 and v1.0.5
Project .NET version: net8.0
Project nullable setting: enabled (<Nullable>enable</Nullable> in .csproj)
The text was updated successfully, but these errors were encountered:
Bug report
Updating (via
IPostgrestTable.Set
) nullable JObject field withnull
value fails with ArgumentException (Expected Value to be of Type: JObject, instead received: .)Inserts are Ok, only updates fail.
Steps to reproduce
Table structure (non-relevant fields skipped):
Model (non-relevant fields skipped):
Program code:
Bottom code part (that handles Insert logic) works, but middle one (Update) does not: System.ArgumentException gets raised with
Expected Value to be of Type: JObject, instead received: .
message.Expected behavior
Both code parts should work Ok.
System information
Supabase
, v1.1.1 and v1.0.5<Nullable>enable</Nullable>
in .csproj)The text was updated successfully, but these errors were encountered: