fix error when CoreStoreObject types have deep namespaces

This commit is contained in:
John Estropia
2017-05-17 15:55:33 +09:00
parent 67863120e0
commit 7551ac342d
4 changed files with 4 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = "CoreStore" s.name = "CoreStore"
s.version = "4.0.0-beta2" s.version = "4.0.0-beta3"
s.license = "MIT" s.license = "MIT"
s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift" s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift"
s.homepage = "https://github.com/JohnEstropia/CoreStore" s.homepage = "https://github.com/JohnEstropia/CoreStore"

View File

@@ -983,7 +983,7 @@ extension VersionLock: CustomStringConvertible, CustomDebugStringConvertible, Co
string.append(":]") string.append(":]")
return string return string
} }
for (index, keyValue) in self.hashesByEntityName.enumerated() { for (index, keyValue) in self.hashesByEntityName.sorted(by: { $0.key < $1.key }).enumerated() {
let data = keyValue.value let data = keyValue.value
let count = data.count let count = data.count

View File

@@ -187,7 +187,7 @@ public final class CoreStoreSchema: DynamicSchema {
#if DEBUG #if DEBUG
CoreStore.log( CoreStore.log(
.notice, .notice,
message: "These are hashes for the \(cs_typeName(CoreStoreSchema.self)) with version name \"\(modelVersion)\". Copy the dictionary below and pass it to the \(cs_typeName(CoreStoreSchema.self)) initializer's \"versionLock\" argument:\n\(VersionLock(entityVersionHashesByName: self.rawModel().entityVersionHashesByName))" message: "These are hashes for the \(cs_typeName(CoreStoreSchema.self)) with version name \"\(modelVersion)\". Copy the dictionary below and pass it to the \(cs_typeName(CoreStoreSchema.self)) initializer's \"versionLock\" argument:\nversionLock: \(VersionLock(entityVersionHashesByName: self.rawModel().entityVersionHashesByName))"
) )
#endif #endif
} }

View File

@@ -54,7 +54,7 @@ internal struct EntityIdentifier: Hashable {
internal init(_ type: CoreStoreObject.Type) { internal init(_ type: CoreStoreObject.Type) {
self.category = .coreStore self.category = .coreStore
self.interfacedClassName = String(reflecting: type) self.interfacedClassName = NSStringFromClass(type)
} }
internal init(_ type: DynamicObject.Type) { internal init(_ type: DynamicObject.Type) {