-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
Describe the bug
RealtimeChannel's response isn't parsed correctly.
Both RealtimeChannel.Model<T>()
and PostgresChangesEventArgs.Response.Payload.Data.Record.Record
are defaults values.
To Reproduce
Subscribe to a table with RealtimeChannel.OnUpdate
Expected behavior
Getting correct data that's been updated
Screenshots
[Table("maintenance")]
public class SchemaMaintenance : BaseModel
{
[PrimaryKey("forced_version", false)] public string ForcedVersion { get; set; }
[Column("is_on_maintenance")] public bool IsOnMaintenance { get; set; }
}
public static void StartConnectedDeviceWatcher()
{
var channel = SupabaseManager.app.Realtime.Channel("realtime", "public", "maintenance");
channel.OnUpdate += (object sender, PostgresChangesEventArgs a) =>
{
var m = a.Response.Model<SchemaMaintenance>();
Console.WriteLine("Item updated: " + a.Response.Payload.Data.Record.Record);
};
channel.Subscribe().ContinueWith(HandleErrors);
}
The following screenshot showcases what's happening in RealtimeChannel.Model()
System information
- OS: Windows (Unity)
Additional context
I'd like to add that it was not clear to me as what to put in database
field of Channel() :
As my table was in the postgres
database, i had a though time to figure it out :p
Guillaume
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working