-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ChangeListener is not being called on RealmObject #4984
Comments
This is expected behavior, see documentation:
And if the object did not exist, then the query will return with You can also see #4360 (comment) and #4352 (comment) If you need to observe whether a RealmObject exists, then you'll need to obtain |
That means copyOrUpdate remove object if it want to updateIt? |
No, but it means that if the object didn't exist, then |
ok I understand |
Hello. @GitHubMurt As @Zhuinden said, this is expected behavior. I am closing this issue. If you have another idea, feedback, we can discuss it in another issue. Thanks. |
classpath "io.realm:realm-gradle-plugin:3.5.0"
I'm converting objects froming from realm to LiveData (lastly introduced) using extension method
fun<T: RealmObject> T.asLiveData(realm: Realm) = LiveDataRealmObject(this, realm)
Belo is how I convert RealmObject from Realm to set them to LiveData
LiveDataRealmObject::class
I retrieve results like this.
And save new one, either override like this
However listener of LiveDataRealmObject is not called - it is called just one after first results came.
This works if I'would operate on RealmResults by quering .findAllAsync()
The text was updated successfully, but these errors were encountered: