Conclusion
The ability to use Swift Macros to add a lot of hidden code behind the scenes makes SwiftData a lot easier to use, and places it inline with other more declarative parts of the Swift/SwiftUI ecosystem. Setting up models, performing queries and registering models with the context are simple compared to the Core Data days.
Now with your brain refreshed on the basics of SwiftData, it’s time to take a look at the updates to SwiftData from WWDC 2025, because there were still some things developers were clamoring for, one of which was model inheritance. Luckily Apple heard the cries of developers everywhere and introduced model inheritance this year. You’ll learn about that in the next lesson.