We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While working on a project we noticed that certain changes were lost on the iOS client.
Attempted Fix: #546 (this work but requires some testing)
Remote Change Discarded (when defaults values are set in core data model)
Model Assume we have an entity note which have the following attributes
{ title: <String> text: <String> likes: <Int> (**default value set to 0 in core data model**) }
HTTP API
{ title: “new note” }
{ title: “new note” text: “some text” }
This counts as 2 changes and the version should now be "2".
iOS Client When this object gets to the iOS client, the first change comes and the notes object is created with the following ghost data
however the core data MangedObject is
{ title: “new note” likes: 0 }
when the second change comes in, it gets overwritten by the diff between the ManagedObject in memory and it’s ghostData.
diff = { likes = { o = r; v = 0; }; }
see https://github.com/Simperium/simperium-ios/blob/develop/Simperium/SPChangeProcessor.m#L316 This causes the remote change to be overwritten and thereby losing data. Moreover when the next sync occur the client sends the change that causes “text” to be set back to nil.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While working on a project we noticed that certain changes were lost on the iOS client.
Attempted Fix: #546 (this work but requires some testing)
Remote Change Discarded (when defaults values are set in core data model)
Model
Assume we have an entity note which have the following attributes
HTTP API
This counts as 2 changes and the version should now be "2".
iOS Client
When this object gets to the iOS client, the first change comes and the notes object is created with the following ghost data
however the core data MangedObject is
when the second change comes in, it gets overwritten by the diff between the ManagedObject in memory and it’s ghostData.
see https://github.com/Simperium/simperium-ios/blob/develop/Simperium/SPChangeProcessor.m#L316
This causes the remote change to be overwritten and thereby losing data. Moreover when the next sync occur the client sends the change that causes “text” to be set back to nil.
The text was updated successfully, but these errors were encountered: