# SwiftData model inheritance

> Shows when and how to subclass SwiftData models, query by type and migrate, so your iOS 26 data model stays clean.

- Page: https://youraiskill.com/skill/rshankras-swiftdata-inheritance
- What it does: SwiftData class inheritance patterns for hierarchical models with type-based querying, polymorphic relationships, and when to choose inheritance vs enums. Use when designing SwiftData model hierarchies.
- Niches: ios, databases, mobile-apps
- Licence: MIT
- Status: Checked: open licence, author credited, passed the YourAISkill safety scan. Can be added to a paid pack.
- Contents: instructions and reference files only (1 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
