Skip to content

Commit

Permalink
Set the correct schema mode for disconnectedSync (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev authored Oct 31, 2022
1 parent f10bf4c commit 866497c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* Fixed a wrong mapping for `AuthProviderType` returned by `User.provider` for google, facebook and apple credentials.
* Opening an unencrypted file with an encryption key would sometimes report a misleading error message that indicated that the problem was something other than a decryption failure (Core upgrade)
* Fix a rare deadlock which could occur when closing a synchronized Realm immediately after committing a write transaction when the sync worker thread has also just finished processing a changeset from the server. (Core upgrade)
* Fixed an issue with `Configuration.disconnectedSync` where changing the schema could result in migration exception. (PR [#999](https://github.com/realm/realm-dart/pull/999))

### Compatibility
* Realm Studio: 12.0.0 or later.
Expand Down
1 change: 1 addition & 0 deletions lib/src/native/realm_core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class _RealmCore {
_realmLib.realm_release(syncConfigPtr.cast());
}
} else if (config is DisconnectedSyncConfiguration) {
_realmLib.realm_config_set_schema_mode(configHandle._pointer, realm_schema_mode.RLM_SCHEMA_MODE_ADDITIVE_EXPLICIT);
_realmLib.realm_config_set_force_sync_history(configPtr, true);
}
if (config.encryptionKey != null) {
Expand Down

0 comments on commit 866497c

Please sign in to comment.