Corrected type-checking in fetchExisting to preserve input type

This commit is contained in:
Sid Mani
2017-08-16 00:36:06 -07:00
parent f7aaf4fb2a
commit c89bc3c227

View File

@@ -62,7 +62,9 @@ extension NSManagedObjectContext: FetchableSource, QueryableSource {
return object
}
return T.cs_fromRaw(object: existingRawObject)
let objectDynamicType = type(of: object)
return objectDynamicType.cs_fromRaw(object: existingRawObject)
}
catch {