fix issue with early-deallocated CoreStoreObjects

This commit is contained in:
John Estropia
2018-09-18 23:50:14 +09:00
parent 40f458a09c
commit ab40532801
8 changed files with 86 additions and 86 deletions

View File

@@ -93,7 +93,7 @@ open /*abstract*/ class CoreStoreObject: DynamicObject, Hashable {
}
if lhs.isMeta {
return type(of: lhs) == type(of: rhs)
return cs_dynamicType(of: lhs) == cs_dynamicType(of: rhs)
}
return lhs.rawObject!.isEqual(rhs.rawObject!)
}
@@ -124,10 +124,10 @@ open /*abstract*/ class CoreStoreObject: DynamicObject, Hashable {
switch child.value {
case let property as AttributeProtocol:
property.parentObject = parentObject
property.rawObject = parentObject.rawObject
case let property as RelationshipProtocol:
property.parentObject = parentObject
property.rawObject = parentObject.rawObject
default:
continue