                         
                         context.performAndWait() {
                             let objects = childContext.registeredObjects as NSSet
-                            let _ = objects.allObjects.map({ (obj: AnyObject) -> Void in
-                                let childObject = obj as! NSManagedObject
+                            
+                            objects.forEach({ (object) in
+                                let childObject = object as! NSManagedObject
                                 let parentObject = context.object(with: childObject.objectID)
                                 context.refresh(parentObject, mergeChanges: true)
                             })

            switch taskResult {
            case .success(let data):
                responseHandler(data)
            case .failure(let reason):
                print(reason.description())
            }
        }).resume()
    }

    // MARK: - NSIncrementalStore
    
    override func loadMetadata() throws {
        let uuid = ProcessInfo.processInfo.globallyUniqueString
        self.metadata = [NSStoreTypeKey : CachingIncrementalStore.storeType, NSStoreUUIDKey: uuid]
    }
    
    override func execute(_ request: NSPersistentStoreRequest, with context: NSManagedObjectContext?) throws -> Any {
        let error: NSError? = nil
        if request.requestType == .fetchRequestType {
            return try self.executeFetchRequest(request, withContext: context)
