The API has changed since the WWDC videos. You need to add deleteRule: in front of cascade.
class TodoList {
var title: String
@Relationship(deleteRule: .cascade)
var items: [TodoItem]
}
This Developer doc on Switching from Core Data has the current syntax (Beta 8)
https://developer.apple.com/documentation/coredata/adopting_swiftdata_for_a_core_data_app
Topic:
Programming Languages
SubTopic:
Swift
Tags: