Fixed the use of the removed ClassMetadataInfo constants

This commit is contained in:
Jan Böhmer 2024-06-09 23:37:18 +02:00
parent 7d9be5ae76
commit 60325e797d
4 changed files with 11 additions and 11 deletions

View file

@ -30,7 +30,7 @@ use App\Entity\Base\AbstractDBElement;
use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Contracts\TimeStampableInterface;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\ClassMetadata;
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
/**
@ -212,7 +212,7 @@ trait PKImportHelperTrait
$id = (int) $id;
$metadata = $this->em->getClassMetadata($element::class);
$metadata->setIdGeneratorType(ClassMetadataInfo::GENERATOR_TYPE_NONE);
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
$metadata->setIdGenerator(new AssignedGenerator());
$metadata->setIdentifierValues($element, ['id' => $id]);
}