Closed kaushalkumar86 closed 2 months ago
Could you try doing:
[Column("created_at")] public DateTime CreatedAt { internal get; set; }
The postgrest-csharp attributes themselves are just boxing the JSON.NET attributes... if that doesn't work I'll see about adding an additional attribute. Maybe [RemoteOnly]
or [ReadOnly]
?
Could you try doing:
[Column("created_at")] public DateTime CreatedAt { internal get; set; }
The postgrest-csharp attributes themselves are just boxing the JSON.NET attributes... if that doesn't work I'll see about adding an additional attribute. Maybe
[RemoteOnly]
or[ReadOnly]
?
Its working, thanks
Can you please add a Non-updatable attribute?
I have this in my code:-
[Column("created_at")] public DateTime CreatedAt { get; set; }
In Supabase database, its set as timestamp and set to now().
While doing an insert from c#, if I do not set
CreatedAt
or set its value todefault
, its set as the epoch value in database. I have to setCreatedAt
value toDateTime.Now
from user device (which I do not want). I want it to have server'snow()
time to be set automatically, which is not working if I use attributeColumn
. If the attribute is set toPrimaryKey
(becausePrimaryKey
haspublic bool ShouldInsert { get; }
, its working but further updates are not happening. Can make an Attribute which is not primarykey, but system(server) updated?