Hi,
Please read the edit below.
There is a bug which prevents deletion of records from the store:
createTombstone gets called with the user defined record: https://github.com/paldepind/synceddb/blob/master/client/src/utils.js#L116
But it has a hard coded scheme, which expects properties like key and version: https://github.com/paldepind/synceddb/blob/master/client/src/utils.js#L162
So in my stores, my primary key is id and not key, so when the tombstone gets put into the store, a new record is created (with a new id), which prevents the deletion from being noticed.
Possible solution: Pass the primary key field name and its value to createTombstone.
Thank you for your great work!
Edit: I just noticed that a property with name key seems to be generated automatically for newly created records. I'm using a db with existing entities, so it doesn't have that.
Hi,
Please read the edit below.
There is a bug which prevents deletion of records from the store:
createTombstonegets called with the user defined record: https://github.com/paldepind/synceddb/blob/master/client/src/utils.js#L116But it has a hard coded scheme, which expects properties like
keyandversion: https://github.com/paldepind/synceddb/blob/master/client/src/utils.js#L162So in my stores, my primary key is
idand notkey, so when the tombstone gets put into the store, a new record is created (with a new id), which prevents the deletion from being noticed.Possible solution: Pass the primary key field name and its value to createTombstone.
Thank you for your great work!
Edit: I just noticed that a property with name
keyseems to be generated automatically for newly created records. I'm using a db with existing entities, so it doesn't have that.