/** * {@inheritdoc} */ protected function findEntity($class, array $data) { if (!$this->identifierAttribute) { throw new MissingIdentifierException(); } return $this->productRepository->findOneByIdentifier($data[$this->identifierAttribute->getCode()]); }