File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -182,8 +182,8 @@ extension Book: SelfDescribingCoreDataEntity {
182182We can now build our data model and create a container:
183183``` swift
184184let 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
205205In 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 ))
You can’t perform that action at this time.
0 commit comments