 		}
 	}
 
+	var shouldMergeIncomingSavedObjects: Bool = true
+
+	deinit {
+		NotificationCenter.default.removeObserver(self)
+	}
 }
 
 

	func setup(withDataModelNamed dataModelName: String? = nil, storeURL: URL? = nil, callback: Callback? = nil) {

		let url: URL
		if let storeURL = storeURL {	//	if the target URL is supplied, then just re-use it
			url = storeURL
		} else {	//	otherwise build the name using cleaned app name and place in the local app's container
			url = defaultStoreURL.appendingPathComponent(cleanAppName).appendingPathExtension("sqlite")
		}

		self.storeURL = url
		self.dataModel = managedObjectModel(named: dataModelName)


	}



		moc.mergePolicy = (isMainContextReadOnly) ? NSRollbackMergePolicy : NSMergeByPropertyStoreTrumpMergePolicy

		mainContext = moc
	}

	var storeDescription: NSPersistentStoreDescription {
		let sd = NSPersistentStoreDescription(url: storeURL)
		//	use options that allow automatic model migrations
		sd.setOption(true as NSObject?, forKey: NSMigratePersistentStoresAutomaticallyOption)
		sd.shouldInferMappingModelAutomatically = true
		return sd
	}

	var defaultStoreURL: URL {
