performant access of relationship objectIDs for snapshots

This commit is contained in:
John Estropia
2020-02-21 13:51:17 +09:00
parent 361dba58c6
commit 231e138ab0
10 changed files with 121 additions and 89 deletions

View File

@@ -133,11 +133,7 @@ public struct ObjectProxy<O: CoreStoreObject> {
let keyPathString = field.keyPath
self.getValue = {
return type(of: field).read(
field: field,
for: rawObject,
bypassThreadCheck: true // May be called from NSError logs
) as! V
return type(of: field).read(field: field, for: rawObject) as! V
}
self.setValue = {
@@ -163,11 +159,7 @@ public struct ObjectProxy<O: CoreStoreObject> {
let keyPathString = field.keyPath
self.getValue = {
return type(of: field).read(
field: field,
for: rawObject,
bypassThreadCheck: true // May be called from NSError logs
) as! V
return type(of: field).read(field: field, for: rawObject) as! V
}
self.setValue = {
@@ -200,11 +192,7 @@ public struct ObjectProxy<O: CoreStoreObject> {
let keyPathString = field.keyPath
self.getValue = {
return type(of: field).read(
field: field,
for: rawObject,
bypassThreadCheck: true // May be called from NSError logs
) as! V
return type(of: field).read(field: field, for: rawObject) as! V
}
self.setValue = {