Changelog History
Page 3
-
v10.1.2 Changes
December 02, 2020๐ฅ Breaking Changes
- None.
โจ Enhancements
- None.
๐ Fixes
- Complementary fix for missed edge case in https://github.com/realm/realm-java/pull/7220 where KAPT crash if we process a RealmObject referencing a type in RealmList defined in another module. (Issue #7213, 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.
-
v10.1.1 Changes
November 27, 2020๐ฅ Breaking Changes
- None.
โจ Enhancements
- None.
๐ Fixes
- KAPT crash when processing a RealmObject referenced from another module (changed revealed after we started checking for embedded types). (Issue #7213, 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.3.
- โก๏ธ Updated to Realm Core: 10.1.3.
- โก๏ธ Updated to Object Store commit: fc6daca61133aa9601e4cb34fbeb9ec7569e162e.
-
v10.1.0 Changes
October 23, 2020๐ฅ Breaking Changes
- None.
โจ Enhancements
- โ Added
FlowFactory
interface that allows customization ofFlow
emissions, just as we do withRxObservableFactory
. A default implementation,RealmFlowFactory
, is provided when buildingRealmConfiguration
s. - โ Added
toChangeSetFlow
methods (similar to the RxasChangesetFlowable
methods) forRealmObject
,RealmResults
andRealmList
.
๐ Fixes
- ๐ Fixed crash when adding classes containing an
ObjectId
as primary key to the schema. (Issue #7189, since v10.0.0) - ๐ Fixed crash when creating proxy classes containing an
ObjectId
as primary key. (Issue #7197, since v10.0.0) - ๐ Fixed crash where calls to
toFlow
could crash if the Flow job is canceled and object updates are emitted after that happens. (Issue 7211, since v10.0.1)
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.3.
- โก๏ธ Updated to Realm Core: 10.1.3.
- โก๏ธ Updated to Object Store commit: fc6daca61133aa9601e4cb34fbeb9ec7569e162e.
-
v10.0.1 Changes
November 06, 2020๐ฅ Breaking Changes
- None.
โจ Enhancements
- ๐ 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 anInvalidTableRef
error is now used.
๐ Fixes
- ๐ [RealmApp] The
SyncConfiguration.Builder.allowQueriesOnUiThread
flag was wrongly initialized tofalse
keeping users from running queries from the UI thread when using synced Realms. It now defaults totrue
, 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"]
whenMinify
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.
-
v10.0.0 Changes
October 15, 2020๐ 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 theApp
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 aSyncConfiguration
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 handlerSyncConfiguration.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()
orDynamicRealm.executeTransaction()
from the UI thread. Doing so will yield aRealmException
. Users can override this behavior by usingRealmConfiguration.Builder.allowWritesOnUiThread(true)
when building aRealmConfiguration
to obtain a Realm or DynamicRealm instance, however, we do not recommend doing so. Instead, we recommend usingexecuteTransactionAsync()
or, alternatively, using non-UI threads when callingexecuteTransaction()
for bothRealm
s andDynamicRealm
s.
โจ Enhancements
- ๐ Users can now opt out from allowing queries to be launched from the UI thread by using
RealmConfiguration.Builder.allowQueriesOnUiThread(false)
. ARealmException
will be thrown when callingRealmQuery.findAll()
,RealmQuery.findFirst()
,RealmQuery.minimumDate()
,RealmQuery.maximumDate()
,RealmQuery.count()
,RealmQuery.sum()
,RealmQuery.max()
,RealmQuery.min()
,RealmQuery.average()
andRealmQuery.averageDecimal128()
from the UI thread after having usedallowQueriesOnUiThread(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 usingRealmQuery.findAllAsync()
orRealmQuery.findFirstAsync()
, or, alternatively, using a non-UI thread to launch them. - 0๏ธโฃ
BaseRealm.refresh()
will throw aRealmException
if it is being called from the UI thread ifallowQueriesOnUiThread
is set tofalse
, 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 methodasFlowable()
. - โ Added Kotlin extension function
RealmList.toFlow()
which returns a Kotlin flow, similar to our RxJava convenience methodasFlowable()
. - โ Added Kotlin extension function
RealmModel.toFlow()
which returns a Kotlin flow, similar to our RxJava convenience methodasFlowable()
. - RealmLists can now be marked final. (Issue #6892)
- โ Added support for
distinct
queries on non-index and linked fields. (Issue #1906) - โ Added support for
org.bson.types.Decimal128
andorg.bson.types.ObjectId
as supported fields in model classes. - โ Added support for
org.bson.types.ObjectId
as a primary key. - โ Added support for "Embedded Objects". They are enabled using
@RealmClass(embedded = true)
. An embedded object must have exactly one parent object linking to it and it will be deleted when the parent is. Embedded objects can also be the parent of other embedded classes. Read more here. (Issue #6713)
๐ Fixes
- None.
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.0.0.
- โก๏ธ Updated to Realm Core: 10.0.0.
- ๐ [RealmApp] Most APIs for interacting with Realm Cloud have changed significantly. All new APIs can be found in the
-
v10.0.0-RC.2 Changes
October 12, 2020โจ Enhancements
- ๐ป [RealmApp] Illegal schemas where embedded object classes referenced each other is now correctly detected and throws and exception when opening a Realm with such a schema.
๐ Fixed
- [RealmApp] It is now possible to use types different than
ObjectId
for the_id
field in documents inserted withMongoCollection.insertOne
andMongoCollection.insertMany
. - [RealmApp] Lossy round trip of Double and Timestamps through functions when using Bson. (ObjectStore issue (#1106)[https://github.com/realm/realm-object-store/issues/1106])
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 10.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 and above is required to open Realms created by this version.
Internal
- โก๏ธ Updated to Object Store commit: 6b44209e6fcac0137e193c96444f93c50d184d06.
-
v10.0.0-RC.1 Changes
October 02, 2020๐ We no longer support Realm Cloud (legacy), but instead the new MongoDB Realm Cloud. MongoDB Realm is a serverless platform that enables developers to quickly build applications without having to set up server infrastructure. MongoDB Realm is built on top of MongoDB Atlas, automatically integrating the connection to your database.
๐จ The old Realm Cloud legacy APIs have undergone significant refactoring. The new APIs are all located in the
io.realm.mongodb
package withio.realm.mongodb.App
as the entry point.๐ฅ Breaking Changes
- ๐ From now on it is not allowed by default to run transactions with either
Realm.executeTransaction()
orDynamicRealm.executeTransaction()
from the UI thread. Doing so will yield aRealmException
. Users can override this behavior by usingRealmConfiguration.Builder.allowWritesOnUiThread(true)
when building aRealmConfiguration
to obtain a Realm or DynamicRealm instance, though we do not recommend doing so. Instead, we recommend usingexecuteTransactionAsync()
or, alternatively, using non-UI threads when callingexecuteTransaction()
for bothRealm
s andDynamicRealm
s.
โจ Enhancements
- ๐ Users can now opt out from allowing queries to be launched from the UI thread by using
RealmConfiguration.Builder.allowQueriesOnUiThread(false)
. ARealmException
will be thrown when callingRealmQuery.findAll()
,RealmQuery.findFirst()
,RealmQuery.minimumDate()
,RealmQuery.maximumDate()
,RealmQuery.count()
,RealmQuery.sum()
,RealmQuery.max()
,RealmQuery.min()
,RealmQuery.average()
andRealmQuery.averageDecimal128()
from the UI thread after having usedallowQueriesOnUiThread(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 usingRealmQuery.findAllAsync()
orRealmQuery.findFirstAsync()
, or, alternatively, using a non-UI thread to launch them. - 0๏ธโฃ
BaseRealm.refresh()
will throw aRealmException
if it is being called from the UI thread ifallowQueriesOnUiThread
is set tofalse
, 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 methodasFlowable()
. - โ Added Kotlin extension function
RealmList.toFlow()
which returns a Kotlin flow, similar to our RxJava convenience methodasFlowable()
. - โ Added Kotlin extension function
RealmModel.toFlow()
which returns a Kotlin flow, similar to our RxJava convenience methodasFlowable()
.
๐ Fixed
- โก๏ธ Using
Realm.copyToRealmOrUpdate()
andRealm.insertOrUpdate()
did not correctly update objects if they contained lists of embedded objets. Instead of replacing the original list, list items was appended to the original list. Note, some corner cases are still not supported. See #7138 for more information. (Issue #7131, since 10.0.0-BETA.1).
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 10.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 and above is required to open Realms created by this version.
Internal
- โก๏ธ Updated to Object Store commit: ef6736cc07a8b94d1242c522969114bb8047deef
- โก๏ธ Updated to Realm Sync 10.0.0-beta.14.
- โก๏ธ Updated to Realm Core 10.0.0-beta.9.
- ๐ From now on it is not allowed by default to run transactions with either
-
v10.0.0-BETA.8 Changes
September 23, 2020๐ We no longer support Realm Cloud (legacy), but instead the new MongoDB Realm Cloud. MongoDB Realm is a serverless platform that enables developers to quickly build applications without having to set up server infrastructure. MongoDB Realm is built on top of MongoDB Atlas, automatically integrating the connection to your database.
๐จ The old Realm Cloud legacy APIs have undergone significant refactoring. The new APIs are all located in the
io.realm.mongodb
package withio.realm.mongodb.App
as the entry point.๐ Fixed
- ๐ฒ [RealmApp] Logging in caused an
token contains an invalid number of segments
error. (Issue #7117, since 10.0.0-BETA.7) - [RealmApp] The order of arguments to
EmailPassword.resetPassword()
was not handled correctly, resulting in resetting the password failing. (Issue #7116, since 10.0.0-BETA.1)
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 10.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 and above is required to open Realms created by this version.
Internal
- โก๏ธ Updated to Object Store commit: 035eb07f3ef313bfb78c046be9cf6b4f065d6772.
- ๐ฒ [RealmApp] Logging in caused an
-
v10.0.0-BETA.7 Changes
September 16, 2020๐ We no longer support Realm Cloud (legacy), but instead the new MongoDB Realm Cloud. MongoDB Realm is a serverless platform that enables developers to quickly build applications without having to set up server infrastructure. MongoDB Realm is built on top of MongoDB Atlas, automatically integrating the connection to your database.
๐จ The old Realm Cloud legacy APIs have undergone significant refactoring. The new APIs are all located in the
io.realm.mongodb
package withio.realm.mongodb.App
as the entry point.๐ WARNING: This release upgrades the fileformat to 20. Non-sync Realms will be upgraded automatically. Synced Realms can only be automatically upgraded if created with Realm Java 10.0.0-BETA.1 and above.
๐ฅ Breaking Changes
- ๐ [RealmApp] Moved
User.remove()
toApp.removeUser()
. - [RealmApp] Renamed
ApiKeyAuth.createApiKey()
toApiKeyAuth.create()
andApiKeyAuth.createApiKeyAsync()
toApiKeyAuth.createAsync()
. - [RealmApp] Renamed
ApiKeyAuth.fetchApiKey()
toApiKeyAuth.fetch()
andApiKeyAuth.fetchApiKeyAsync()
toApiKeyAuth.fetchAsync()
. - [RealmApp] Renamed
ApiKeyAuth.fetchAllApiKeys()
toApiKeyAuth.fetchAll()
andApiKeyAuth.fetchAllApiKeysAsync()
toApiKeyAuth.fetchAllAsync()
. - [RealmApp] Renamed
ApiKeyAuth.deleteApiKey()
toApiKeyAuth.delete()
andApiKeyAuth.deleteApiKeyAsync()
toApiKeyAuth.deleteAsync()
. - [RealmApp] Renamed
ApiKeyAuth.enableApiKey()
toApiKeyAuth.enable()
andApiKeyAuth.enableApiKeyAsync()
toApiKeyAuth.enableAsync()
. - [RealmApp] Renamed
ApiKeyAuth.disableApiKey()
toApiKeyAuth.disable()
andApiKeyAuth.disableApiKeyAsync()
toApiKeyAuth.disableAsync()
. - [RealmApp] Renamed
User.getApiKeysAuth()
toUser.getApiKeys()
. - [RealmApp] Renamed
UserApiKey
class toApiKey
. - ๐ [RealmApp] Removed support for
Credentials.serverApiKey()
. - [RealmApp] Renamed
App.getEmailPasswordAuth()
toApp.getEmailPassword()
. - [RealmApp] User profile methods
getName()
,getEmail()
,getPictureUrl()
,getFirstName()
,getLastName()
,getGender()
,getBirthday()
,getMinAge()
andgetMaxAge()
are now available under a new classUserProfile
. It can be accessed usingUser.getProfile()
. - ๐ [RealmApp] Renamed
Sync.refreshConnections()
toSync.reconnect()
. - [RealmApp] Renamed
Credentials.IdentityProvider
toCredentials.Provider
. - ๐ [RealmApp] Removed support for
User.getLocalId()
. - ๐ [RealmApp] Client Resets are now handled through a custom
SyncConfiguration.Builder.clientResetHandler()
instead of through the default session error handlerSyncConfiguration.Builder.errorHandler()
โจ Enhancements
- [RealmApp] It is now possible to create App instances with different app id's.
- ๐ [RealmApp] Support for using
null
as a partition value. - ๐ [RealmApp] Improve errors exception messages from
SyncSession.downloadAllServerChanges()
andSyncSession.uploadAllLocalChanges()
. - ๐ [RealmApp] Support for watching MongoCollection change streams (Issue #6912)
- ๐ [RealmApp] Support for retrying a custom confirmation function on an User for a given email (Issue #7079)
- ๐ [RealmApp] Support for getting all app sessions via
Sync.getAllSessions()
. - ๐ [RealmApp] Support to retrieve the MongoClient service name using
MongoClient.getServiceName()
- ๐ [RealmApp] Support to retrieve the MongoDatabase name using
MongoDatabase.getName()
- ๐ [RealmApp] Support to retrieve the MongoCollection name using
MongoCollection.getName()
๐ Fixed
- If you have a realm file growing towards 2Gb and have a table with more than 16 columns, then you may get a "Key not found" exception when updating an object. If asserts are enabled at the sdk level, you may get an "assert(m_has_refs)" instead. (#3194, since v7.0.0)
- In cases where you have more than 32 columns in a table, you may get a currrupted file resulting in various crashes (#7057, since v7.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 10.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 and above is required to open Realms created by this version.
Internal
- โก๏ธ Updated to Object Store commit: 6ab48d3b4b1e0865f68b84d5993bb2aad910320b.
- โก๏ธ Updated to Realm Sync 10.0.0-beta.11.
- โก๏ธ Updated to Realm Core 10.0.0-beta.7.
- ๐ [RealmApp] Moved
-
v10.0.0-BETA.6 Changes
August 17, 2020๐ We no longer support Realm Cloud (legacy), but instead the new MongoDB Realm Cloud. MongoDB Realm is a serverless platform that enables developers to quickly build applications without having to set up server infrastructure. MongoDB Realm is built on top of MongoDB Atlas, automatically integrating the connection to your database.
๐จ The old Realm Cloud legacy APIs have undergone significant refactoring. The new APIs are all located in the
io.realm.mongodb
package withio.realm.mongodb.App
as the entry point.๐ฅ Breaking Changes
- โฌ๏ธ [RealmApp] Realm files have changed location on disk, so Realms should upload all their data to the server before upgrading.
- โก๏ธ [RealmApp] Removed GMS Task framework and added RealmResultTask to provide with a mechanism to operate with asynchronous operations. MongoCollection has been updated to reflect this change.
โจ Enhancements
- 0๏ธโฃ [RealmApp] Credentials information (e.g. username, password) displayed in Logcat is now obfuscated by default, even if [LogLevel] is set to DEBUG, TRACE or ALL.
- RealmLists can now be marked final. (Issue #6892)
- It is now possible to create embedded objects using [DynamicRealm]s. (Issue #6982)
- โ Added extra validation and more meaningful error messages when creating embedded objects pointing to the wrong parent property. (See issue above)
๐ Fixed
- [RealmApp] The same user opening different Realms with different partion key values would crash with an IllegalArgumentException. (Issue #6882, since 10.0.0-BETA.1)
- ๐ [RealmApp] Sync would not refresh the access token if started with an expired one. (Since 10.0.0-BETA.1)
- [RealmApp] Leaking objects when registering session listeners. (Issue #6916)
- โ Added support for Json-import of objects containing embedded objects. (Issue #6896)
- โฌ๏ธ Upgrading the file format result did in some cases not work correctly. This could result in a number of crashes, e.g.
FORMAT_UPGRADE_REQUIRED
. (Issue #6889, since 7.0.0) - ๐ Bug in memory mapping management. This bug could result in multiple different asserts as well as segfaults. In many cases stack backtraces would include members of the EncyptedFileMapping near the top - even if encryption was not used at all. In other cases asserts or crashes would be in methods reading an array header or array element. In all cases the application would terminate immediately. (Realm Core PR #3838, since 7.0.0)
- It was possible to use
RealmObjectSchema
to mark a Class as embedded even if some of the objects broke the constraints for being embedded.
Compatibility
- โฌ๏ธ File format: Generates Realms with format v11 (Reads and upgrades all previous formats from Realm Java 2.0 and later).
- ๐ APIs are backwards compatible with all previous release of realm-java in the 10.x.y series.
- Realm Studio 10.0.0 and above is required to open Realms created by this version.
Internal
- โฌ๏ธ Upgraded to Object Store commit: 5b5fb8a90192cb4ee6799e7465745cd2067f939b.
- โฌ๏ธ Upgraded to Realm Sync 10.0.0-beta.6.
- โฌ๏ธ Upgraded to Realm Core 10.0.0-beta.4.