https://spidertec.fr/realisation/more?realisation%3D1=

Exceptions

The identifier id is missing for a query of App\Entity\Realisation

  • Exception
  • Logs
  • Stack Trace

Doctrine\ORM\Exception\ MissingIdentifierField

  1. final class MissingIdentifierField extends ORMException implements ManagerException
  2. {
  3.     public static function fromFieldAndClass(string $fieldNamestring $className): self
  4.     {
  5.         return new self(sprintf(
  6.             'The identifier %s is missing for a query of %s',
  7.             $fieldName,
  8.             $className
  9.         ));
  10.     }
  1.         $sortedId = [];
  2.         foreach ($class->identifier as $identifier) {
  3.             if (! isset($id[$identifier])) {
  4.                 throw MissingIdentifierField::fromFieldAndClass($identifier$class->name);
  5.             }
  6.             if ($id[$identifier] instanceof BackedEnum) {
  7.                 $sortedId[$identifier] = $id[$identifier]->value;
  8.             } else {
  1.     public function find($className$id$lockMode null$lockVersion null)
  2.     {
  3.         $this->initializer164cc && ($this->initializer164cc->__invoke($valueHolder60ee2$this'find', array('className' => $className'id' => $id'lockMode' => $lockMode'lockVersion' => $lockVersion), $this->initializer164cc) || 1) && $this->valueHolder60ee2 $valueHolder60ee2;
  4.         return $this->valueHolder60ee2->find($className$id$lockMode$lockVersion);
  5.     }
  6.     public function getReference($entityName$id)
  7.     {
  8.         $this->initializer164cc && ($this->initializer164cc->__invoke($valueHolder60ee2$this'getReference', array('entityName' => $entityName'id' => $id), $this->initializer164cc) || 1) && $this->valueHolder60ee2 $valueHolder60ee2;
  1.      * @return object|null The entity instance or NULL if the entity can not be found.
  2.      * @psalm-return ?T
  3.      */
  4.     public function find($id$lockMode null$lockVersion null)
  5.     {
  6.         return $this->_em->find($this->_entityName$id$lockMode$lockVersion);
  7.     }
  8.     /**
  9.      * Finds all entities in the repository.
  10.      *
EntityRepository->find() in src/Controller/AjaxController.php (line 20)
  1.     /**
  2.      * @Route("/realisation/more", name="realisationAjax")
  3.      */
  4.     public function realisationMore(RealisationRepository $realisationRepository,Request $request): Response
  5.     {
  6.         $realisation $realisationRepository->find($request->get('realisation'));
  7.         return $this->render('ajax/realisation.html.twig', [
  8.             'realisation' => $realisation
  9.         ]);
  10.     }
in vendor/symfony/http-kernel/HttpKernel.php -> realisationMore (line 153)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 20)
  1.     Debug::enable();
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);