Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

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
Download course materials from Github
Previous: Conclusion Next: Inheritance vs Composition