You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes my object has a primary key and the first write is successful.
Use realm.create(type(of: object), value: object, update: .all) to write a managed object into another Realm instance of another file. Also all my unit tests are failing.
I had to downgrade to v3.15.0 to stop the problem. All the problems are gone.
I will try to replicate this on a sample, meanwhile you guy can try to analyse it based on my logs.
Code Sample
letobject:RealmSwift.Object= //....
var config: Realm.Configuration =anotherSchema()
config.fileURL = config.fileURL?.deletingLastPathComponent().appendingPathComponent("another.realm")letrealm:Realm=tryRealm(configuration: config)try realm.write{
realm.create(type(of: object), value: object, update:.all) //<-- Crash, also crash with 'true'.
}
Version of Realm and Tooling
Realm framework version: v3.16.0
Realm Object Server version: No
Xcode version: 10.2.1
iOS/OSX version: Any
Dependency manager + version: Submodules
Log:
Realm is calling my Object as RealmSwiftObject by some reason...
I think I see what may have changed here. Things like realm.create<BaseClass>(type: Subclass.self, value: ...) where the statically determined type and the type object passed in at runtime used to work by coincidence, but since it wasn't intended functionality there weren't any tests verifying that and I changed a check to use the static type where it previously used the dynamic type. Should be easy to fix and make it officially supported.
Actual Results
Steps to Reproduce
Yes my object has a primary key and the first write is successful.
Use
realm.create(type(of: object), value: object, update: .all)
to write a managed object into another Realm instance of another file. Also all my unit tests are failing.I had to downgrade to
v3.15.0
to stop the problem. All the problems are gone.I will try to replicate this on a sample, meanwhile you guy can try to analyse it based on my logs.
Code Sample
Version of Realm and Tooling
Realm framework version: v3.16.0
Realm Object Server version: No
Xcode version: 10.2.1
iOS/OSX version: Any
Dependency manager + version: Submodules
Log:
Realm is calling my Object as
RealmSwiftObject
by some reason...The text was updated successfully, but these errors were encountered: