optimizations

This commit is contained in:
John Estropia
2019-11-29 20:09:43 +09:00
parent 4ee1b04523
commit b12dba4d15
7 changed files with 92 additions and 25 deletions

View File

@@ -130,7 +130,7 @@ public final class ObjectPublisher<O: DynamicObject>: ObjectRepresentation, Hash
return self
}
return Self.init(objectID: self.id, context: context)
return context.objectPublisher(objectID: self.id)
}
public func asReadOnly(in dataStack: DataStack) -> O? {
@@ -184,9 +184,9 @@ public final class ObjectPublisher<O: DynamicObject>: ObjectRepresentation, Hash
// MARK: Internal
internal convenience init(objectID: O.ObjectID, context: NSManagedObjectContext) {
internal static func createUncached(objectID: O.ObjectID, context: NSManagedObjectContext) -> ObjectPublisher<O> {
self.init(
return self.init(
objectID: objectID,
context: context,
initializer: ObjectSnapshot<O>.init(objectID:context:)