Usually all joined entities are automatically joined and returned by Doctrine. Depending on the fetch (
LAZY). This is done directly or not. But when you want to filter depending on joined columns, you have to join manually.
You can use strings for this or use the constants provided by
$queryBuilder->innerJoin( Project::class, // Entity 'p', // Alias Join::WITH, // Join type 'p.id = c.project' // Join columns );