Skip to content

Sync error when updating a relationship from another device #538

@jphribovsek

Description

@jphribovsek

2 entities: Entity1 and Entity2
Entity1 has a 1 to many relationships to Entity2
If an object A of type Entity2 points to an object B of type Entity1, then we make A points to another objectC of type Entity1 in a single operation (without nullifying in between), then an error is logged on other devices

            SPLogError(@"Simperium error: member %@ from diff wasn't in change", key);

Problem is the change being received is a diff of the simperium key string for that relationship

{
o = d;
v = "-32\t+18567dcee3074f78b24def6ffc039904";
}

but SPMemberEntity expects the value to be the Simperium key itself, not a diff

I assume a workaround is to modify the schema to force a replace of those values instead of a diff, the same way we do with Transformables. However, you might still want to consider this a bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions