Typescript SDK bug for tables without primary keys
There appears to be an issue in the typescript SDK specifically with tables that do not have a primary key.
Symptoms: When an entry in a table without a primary key is inserted or deleted the change may not be reflected in the client cache and onInsert events may not be fired. This isn't 100% consistent and I suspect it may be related to inserting and deleting rows within the same transaction.
Are you deleting and re-inserting the same row within a single transaction? If so, it is intended behavior that SpacetimeDB treats these as no-ops and does not broadcast any event to clients.
Are you deleting and re-inserting the same row within a single transaction? If so, it is intended behavior that SpacetimeDB treats these as no-ops and does not broadcast any event to clients.
No this is definitely distinct rows. There is also this warning that is being printed from the sdk which I think indicates that something wrong is going on: ⚠️ WARN Deleting a row that was not present in the cache
Actually the warning printed above happens during a transaction that deletes a single row from a table. So there isn't even an insert/delete happening in the same transaction. This is just a single delete.