How does SwiftData Know the data type in a one to many relationship
I am trying to learn swiftdata, and I am struggling with relationships, in SQL it is very straightforward, but I don’t understand why the relationship I have set up works, it seems to but why?
Making undo/redo work with relationships: my mistake or SwiftData bug?
I’m trying to take advantage of SwiftData’s automatic undo/redo support in a SwiftUI macOS app. I’ve overcome one of the wrinkles of getting it to work with relationships, but am stuck on another and wondering if I’m missing something or if it’s in fact a SwiftData bug.