Skip to content
New issue

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

Simperium error “member […] from diff not in change” when updating a relationship attribute from JS backend #16

Open
bayareacoder opened this issue Dec 11, 2014 · 0 comments

Comments

@bayareacoder
Copy link

In IOS Core Data, I have an Item entity with a To-One relationship attribute named 'itemRelKiosk' that points to a Kiosk entity. I'm updating this relationship field from a Javascript backend by writing the simperiumKey value of the kiosk object I want to point to. The relationship property is of type string in JS.

I see on the Simperium data browser website that the value is correctly written. On the IOS side, when I clear the local data store and thus do a full indexing upon app startup, the relationship is correctly setup. But when there is a local datastore I get the error below and the relationship in Core Data shows as (null). I see the same with Simperium v0.6.8 and v0.7.5.
It seems IOS is receiving a 'd' operation (full object) and thus is expecting a replacement string, but is only receiving a diff string?

2014-12-04 20:40:41.158 AppClient[473:59649] Simperium () received "11:c:[{"sv": 28, "clientid":
"sjs-2014030401-a971a4f2ccf064ed31f1", "id": "85b0b6987cde15070b78", "o": "M", "v":
{"itemRelKiosk": {"o": "d", "v": "-9\t=2\t-8\t+9827ae7e6639b67b3\t=1"}}, "ev": 29, "cv":
"54813748a61f561034764f04", "ccids": ["2bb6436dd37de0298980d800fe5674cf"]}]"

2014-12-04 20:40:41.161 AppClient[473:59649] Simperium handling changes (Item) (
{
ccids = (
2bb6436dd37de0298980d800fe5674cf
);
clientid = "sjs-2014030401-a971a4f2ccf064ed31f1";
cv = 54813748a61f561034764f04;
ev = 29;
id = 85b0b6987cde15070b78;
o = M;
sv = 28;
v = {
itemRelKiosk = {
o = d;
v = "-9\t=2\t-8\t+9827ae7e6639b67b3\t=1";
};
};
})
2014-12-04 20:40:41.167 AppClient[473:59649] Simperium client ios-
0e26886f0859411882a543047f20d0a1 received change (Item) sjs-2014030401-a971a4f2ccf064ed31f1 [M]
: {
ccids = (
2bb6436dd37de0298980d800fe5674cf
);
clientid = "sjs-2014030401-a971a4f2ccf064ed31f1";
cv = 54813748a61f561034764f04;
ev = 29;
id = 85b0b6987cde15070b78;
o = M;
sv = 28;
v = {
itemRelKiosk = {
o = d;
v = "-9\t=2\t-8\t+9827ae7e6639b67b3\t=1";
};
};}
2014-12-04 20:40:41.170 AppClient[473:59649] Simperium received version = 28, previous version = 28
2014-12-04 20:40:41.176 AppClient[473:59649] Simperium error: member itemRelKiosk from diff wasn't in change
2014-12-04 20:40:41.178 AppClient[473:59649] Simperium MODIFIED ghost version 29 (Item-Item)
2014-12-04 20:40:41.179 AppClient[473:59649] Simperium non-local MODIFY ENTITY received
2014-12-04 20:40:41.197 AppClient[473:59649] Simperium applying diff: {
itemRelKiosk = {
o = d;
v = "-9\t=2\t-8\t+9827ae7e6639b67b3\t=1";
};
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant