Embora esteja funcionando corretamente a pesquisa e a classe "EntityManagerFactory" esteja com "isDevMode: true", não mostrou os comandos SQL na execução do "relatorio-cursos-por-aluno".
Doctrine\DBAL\Logging\DebugStack Object ( [queries] => Array ( )
[enabled] => 1
[start] =>
[currentQuery] => 0
)
EntityManagerFactory:
<?php
namespace Alura\Doctrine\Helper;
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\ORMException; use Doctrine\ORM\Tools\Setup;
class EntityManagerFactory { /**
* @return EntityManagerInterface
* @throws ORMException
*/
public function getEntityManager(): EntityManagerInterface
{
$rootDir = __DIR__ . '/../..';
$config = Setup::createAnnotationMetadataConfiguration(
[$rootDir . '/src'],
true
);
$connection = [
'driver' => 'pdo_sqlite',
'path' => $rootDir . '/var/data/banco.sqlite'
];
return EntityManager::create($connection, $config);
}
}