Stackberry / Stackberry-iOS-Example

Example of how to use the Stackberry iOS SDK
0 stars 0 forks source link

Receiving Realm Update Notifications for Properties That Were Not Changed #1

Open jeffreyhanna opened 7 years ago

jeffreyhanna commented 7 years ago

Overview

When receiving object-level notifications from Realm as a result of updating an object using the Stackberry.sync(_:) method, properties which did not change are listed as updated

Steps to Reproduce

  1. Observe notifications on an object in the Realm
  2. Change that object externally (from another device)
  3. Sync the object

Issue

Some properties are listed that were not updated (e.g. oldValue == newValue)

Desired Result

Realm notification should only list properties that were changed

jeffreyhanna commented 7 years ago

We are aware of this issue and working on a solution. Ideally Realm would omit PropertyChanges if the value did not change, but we can work around this issue ourselves by checking the old and new values and omitting keys from the update dictionary. I will update this issue when a fix is available. Thank you for your patience and understanding