Open zoul0813 opened 6 years ago
I did a few more tests, it looks like the issue is related to Cognito Sync Events.
When the remote record is marked as deleted, the Cognito Sync Event trigger is calling the lambda function with 'recordKey': null
rather than 'recordKey': { oldValue: null, newValue: 'whatever', op: 'replace' }
I'm attempting to create a dictionary of values in a dataset, when I add a key to the dataset and synchronize everything works fine. If I delete that key by calling
dataset.remove
and synchronize everything works fine here too.The problem is when I try to add that same key back in after it's been removed previously and synchronize. My local dataset shows the value, and when I call
dataset.synchronize
none of my callbacks are being fired ... but I can see the request in Chrome's network log, as well as in the Cognito Sync Event trigger that is being called.I enabled logging on the sync manager, and during a successful sync (adding or removing the item for the first time), I get a
sync successful
message ... however, when trying to add the item back in and sync, the last message I get isNothing updated remotely. Pushing local changes to remote.