From 6c28594e4136fd75ff22563aa5f004bdf1fbc54d Mon Sep 17 00:00:00 2001 From: John Rommel Estropia Date: Tue, 29 Dec 2015 08:25:06 +0800 Subject: [PATCH] fixed shouldUpdateFromImportSource() not called from importUniqueObject() (fixes #31) --- CoreStore.podspec | 2 +- CoreStore/Importing Data/BaseDataTransaction+Importing.swift | 5 +++++ CoreStore/Info.plist | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CoreStore.podspec b/CoreStore.podspec index 9246a3c..e211754 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "1.4.0" + s.version = "1.4.1" s.license = "MIT" s.summary = "Unleashing the real power of Core Data with the elegance and safety of Swift" s.homepage = "https://github.com/JohnEstropia/CoreStore" diff --git a/CoreStore/Importing Data/BaseDataTransaction+Importing.swift b/CoreStore/Importing Data/BaseDataTransaction+Importing.swift index 7493d12..816eabb 100644 --- a/CoreStore/Importing Data/BaseDataTransaction+Importing.swift +++ b/CoreStore/Importing Data/BaseDataTransaction+Importing.swift @@ -123,6 +123,11 @@ public extension BaseDataTransaction { if let object = self.fetchOne(From(T), Where(uniqueIDKeyPath, isEqualTo: uniqueIDValue)) { + guard T.shouldUpdateFromImportSource(source, inTransaction: self) else { + + return nil + } + try object.updateFromImportSource(source, inTransaction: self) return object } diff --git a/CoreStore/Info.plist b/CoreStore/Info.plist index 8bce5c7..07b3f7e 100644 --- a/CoreStore/Info.plist +++ b/CoreStore/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.4.0 + 1.4.1 CFBundleSignature ???? CFBundleVersion