Make RecreateStoreOnModelMismatch flag work again (fixes #126)

This commit is contained in:
John Rommel Estropia
2016-11-26 16:19:12 +09:00
parent 92756fec42
commit 5d2956d674
9 changed files with 213 additions and 47 deletions

View File

@@ -261,7 +261,10 @@ public final class DataStack {
at: fileURL,
options: storeOptions
)
_ = try self.model[metadata].flatMap(storage.eraseStorageAndWait)
try storage.eraseStorageAndWait(
metadata: metadata,
soureModelHint: self.model[metadata]
)
_ = try self.createPersistentStoreFromStorage(
storage,
finalURL: fileURL,