Realm v0.88.0 Release Notes

Release Date: 2016-03-10 // about 8 years ago
    • โšก๏ธ Updated Realm Core to 0.97.0.

    ๐Ÿ’ฅ Breaking changes

    • ๐Ÿ”Œ Realm has now to be installed as a Gradle plugin.
    • DynamicRealm.executeTransaction() now directly throws any RuntimeException instead of wrapping it in a RealmException (#1682).
    • DynamicRealm.executeTransaction() now throws IllegalArgumentException instead of silently accepting a null Transaction object.
    • String setters now throw IllegalArgumentException instead of RealmError for invalid surrogates.
    • ๐Ÿ‘ DynamicRealm.distinct()/distinctAsync() and Realm.distinct()/distinctAsync() now throw IllegalArgumentException instead of UnsupportedOperationException for invalid type or unindexed field.
    • All thread local change listeners are now delayed until the next Looper event instead of being triggered when committing.
    • โœ‚ Removed RealmConfiguration.getSchemaMediator() from public API which was deprecated in 0.86.0. Please use RealmConfiguration.getRealmObjectClasses() to obtain the set of model classes (#1797).
    • Realm.migrateRealm() throws a FileNotFoundException if the Realm file doesn't exist.
    • It is now required to unsubscribe from all Realm RxJava observables in order to fully close the Realm (#2357).

    ๐Ÿ—„ Deprecated

    • 0๏ธโƒฃ Realm.getInstance(Context). Use Realm.getInstance(RealmConfiguration) or Realm.getDefaultInstance() instead.
    • Realm.getTable(Class) which was public because of the old migration API. Use Realm.getSchema() or DynamicRealm.getSchema() instead.
    • Realm.executeTransaction(Transaction, Callback) and replaced it with Realm.executeTransactionAsync(Transaction), Realm.executeTransactionAsync(Transaction, OnSuccess), Realm.executeTransactionAsync(Transaction, OnError) and Realm.executeTransactionAsync(Transaction, OnSuccess, OnError).

    โœจ Enhancements

    • ๐Ÿ‘Œ Support for custom methods, custom logic in accessors, custom accessor names, interface implementation and public fields in Realm objects (#909).
    • ๐Ÿ‘Œ Support to project Lombok (#502).
    • RealmQuery.isNotEmpty() (#2025).
    • Realm.deleteAll() and RealmList.deleteAllFromRealm() (#1560).
    • RealmQuery.distinct() and RealmResults.distinct() (#1568).
    • RealmQuery.distinctAsync() and RealmResults.distinctAsync() (#2118).
    • ๐Ÿ‘Œ Improved .so loading by using ReLinker.
    • ๐Ÿ‘Œ Improved performance of RealmList#contains() (#897).
    • distinct(...) for Realm, DynamicRealm, RealmQuery, and RealmResults can take multiple parameters (#2284).
    • "realm" and "row" can be used as field name in model classes (#2255).
    • RealmResults.size() now returns Integer.MAX_VALUE when actual size is greater than Integer.MAX_VALUE (#2129).
    • โœ‚ Removed allowBackup from AndroidManifest (#2307).

    ๐Ÿ› Bug fixes

    • โœ… Error occurring during test and (#2025).
    • โœ… Error occurring during test and connectedCheck of unit test example (#1934).
    • ๐Ÿ› Bug in jsonExample (#2092).
    • Multiple calls of RealmResults.distinct() causes to return wrong results (#2198).
    • Calling DynamicRealmObject.setList() with RealmList (#2368).
    • RealmChangeListeners did not triggering correctly if findFirstAsync() didn't find any object. findFirstAsync() Observables now also correctly call onNext when the query completes in that case (#2200).
    • Setting a null value to trigger RealmChangeListener (#2366).
    • Preventing throwing BadVersionException (#2391).

    Credits

    • โœ… Thanks to Bill Best (@wmbest2) for snapshot testing.
    • Thanks to Graham Smith (@grahamsmith) for a detailed bug report (#2200).