This course is still being released! Check back later for more chapters.
Doctrine Inheritance: Classes in the Database
Learn how to map PHP class inheritance to your database using Doctrine. We’ll explore the available strategies, how to query them, and the tradeoffs you need to know to use inheritance confidently.
About this course
This course is in the planning stages
Doctrine makes it possible to map PHP class inheritance directly to your database — but choosing the right strategy (and using it well) is where things get interesting. In this course, you’ll learn how to model shared behavior, specialize entities, and persist complex class structures without turning your database into a mess.
You’ll learn how to:
- Use mapped superclasses to share fields and behavior cleanly
- Implement single table inheritance and understand when it shines
- Work with class table inheritance for more normalized schemas
- Query inherited structures without surprises
- Create and manage associations across inherited entities
- Recognize common pitfalls, tradeoffs, and performance caveats
By the end of this course, you’ll know how to map inheritance confidently in Doctrine, choose the right strategy for your use case, and design entity structures that are flexible, maintainable, and database-friendly.
Next courses in the Doctrine: Go Further section of the Doctrine Track!
Comments
"Houston: no signs of life"
Start the conversation!