Reduce doctrine queries on hydration of related entities
Suppose you have a schema like the one in the next figure and in your repository class you fetch an MqProject entity and later in the code you traverse through all MqProject’s related MqJobs and each job’s related MqTasks like foreach($project->getJobs as $job) { foreach($job->getTasks as $task) { printf(“job: %s task %s\n”, $job->getId(), $task->getId()); } […]