Improved the error message for NoSuchTable errors. In some cases an outdated native reference was used,but the table was still there. In those cases an InvalidTableRef error is now used.
Fixes
[RealmApp] The SyncConfiguration.Builder.allowQueriesOnUiThread flag was wrongly initialized to false keeping users from running queries from the UI thread when using synced Realms. It now defaults to true, allowing queries to be run from the UI. (Issue #7177, since 10.0.0)
Crash with Assertion failed: m_method_id != nullptr with (method_name, signature) = ["<init>", "(Ljava/lang/String;)V"] when Minify is enabled. (Issue #7159, since 10.0.0)
Fix crash in case insensitive query on indexed string columns when nothing matches (Cocoa issue #6836, since v10.0.0)
Fix list of primitives with nullable values where Lst::is_null(ndx) always false even on null values, (Core issue #3987, since v10.0.0).
Fix queries for the size of a list of primitive nullable ints returning size + 1. (Core issue #4016, since v10.0.0).
Compatibility
File format: Generates Realms with format v20. Unsynced Realms will be upgraded from Realm Java 2.0 and later. Synced Realms can only be read and upgraded if created with Realm Java v10.0.0-BETA.1.
APIs are backwards compatible with all previous release of realm-java in the 10.x.y series.
Realm Studio 10.0.0 or above is required to open Realms created by this version.
Internal
Updated to Realm Sync: 10.1.0.
Updated to Realm Core: 10.1.0.
Updated to Object Store commit: fd246c54de7d1fee6bcbeb3609de75a4eccd5b70.
10.0.0 (2020-10-15)
NOTE: This is a unified release note covering all v10.0.0-BETA.X v10.0.0-RC.X releases.
NOTE: Support for syncing with realm.cloud.io and/or Realm Object Server has been replaced with support for syncing with MongoDB Realm Cloud.
NOTE: This version upgrades the Realm file format to version 20. It is not possible to downgrade to earlier versions than v10.0.0-BETA.7. Non-sync Realms will be upgraded automatically. Synced Realms can only be automatically upgraded if created with Realm Java v10.0.0-BETA.1 and above.
Breaking Changes
[RealmApp] Most APIs for interacting with Realm Cloud have changed significantly. All new APIs can be found in the io.realm.mongodb package. The entry point is through the App class from which you can create and login users and otherwise interact with MongoDB Realm. See the docs for further details. Synced Realms still use a SyncConfiguration that are largely created the same way.
[RealmApp] Client Resets are now handled through a custom SyncConfiguration.Builder.clientResetHandler() instead of through the default session error handler SyncConfiguration.Builder.errorHandler()
[RealmApp] Realm files have changed location on disk. They are now located in getFiles()/mongodb-realm.
[RealmApp] All synced model classes not marked as embedded are required to have a primary key named _id. It is possible to use @RealmField(name = "_id") to map from any Java or Kotlin property.
From now on it is by default not allowed to run transactions with either Realm.executeTransaction() or DynamicRealm.executeTransaction() from the UI thread. Doing so will yield a RealmException. Users can override this behavior by using RealmConfiguration.Builder.allowWritesOnUiThread(true) when building a RealmConfiguration to obtain a Realm or DynamicRealm instance, however, we do not recommend doing so. Instead, we recommend using executeTransactionAsync() or, alternatively, using non-UI threads when calling executeTransaction() for both Realms and DynamicRealms.
Enhancements
Users can now opt out from allowing queries to be launched from the UI thread by using RealmConfiguration.Builder.allowQueriesOnUiThread(false). A RealmException will be thrown when calling RealmQuery.findAll(), RealmQuery.findFirst(), RealmQuery.minimumDate(), RealmQuery.maximumDate(), RealmQuery.count(), RealmQuery.sum(), RealmQuery.max(), RealmQuery.min(), RealmQuery.average() and RealmQuery.averageDecimal128() from the UI thread after having used allowQueriesOnUiThread(false). Queries will be allowed from the thread from which the Realm instance was obtained as it always has been by default, although we recommend using RealmQuery.findAllAsync() or RealmQuery.findFirstAsync(), or, alternatively, using a non-UI thread to launch them.
BaseRealm.refresh() will throw a RealmException if it is being called from the UI thread if allowQueriesOnUiThread is set to false, though it will be allowed by default.
Added DynamicRealm.executeTransactionAsync().
Added Kotlin extension suspend function Realm.executeTransactionAwait() which runs transactions inside coroutines.
Added Kotlin extension function RealmResults.toFlow() which returns a Kotlin flow, similar to our RxJava convenience method asFlowable().
Added Kotlin extension function RealmList.toFlow() which returns a Kotlin flow, similar to our RxJava convenience method asFlowable().
Added Kotlin extension function RealmModel.toFlow() which returns a Kotlin flow, similar to our RxJava convenience method asFlowable().
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
Bumps realm-gradle-plugin from 7.0.8 to 10.0.1.
Changelog
Sourced from realm-gradle-plugin's changelog.
Commits
d503541
Release v10.0.194ba65b
Release v10.0.13cb4441
Release v10.0.1fba7b2a
Release v10.0.14459b7e
Update object store (#7182)20089d5
Add default allowQueriesOnUiThread to true also for SyncConfiguration (#7178)7c731c0
Update to Sync 10.1.0. (#7181)3a92d28
Updated migration example realms to new format (#7172)0a5720b
Add missing tests for primitive lists, ObjectId and Decimal128 (#7160)2647c0a
Keep constructors for Decimal128 and ObjectId (#7159)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Automerge options (never/patch/minor, and dev/runtime dependencies) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)