diff --git a/Tests/Realm.Tests/Database/DynamicAccessTests.cs b/Tests/Realm.Tests/Database/DynamicAccessTests.cs index 3906728083..07e6d665bf 100644 --- a/Tests/Realm.Tests/Database/DynamicAccessTests.cs +++ b/Tests/Realm.Tests/Database/DynamicAccessTests.cs @@ -983,20 +983,19 @@ public void GetDictionary_WhenCastToWrongValue_Throws() [Test] public void FlexibleSchema_BaseTest() { - var person = _realm.Write(() => + var testObj = _realm.Write(() => { - return _realm.Add(new Person()); + return _realm.Add(new IntPropertyObject()); }); _realm.Write(() => { - person.DynamicApi.Set("prop1", "testval"); - person.DynamicApi.Set("prop2", 10); - + testObj.DynamicApi.Set("prop1", "testval"); + testObj.DynamicApi.Set("prop2", 10); }); - Assert.That(person.DynamicApi.Get("prop1"), Is.EqualTo("testval")); - Assert.That(person.DynamicApi.Get("prop2"), Is.EqualTo(10)); + Assert.That(testObj.DynamicApi.Get("prop1"), Is.EqualTo("testval")); + Assert.That(testObj.DynamicApi.Get("prop2"), Is.EqualTo(10)); } #endregion diff --git a/wrappers/realm-core b/wrappers/realm-core index 6515e99132..591745a304 160000 --- a/wrappers/realm-core +++ b/wrappers/realm-core @@ -1 +1 @@ -Subproject commit 6515e991328553d15b19a539c04ae7fbdd8b8adb +Subproject commit 591745a304e224bb72e2c1ac5f4453dd6687d4b9 diff --git a/wrappers/src/shared_realm_cs.cpp b/wrappers/src/shared_realm_cs.cpp index 8b1d6b9061..0d31be9985 100644 --- a/wrappers/src/shared_realm_cs.cpp +++ b/wrappers/src/shared_realm_cs.cpp @@ -305,6 +305,7 @@ REALM_EXPORT SharedRealm* shared_realm_open(Configuration configuration, NativeE Realm::Config config = get_shared_realm_config(configuration); config.in_memory = configuration.in_memory; config.automatically_handle_backlinks_in_migrations = configuration.automatically_migrate_embedded; + config.flexible_schema = true; if (configuration.read_only) { config.schema_mode = SchemaMode::Immutable;