provide a way to enumerate entities managed by the DataStack

This commit is contained in:
John Estropia
2015-08-18 21:40:33 +09:00
parent a263851266
commit 8c6a7df731
2 changed files with 17 additions and 0 deletions

View File

@@ -81,6 +81,14 @@ public final class DataStack {
return self.model.currentModelVersion!
}
/**
Returns the entity name-to-class type mapping from the `DataStack`'s model.
*/
public var entitiesByName: [String: NSManagedObject.Type] {
return self.model.entityMapping()
}
/**
Adds an in-memory store to the stack.