WIP: prototype for ManagedObjectProtocol

This commit is contained in:
John Estropia
2017-04-05 21:56:19 +09:00
parent 258c237100
commit 8b77e4e5a0
44 changed files with 1244 additions and 823 deletions

View File

@@ -43,22 +43,4 @@ public extension NSManagedObject {
return self.managedObjectContext?.parentTransaction as? UnsafeDataTransaction
}
// MARK: Internal
@nonobjc
internal class func createInContext(_ context: NSManagedObjectContext) -> Self {
return self.init(
entity: context.entityDescriptionForEntityType(self)!,
insertInto: context
)
}
@nonobjc
internal func deleteFromContext() {
self.managedObjectContext?.delete(self)
}
}