Realm Xamarin v0.81.0 Release Notes

Release Date: 2016-12-14 // over 7 years ago
  • ๐Ÿ’ฅ Breaking Changes

    • ๐Ÿ—„ The IQueryable<T>.ToNotifyCollectionChanged extension methods that accept parameters are now deprecated. There is a new parameterless one that you should use instead. If you want to handle errors, you can do so by subscribing to the Realm.OnError event. (#938)
    • RealmResults<T> is now marked internal and Realm.All<T>() will instead return IQueryable<T>. We've added a new extension method IQueryable<T>.SubscribeForNotifications(NotificationCallbackDelegate<T>) that allows subscribing for notifications. (#942)
    • ๐Ÿš€ Realm.CreateObject<T> has been deprecated and will be removed in the next major release. (It could cause a dangerous data loss when using the synchronised realms coming soon, if a class has a PrimaryKey). (#998)
    • RealmConfiguration.ReadOnly has been renamed to RealmConfiguration.IsReadOnly and is now a property instead of a field. (#858)
    • Realm.All has been renamed to Realm.GetAll and the former has been obsoleted. (#858)
    • Realm.ObjectForPrimaryKey has been renamed to Realm.Find and the former has been obsoleted. (#858)
    • Realm.Manage has been renamed to Realm.Add and the former has been obsoleted. (#858)
    • RealmConfiguration.PathToRealm has been renamed to Realm.GetPathToRealm and the former has been obsoleted. (#858)
    • RealmResults.NotificationCallback has been extracted as a non-nested class and has been renamed to NotificationCallbackDelegate. (#858)
    • ๐Ÿšš Realm.Close has been removed in favor of Realm.Dispose. (#858)
    • RealmList<T> is now marked internal. You should use IList<T> to define collection relationships. (#858)

    โœจ Enhancements

    • In data-binding scenarios, if a setter is invoked by the binding outside of write transaction, we'll create an implicit one and commit it. This enables two-way data bindings without keeping around long-lived transactions. (#901)
    • The Realm schema can now express non-nullable reference type properties with the new [Required] attribute. (#349)
    • ๐Ÿ”ฆ Exposed a new Realm.Error event that you can subscribe for to get notified for exceptions that occur outside user code. (#938)
    • The runtime types of the collection, returned from Realm.All and the collection created for IList<T> properties on RealmObject now implement INotifyCollectionChanged so you can pass them for data-binding without any additional casting. (#938, #909)
    • All RealmObjects implement INotifyPropertyChanged. This allows you to pass them directly for data-binding.
    • โž• Added Realm.Compact method that allows you to reclaim the space used by the Realm. (#968)
    • Realm.Add returns the added object. (#931)
    • ๐Ÿ‘Œ Support for backlinks aka LinkingObjects. (#219)
    • โž• Added an IList<T>.Move extension method that allows you to reorder elements within the collection. For managed Lists, it calls a native method, so it is slightly more efficient than removing and inserting an item, but more importantly, it will raise the CollectionChanged with NotifyCollectionChangedAction.Move which will result in a nice move animation, rather than a reload of a ListView. (#995)

    ๐Ÿ› Bug fixes

    • Subscribing to PropertyChanged on a RealmObject and modifying an instance of the same object on a different thread will now properly raise the event. (#909)
    • ๐Ÿ‘ป Using Insert to insert items at the end of an IList property will no longer throw an exception. (#978)