Olá.
Ao vincular aluno com curso, apresenta o seguinte erro:
Could not open input file: commands\vincular-aluno-curso
D:\Fundamentos Doctrine\Doctrine Alura>php commands\vincular-aluno-curso.php
PHP Notice: Undefined offset: 1 in D:\Fundamentos Doctrine\Doctrine Alura\commands\vincular-aluno-curso.php on line 1
2
PHP Notice: Undefined offset: 2 in D:\Fundamentos Doctrine\Doctrine Alura\commands\vincular-aluno-curso.php on line 1
3
PHP Fatal error: Uncaught Doctrine\ORM\ORMException: The identifier id is missing for a query of Alura\Doctrine\Entit
y\Curso in D:\Fundamentos Doctrine\Doctrine Alura\vendor\doctrine\orm\lib\Doctrine\ORM\ORMException.php:309
Stack trace:
#0 D:\Fundamentos Doctrine\Doctrine Alura\vendor\doctrine\orm\lib\Doctrine\ORM\EntityManager.php(410): Doctrine\ORM\OR
MException::missingIdentifierField('Alura\\Doctrine\\...', 'id')
#1 D:\Fundamentos Doctrine\Doctrine Alura\commands\vincular-aluno-curso.php(16): Doctrine\ORM\EntityManager->find('Alu
ra\\Doctrine\\...', Array)
#2 {main}
thrown in D:\Fundamentos Doctrine\Doctrine Alura\vendor\doctrine\orm\lib\Doctrine\ORM\ORMException.php on line 309