diff --git a/src/RealmJson.Extensions/Extension.cs b/src/RealmJson.Extensions/Extension.cs index e362f61..77ff615 100644 --- a/src/RealmJson.Extensions/Extension.cs +++ b/src/RealmJson.Extensions/Extension.cs @@ -190,8 +190,9 @@ static void CreateUpdateRecordsViaAutoMapper(Realm realm, PropertyInfo pkProp } if (realmObject == null) { - realmObject = realm.CreateObject(typeof(T).Name); + realmObject = (T)Activator.CreateInstance(typeof(T)); newMapper.Map(jsonObject, realmObject); + realm.Manage(realmObject, true); } else {