When executing findAll()
or findAllAsync()
query in Realm, without explicit sorting, such as:
RealmResults<MyRealmObject> results = realm.where(MyRealmObject.class).findAll();
what is the order of elements accessible through the RealmResults
object?
- Is it ordered by
@PrimaryKey
if there is one? If so, is it ascending or descending? - Is it the order in which the objects were inserted in the first place?
- Is it random?
- Is it nondeterministic?
Also, is this realm-core or platform specific, for example does the behavior differ between realm-java and realm-cocoa?