Embedded Object Sync

Hi,
I’m currently designing my database classes/schemas and I like the embedded object feature. To understand the syncing process I just have one question.
If I change one property of an embedded object, does Realm Sync has to sync the whole object + the parent object also? Or which parts actually get synced?:
a) only the property
b) the whole embedded object (which might include children , if there are any)
c) the whole embedded object + all parents

Thank you

Hi David – This depends a little on what the actual change to the database is. Realm generally sends diffs/changes at the leaf-level so if a single property is updated then the change sent to the client would be the property + metadata describing the change (most closely corresponding with A).

One area where you may see additional information being sent as a part of the change is if you are performing ‘replaces’ at the document-level directly to MongoDB – In this case we will send the entire new top-level document, corresponding to C).

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.