Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

Doctrine Inheritance: Classes in the Database

via SymfonyCasts

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it

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.

Syllabus

  • Mapped Superclasses
  • Foundry Fixtures for Inheritance
  • Single Table Inheritance
  • Class Table Inheritance
  • Querying "Types"
  • Association Considerations

Taught by

Kevin Bond

Reviews

Start your review of Doctrine Inheritance: Classes in the Database

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.