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 theRealm.OnError
event. (#938) RealmResults<T>
is now markedinternal
andRealm.All<T>()
will instead returnIQueryable<T>
. We've added a new extension methodIQueryable<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 toRealmConfiguration.IsReadOnly
and is now a property instead of a field. (#858)Realm.All
has been renamed toRealm.GetAll
and the former has been obsoleted. (#858)Realm.ObjectForPrimaryKey
has been renamed toRealm.Find
and the former has been obsoleted. (#858)Realm.Manage
has been renamed toRealm.Add
and the former has been obsoleted. (#858)RealmConfiguration.PathToRealm
has been renamed toRealm.GetPathToRealm
and the former has been obsoleted. (#858)RealmResults.NotificationCallback
has been extracted as a non-nested class and has been renamed toNotificationCallbackDelegate
. (#858)- ๐
Realm.Close
has been removed in favor ofRealm.Dispose
. (#858) RealmList<T>
is now markedinternal
. You should useIList<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 forIList<T>
properties onRealmObject
now implementINotifyCollectionChanged
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 theCollectionChanged
withNotifyCollectionChangedAction.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 anIList
property will no longer throw an exception. (#978)
- ๐ The