Go Pro with Doctrine Queries
Offered By: SymfonyCasts
Course Description
Overview
You already know how to query with SQL, so learning how to do complex queries with Doctrine should not be a pain! In this tutorial, we'll learn about:
- the language Doctrine speaks (DQL)
- the QueryBuilder object
- JOINs! And using them to reduce queries
- SELECTing specific fields instead of entire objects
- If all else fails, run raw SQL queries!
- Using Criteria to efficiently filter relation collections
And more! Let's see what kind of crazy queries we can create!
Syllabus
- Doctrine DQL
- The QueryBuilder
- andWhere() and orWhere()
- JOINs
- JOINs and addSelect Reduce Queries
- EXTRA_LAZY Relationships
- SELECT the SUM (or COUNT)
- Selecting Specific Fields
- SELECTing into a New DTO Object
- Raw SQL Queries
- Reusing Queries in the Query Builder
- Criteria: Filter Relation Collections
- Filters: Automatically Modify Queries
- WHERE IN()
- Using RAND() or Other Non-Supported Functions
- Using GROUP BY to Fetch & Count in 1 Query
Taught by
Victor Bocharsky and Ryan Weaver
Related Courses
API Platform 3 Part 3: Custom ResourcesSymfonyCasts Mastering Doctrine Relations
SymfonyCasts Symfony PHP Framework Tutorial - Full Course
freeCodeCamp Doctrine, Symfony 6 & the Database
SymfonyCasts Symfony 3: Doctrine & the Database
SymfonyCasts