   ///   - key: Object key
   ///   - store: NSPersistentStore where is stored the metadata.
   public func setMetaDataObject(_ object: AnyObject?, with key: String, for store: NSPersistentStore) {
-    performSave {
+    performSave(afterApplyingChanges: {
       guard let psc = self.persistentStoreCoordinator else { fatalError("Persistent Store Coordinator missing.") }
       var md = psc.metadata(for: store)
       md[key] = object
       psc.setMetadata(md, for: store)
-    }
+
+    })
+    //    performSave {
+    //      guard let psc = self.persistentStoreCoordinator else { fatalError("Persistent Store Coordinator missing.") }
+    //      var md = psc.metadata(for: store)
+    //      md[key] = object
+    //      psc.setMetadata(md, for: store)
+    //    }
   }
   
   /// **Mechanica**

    return context
  }
  
//  /// **Mechanica**
//  ///
//  /// Asynchronously attempts to commit unsaved changes or rollbacks if any error occurs.
//  /// - Parameters:
//  ///   - isRollBackEnabled: Enables rollback if any error occurs (default true).
//  public func performSave(orRollBack isRollBackEnabled: Bool = true) {
//    perform {
//      [unowned self] in
//      _ = self.saveChanges(andEnableRollBack: isRollBackEnabled)
//    }
//  }
  
  /// **Mechanica**
  ///

  /// - Parameters:
  ///   - isRollBackEnabled: Enables rollback if any error occurs (default true).
  ///   - changes: Changes to be applied in the current context.
  ///   - completion: Callback called on the context queue after the saving operation.
  public func performSave(orRollBack isRollBackEnabled: Bool = true, afterApplyingChanges changes: ( () -> () )? = nil, onSavePerformed completion: ( (SaveResult) -> () )? = nil) {
    perform {
      [unowned self] in
      changes?()
      let result = self.saveChanges(andEnableRollBack: isRollBackEnabled)
      completion?(result)
    }
  }
  
  //  /// **Mechanica**
  //  ///
  //  /// Synchronously attempts to commit unsaved changes or rollbacks if any error occurs.
  //  /// - Parameters:
  //  ///   - isRollBackEnabled: Enables rollback if any error occurs (default true).
  //  public func performSaveAndWait(orRollBack isRollBackEnabled: Bool = true) -> SaveResult {
  //    var result = SaveResult.success
  //    performAndWait {
  //      [unowned self] in
  //      result = self.saveChanges(andEnableRollBack: isRollBackEnabled)
  //    }
  //    return result
  //  }
  
  /// **Mechanica**
  ///
