Releases: realm/realm-dotnet
1.0.3 - Out of Beta!
Out of Beta!
After about a year and a half of hard work, we are proud to call this a 1.0 release. There is still work to do, but Realm Xamarin is now being used by thousands of developers and has proven reliable.
Sync
Realm Xamarin now works with the Realm Mobile Platform. This means that you can write Xamarin apps that synchronize seamlessly with a Realm Object Server, allowing you to write complex apps with Xamarin that are offline-first and automatically synchronised by adding just a few lines of code.
You can read about this in the documentation.
Windows Desktop
Realm Xamarin is no longer iOS and Android only. You can now use it to write .NET programs for Windows Desktop. Add the NuGet package to your regular .NET project and start using Realm. Some features are not supported on Windows yet. Most notably, sync does not yet work for Windows, but also encryption and notifications across processes are missing. We are working on it and you can expect support soon.
Breaking Changes
IRealmCollection<T>.ObjectSchema
is deprecated and replaced withISchemaSource.ObjectSchema
. (#1216)
Bug fixes
[MapTo]
attribute is now respected in queries. (#1219)- Letting a Realm instance be garbage collected instead of disposing it will no longer lead to crashes. (#1212)
- Unsubscribing from
RealmObject.PropertyChanged
in aPropertyChanged
callback should no longer lead to crashes. (#1207) WriteAsync
now advances the read transaction so the changes made asynchronously are available immediately in the original thread. (#1192)- Queries on backlink properties should no longer produce unexpected results. (#1177)
0.82.1 - Hotfix for 0.82.0
0.82.1 (2017-01-27)
Bug fixes
- Addressed an issue where obtaining a Realm instance, reading an object, then obtaining another instance on the same thread would cause the object to become invalid and crash the application upon accessing any of its members.
0.82.0 - Bug fixes
Breaking Changes
- Moved all exceptions under the
Realms.Exceptions
namespace. (#1075) - Moved
RealmSchema
toRealms.Schema
namespace. (#1075) - Made the
ErrorEventArgs
constructor internal. (#1075) - Made
ObjectSchema.Builder
andRealmSchema.Builder
internal. (#1075) - Passing an object that has
IList
properties toAdd(obj, update: true)
will no longer merge the lists. Instead, theIList
property will contain only the items in the object. (#1040)
Enhancements
- Added virtual
OnPropertyChanged
method inRealmObject
that you can override to be notified of changes to the current object. (#1047) - Added compile time checks that
[Required]
is applied on correct property types. (#1072) Realm.Add(RealmObject obj)
will now return the passed in object, similarly toRealm.Add<T>(T obj)
. (#1162)- Added an extension method for
string.Contains
that acceptsStringComparison
argument and can be used in queries. When querying, onlyStringComparison.Ordinal
andStringComparison.OrdinalIgnoreCase
can be used. When not used in queries, all values forStringComparison
are valid. (#1141)
Bug fixes
- Adding a standalone object, that has an
IList<T>
property that has never been accessed, to the Realm will no longer throw aNullReferenceException
. (#1040) IList<T>
properties will now correctly returnIsReadOnly = true
when managed by a readonly Realm. (#1070)- The weaver should now correctly resolve references in PCL and netstandard assemblies. This fixes a range of issues related to using
[Backlink]
in PCL assemblies. (#1117) - Add some missing methods to the PCL reference assembly. (#1093)
- Disposed realms will not throw
ObjectDisposedException
when trying to access their members. Additionally, disposing a realm will not invalidate other instances on the same thread. (#1063)
0.81.0 - Data-binding improvements
0.81.0 (2016-12-15)
This release focuses on making it easier to use Realm objects in data-binding scenarios. We've made RealmObjects and managed collections observable so you can bind without an intermediate ViewModel. Additionally, a two-way data binding will create and commit a transaction if one is not opened, so you don't have to keep an open transaction.
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
0.80.0 - Overhaul of Realm.Manage
0.80.0 (2016-10-27)
Breaking Changes
- This version updates the file format. Older versions will not be able to open files created with this version. (#846)
RealmList<T>
is now marked as internal. If you were using it anywhere, you should migrate toIList<T>
. (#880)
Enhancements
-
iOS Linking all should work - we now add a [Preserve] attribute to all woven members of your
RealmObject
subclasses so you do not need to manually add[Preserve(allMembers=true)]
(#822) -
Realm.Manage
calls are now much faster. You should prefer that toRealm.CreateObject
unless you are setting only a few properties, while leaving the rest with default values. (#857) -
Added
bool update
argument toRealm.Manage
. Whenupdate: true
is passed, Realm will try to find and update a persisted object with the same PrimaryKey. If an object with the same PrimaryKey is not found, the umnamaged object is added. If the passed in object does not have a PrimaryKey, it will be added. Any related objects will be added or updated depending on whether they have PrimaryKeys. (#871)NOTE: cyclic relationships, where object references are not identical, will not be reconciled. E.g. this will work as expected:
var person = new Person { Name = "Peter", Id = 1 }; person.Dog = new Dog(); person.Dog.Owner = person;
However this will not - it will set the Person's properties to the ones from the last instance it sees:
var person = new Person { Name = "Peter", Id = 1 }; person.Dog = new Dog(); person.Dog.Owner = new Person { Id = 1 };
This is important when deserializing data from json, where you may have multiple instances of object with the same Id, but with different properties.
-
Realm.Manage
will no longer throw an exception if a managed object is passed. Instead, it will immediately return. (#871) -
Added non-generic version of
Realm.Manage
. (#871) -
Added support for nullable integer PrimaryKeys. Now you can have
long?
PrimaryKey property wherenull
is a valid unique value. (#877) -
Added a weaver warning when applying Realm attributes (e.g.
[Indexed]
or[PrimaryKey]
) on non-persisted properties. (#882) -
Added support for
==
and!=
comparisons to realm objects in LINQ (#896), e.g.:
csharp var peter = realm.All<Person>().FirstOrDefault(d => d.Name == "Peter"); var petersDogs = realm.All<Dog>().Where(d => d.Owner == peter);
-
Added support for
StartsWith(string, StringComparison)
,EndsWith(string, StringComparison)
, andEquals(string, StringComparison)
filtering in LINQ. (#893)NOTE: Currently only
Ordinal
andOrdinalIgnoreCase
comparisons are supported. Trying to pass in a different one will result in runtime error. If no argument is supplied,Ordinal
will be used.
v0.78.1 - Bug fixes
0.77.2
0.77.2 (2016-08-11)
Enhancements
- Setting your Build Verbosity to
Detailed
orNormal
will now display a message for every property woven, which can be useful if you suspect errors with Fody weaving. - Better exception messages will help diagnose EmptySchema problems (#739)
- Schema construction has been streamlined to reduce overhead when opening a Realm
- Schema version numbers now start at 0 rather than UInt64.MaxValue
Bug fixes
RealmResults<T>
should implementIQueryable.Provider
implicitly (#752)- Realms that close implicitly will no longer invalidate other instances (#746)
DateTimeOffset
precision bug fixed (#756)
Uses core 1.4.2
0.77.1 - Urgent fix to 0.77.0
Primarily released as a fix to 0.77.0 which had a problem building PCL libraries.
A hard crash at compile time caused failure weaving the new IList
based lists (#715).
With that fixed, a further change was detected in the signature of RealmResults
implementing IOrderedQueryable<T>
instead of IQueryable<T>
which PCL built libraries to fail to match the platform builds.
Minor Changes
- Exception messages caused by using incompatible arguments in LINQ now include the offending argument (#719)
Uses core 1.4.0
0.77.0 - IList support, dynamic API
0.77.0
Breaking Changes
- Sort order change in previous version was reverted.
Major Changes
- It is now possible to introspect the schema of a Realm. (#645)
- The Realm class received overloads for
Realm.CreateObject
andRealm.All
that accept string arguments instead of generic parameters, enabling use of thedynamic
keyword with objects whose exact type is not known at compile time. (#646) - To Many relationships can now be declared with an
IList<DestClass>
rather than requiringRealmList<DestClass>
. This is significantly faster than usingRealmList
due to caching the list. (Issue #287) - Creating standalone objects with lists of related objects is now possible. Passing such an object into
Realm.Manage
will cause the entire object graph from that object down to become managed.
Minor Changes
- Fixed a crash on iOS when creating many short-lived realms very rapidly in parallel (Issue #653)
- Fixed a crash on iOS when creating many short-lived realms very rapidly in parallel (#653)
RealmObject.IsValid
can be called to check if a managed object has been deleted- Accessing properties on invalid objects will throw an exception rather than crash with a segfault (#662)
Bug fixes
- Exceptions thrown when creating a
Realm
no longer leave a leaking handle (Issue #503)
Uses core 1.4.0
0.76.1
Minor Changes
- The
Realm
static constructor will no longer throw aTypeLoadException
when there is an activeSystem.Reflection.Emit.AssemblyBuilder
in the currentAppDomain
. - Fixed
Attempting to JIT compile
exception when using the Notifications API on iOS devices.
Breaking Changes
No API change but sort order changes slightly with accented characters grouped together and some special characters sorting differently. "One third" now sorts ahead of "one-third".
It uses the table at ftp://ftp.unicode.org/Public/UCA/latest/allkeys.txt
It groups all characters that look visually identical, that is, it puts a, à, å together and before ø, o, ö even. This is a flaw because, for example, å should come last in Denmark. But it's the best we can do now, until we get more locale aware.
Uses core 1.1.2