Add RealmList.removeAllFromRealm and Realm.clear#2061
Conversation
|
@realm/java |
There was a problem hiding this comment.
How about rearranging items.
* Added RealmQuery.isNotEmpty() (#2025). (Thank you @stk1m1)
* Added Realm.remove(RealmObject), Realm.remove(Iterable) and Realm.removeAll() (#1560).
* Improved performance of RealmList#contains() (#897).
|
what happens when a pending insert transaction is running in the background. I guess |
|
@nhachicha Yep, i think so. |
4621881 to
504b146
Compare
There was a problem hiding this comment.
Why not use the constants CLASS_CAT and CLASS_DOG?
2c4aeaa to
55be9a1
Compare
|
@beeender Just noticed we have a |
|
@cmelchior I don't have strong opinion on both names. We might be able to have another function which is close to the word |
|
|
|
retest this please and god bless me |
There was a problem hiding this comment.
What does this test?
- IllegalStateException will be thrown if the
RealmListis not managed. - IllegalStateException will be thrown if the
RealmListcontains standalone object.
I think we should split this into two tests.
There was a problem hiding this comment.
oh, testRealmRemoveAllNotManagedList already exists and it does not throw the IllegalStateException.
so, this tests IllegalStateException will be thrown if the RealmList contains standalone object.
There was a problem hiding this comment.
- "IllegalStateException will be thrown if the RealmList is not managed." This doesn't throw if every object is managed.
See testRealmRemoveAllNotManagedList - "IllegalStateException will be thrown if the RealmList contains standalone object." This is what this test do.
- A standalone object in a managed RealmList is not possible, so no test case for it.
Close #1560