You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Receive updates through a RealmChangeListener, when a managed object is deleted, then replaced in one transaction. The new object has the same key, but other fields are updated.
Actual Results
For a RealmObject type with no Primary Key, the listener was triggered. (Pass)
For a RealmObject type with an int Primary Key, the listener was triggered. (Pass)
For a RealmObject type with a String Primary Key, the listener was not triggered. (Fail)
Steps & Code to Reproduce
See attached Android Studio project, which demonstrates the behavior.
Pre-condition: two records in Realm (one with no PK, one with a String PK).
Register a RealmChangeListener for each type.
Replace each object (in separate transactions) - this is done on an RxAndroid chain.
a. This is done by using deleteAllFromRealm, then inserting the new object
with copyToRealm.
b. The key of the new object is the same as the deleted one, but other
fields are updated.
Version of Realm and tooling
Realm version(s): 7.0.0 and up.
I bisected through Realm versions. 6.1.0 was "good" and 7.0.0 was "bad"
Realm Sync feature enabled: No
Android Studio version: 4.0
Android Build Tools version: 30.0.1, and 29.0.3. Same results.
Gradle version: 3.4.0 and 4.0.0. Same results.
Which Android version and device(s): Android 9 and 10, various devices. Originally reported on S10+ with Android 9.
Goal
Receive updates through a RealmChangeListener, when a managed object is deleted, then replaced in one transaction. The new object has the same key, but other fields are updated.
Actual Results
Steps & Code to Reproduce
See attached Android Studio project, which demonstrates the behavior.
a. This is done by using deleteAllFromRealm, then inserting the new object
with copyToRealm.
b. The key of the new object is the same as the deleted one, but other
fields are updated.
Version of Realm and tooling
Realm version(s): 7.0.0 and up.
I bisected through Realm versions. 6.1.0 was "good" and 7.0.0 was "bad"
Realm Sync feature enabled: No
Android Studio version: 4.0
Android Build Tools version: 30.0.1, and 29.0.3. Same results.
Gradle version: 3.4.0 and 4.0.0. Same results.
Which Android version and device(s): Android 9 and 10, various devices. Originally reported on S10+ with Android 9.
ChangeListenerBug.zip
The text was updated successfully, but these errors were encountered: