You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -40,74 +40,61 @@ To give some weight to this idea, here's a quote from the Q&A portion of [this](
40
40
41
41
### Model Bridging
42
42
43
-
There are two protocols that handle bridging between the value type and managed models.
43
+
There are various protocols for defining how a value type should
44
+
bridge to the corresponding `NSManagedObject` subclass. Each
45
+
protocol is intended for a general pattern of use.
44
46
45
-
#### RepositoryManagedModel
47
+
A single value type can conform to multiple protocols to combine their supported functionality. A single `NSManagedObject` subclass can be bridged to by multiple value types.
48
+
49
+
-`FetchableUnmanagedModel` for types that will be queried through 'fetch' endpoints.
50
+
-`ReadableUnmanagedModel` for types that can be accessed individually. Inherits from `FetchableUnmanagedModel`.
51
+
-`IdentifiedUnmanagedModel` for `ReadableUnmanagedModel` types that have a unique, hashable ID value.
52
+
-`ManagedIdReferencable` for `ReadableUnmanagedModel` types that store their `NSManagedObjectID`.
53
+
-`ManagedIdUrlReferencable` for `ReadableUnmanagedModel` types that store their `NSManagedObjectID` in `URL` form.
54
+
-`WritableUnmanagedModel` for that types that need to write to the store via create, update, and delete operations.
55
+
-`UnmanagedModel` for types that conform to both `ReadableUnmanagedModel` and `WritableUnmanagedModel`.
os_log("Transaction completed with \(result.count) new movies")
208
+
```
209
+
210
+
**Important:** When using batch operations within transactions, don't specify `transactionAuthor` for individual operations as it's handled at the transaction level:
211
+
212
+
```swift
213
+
// ✅ Correct - transactionAuthor only on withTransaction
I welcome any feedback or contributions. It's probably best to create an issue where any possible changes can be discussed before doing the work and creating a PR.
210
-
211
-
The above [TODO](#todo) section is a good place to start if you would like to contribute but don't already have a change in mind.
0 commit comments