Skip to content

Commit d6ef0f8

Browse files
Readme update
1 parent 31ee678 commit d6ef0f8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ extension Book: SelfDescribingCoreDataEntity {
182182
We can now build our data model and create a container:
183183
```swift
184184
let container = try await NSManagedObjectModel(
185-
AuthorEntity.self,
186-
BookEntity.self
185+
Author.self,
186+
Book.self
187187
)
188188
.createContainer(name: "Books", location: .local)
189189
```
@@ -204,11 +204,11 @@ final public class Author: NSManagedObject, Identifiable {
204204

205205
In the `Author`'s extension to conform to `SelfDescribingCoreDataEntity` we would set `isOrdered` to `false` or simply write `.toMany`:
206206
```Swift
207-
extension AuthorEntity: SelfDescribingCoreDataEntity {
208-
public static var entityDescription = AuthorEntity.description(
207+
extension Author: SelfDescribingCoreDataEntity {
208+
public static var entityDescription = Author.description(
209209
// ...
210210
.relationship(\._books, .init(
211-
inverse: \BookEntity.author,
211+
inverse: \Book.author,
212212
deleteRule: .cascadeDeleteRule,
213213
relationshipType: .toMany
214214
))

0 commit comments

Comments
 (0)