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
class Person: Object {
@objc dynamic var id = NSUUID().uuidString
@objc dynamic var name = "Jim"
@objc dynamic var isDeleted = false
let dogs = LinkingObjects(fromType: Dog.self, property: "owner")
}
class Dog: Object {
@objc dynamic var id = NSUUID().uuidString
@objc dynamic var name = ""
@objc dynamic var owner: Person?
}
According to plivesey 's reply in issue #140 , you may solve it by always resolving the sync objects in order, in other words, parents are always written first, followed by children. Also plivesey post his commit link in his own fork, see plivesey@24c2b84 for more detail
我有一个类似于这样的一对多模型:
当我拉取全部数据到本地时,我应该通过设置
Dog
的owner
属性来恢复一对多的关系但在一种情况下,如果在
Person
对象还没有写入到本地的时候,通过dynamicObject
来获取Person
对象是不存在的,就不能正确的恢复这个关系。我查看了关于
list
这里关于解决关系恢复的问题,在单个对象属性设置的时候也应该需要相应的关系恢复逻辑。希望考虑解决一下。The text was updated successfully, but these errors were encountered: