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

SymfonyCasts

Mastering Doctrine Relationships in Symfony 3

via SymfonyCasts

Overview

In the part 1 of the Doctrine Tutorial we got a sweet setup with Doctrine: entities, queries, migrations and fixtures.

But, we left out one big piece: database relations. Once you've mastered these, you'll be unstoppable. Unfortunately, a lot of information out there make Doctrine relations look over-complicated. Actually, they're simple and beautiful. Sure, they have some pitfalls - but they'll also help you build a complex data structure in no time.

  • ManyToOne relationships (associations)
  • The OneToMany side of a relation
  • The downfall of owning versus inverse sides of a relation
  • Doing magic with the ArrayCollection
  • Querying with Joins

... and more - like some magic with the "Param Conversion".

Syllabus

  • Create Genus Note
  • The King of Relations: ManyToOne
  • Saving a Relationship
  • JoinColumn & Relations in Fixtures
  • Controller Magic: Param Conversion
  • OneToMany: Inverse Side of the Relation
  • Order By with a OneToMany
  • Tricks with ArrayCollection
  • Querying on a Relationship
  • Query across a JOIN (and Love it)

Taught by

Ryan Weaver and Leanna Pelham

Reviews

Start your review of Mastering Doctrine Relationships in Symfony 3

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.