Realm Xamarin v3.0.0 Release Notes
Release Date: 2018-04-25 // almost 6 years ago-
โจ Enhancements
- ๐ Allow
[MapTo]
to be applied on classes to change the name of the table corresponding to that class. (#1712) - โ Added an improved API for adding subscriptions in partially-synchronized Realms.
IQueryable<T>.Subscribe
can be used
to subscribe to any query, and the returnedSubscription<T>
object can be used to observe the state of the subscription
๐ and ultimately remove the subscription. See the documentation
for more information. (#1679) - โ Added a fine-grained permissions system for use with partially-synchronized Realms. This allows permissions to be
๐ defined at the level of individual objects or classes. See the
๐ documentation
for more information. (#1714) - ๐ฆ Exposed a string-based
IQueryable<T>.Filter(predicate)
method to enable more advanced querying
scenarios such as:- Following links:
realm.All<Dog>().Filter("Owner.FirstName BEGINSWITH 'J'")
. - Queries on collections:
realm.All<Child>().Filter("Parents.FirstName BEGINSWITH 'J'")
- find all
children who have a parent whose name begins with J orrealm.All<Child>().Filter("[email protected] > 50")
-
find all children whose parents' average age is more than 50. - Subqueries:
realm.All<Person>().Filter("SUBQUERY(Dogs, $dog, $dog.Vaccinated == false).@count > 3")
- find all
people who have more than 3 unvaccinated dogs. - Sorting:
realm.All<Dog>().Filter("TRUEPREDICATE SORT(Owner.FirstName ASC, Age DESC)")
- find all dogs and
sort them by their owner's first name in ascending order, then by the dog's age in descending. - Distinct:
realm.All<Dog>().Filter("TRUEPREDICATE DISTINCT(Age) SORT(Name)")
- find all dogs, sort them
by their name and pick one dog for each age value. - For more examples, check out the
๐ javascript query language docs -
the query syntax is identical - or the NSPredicate Cheatsheet.
- Following links:
- ๐ The
SyncConfiguration
constructor now accepts relative Uris. (#1720) - โ Added the following methods for resetting the user's password and confirming their email:
RequestPasswordResetAsync
,CompletePasswordResetAsync
,RequestEmailConfirmationAsync
, andConfirmEmailAsync
.
These all apply only to users created viaCredentials.UsernamePassword
who have provided their email as
the username. (#1721)
๐ Bug fixes
- ๐ Fixed a bug that could cause deadlocks on Android devices when resolving thread safe references. (#1708)
๐ฅ Breaking Changes
- ๐ Uses the Sync 3.0 client which is incompatible with ROS 2.x.
Permission
has been renamed toPathPermission
to more closely reflect its purpose.
Furthermore, existing methods to modify permissions only work on full Realms. New methods
๐ง and classes are introduced to configure access to a partially synchronized Realm.- 0๏ธโฃ The type of
RealmConfiguration.DefaultConfiguration
has changed toRealmConfigurationBase
to allow
0๏ธโฃ any subclass to be set as default. (#1720) - ๐ The
SyncConfiguration
constructor arguments are now optional. Theuser
value will default to the
0๏ธโฃ currently logged in user and theserverUri
value will default torealm://MY-SERVER-URL/default
where
MY-SERVER-URL
is the host the user authenticated against. (#1720) - The
serverUrl
argument inUser.LoginAsync(credentials, serverUrl)
andUser.GetLoggedInUser(identity, serverUrl)
has been renamed toserverUri
for consistency. (#1721)
- ๐ Allow