penduDev penduDev - 4 months ago 21
Android Question

RealmResults.clear() throwing NotSupportedException

clear
method is deprecated in
RealmResults
0.89.1

I have used this method at some places in my code.
The latest docs doesn't have any updates about it.
What is the new method to delete all results from
Realm
?

Answer

RealmResults.clear() now throws UnsupportedOperationException. Use RealmResults.deleteAllFromRealm() instead.

https://github.com/realm/realm-java/blob/master/CHANGELOG.md