Refetch monitors when persistent stores are added/removed. Allow unsafe transactions to create their own monitors

This commit is contained in:
John Rommel Estropia
2016-02-15 07:56:17 +09:00
parent e58b3b0131
commit 8efd6572f0
11 changed files with 534 additions and 62 deletions

View File

@@ -714,7 +714,7 @@ class func uniqueIDFromImportSource(source: ImportSource, inTransaction transact
```
For `ImportableUniqueObject`, the extraction and assignment of values should be implemented from the `updateFromImportSource(...)` method. The `didInsertFromImportSource(...)` by default calls `updateFromImportSource(...)`, but you can separate the implementation for inserts and updates if needed.
You can then call create/update an object by calling a transaction's `importUniqueObject(...)` method:
You can then create/update an object by calling a transaction's `importUniqueObject(...)` method:
```swift
CoreStore.beginAsynchronous { (transaction) -> Void in
let json: [String: AnyObject] = // ...