While SwiftData was a much needed refresh for working with persistence in Swift, there were still some features that were not present that developers were clamoring for. One such feature was the ability to use inheritance in your database schema. This makes sense because SwiftData models are backed by classes, and these classes can be inherited.
In this lesson, you’ll explore working with SwiftData models, and in the process, you’ll learn to:
Identify the difference between composition and inheritance.
Evaluate whether you should employ inheritance at all.
Describe how to incorporate inheritance in your SwiftData models.
See forum comments
This content was released on Dec 10 2025. The official support period is 6-months
from this date.
Get a quick overview of using model inheritance with SwiftData.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Conclusion
Next: Inheritance vs Composition
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.