Skip to content

Commit

Permalink
Fix compatibility with ORM 3
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-93 authored Jan 7, 2025
1 parent 1cf2022 commit 089c213
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Guesser/DoctrineFieldGuesser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Admingenerator\GeneratorBundle\Exception\NotImplementedException;
use Doctrine\Persistence\ManagerRegistry;
use Doctrine\ORM\Mapping\ClassMetadataInfo;
use Doctrine\ORM\Mapping\ClassMetadata as ORMClassMetadata;
use Doctrine\Persistence\Mapping\ClassMetadata;
use Symfony\Component\HttpKernel\Kernel;

Expand Down Expand Up @@ -215,7 +215,7 @@ protected function getOptions(string $type, string $dbType, string $model, strin
$mapping = $this->getMetadatas($class)->getAssociationMapping($columnName);

return array(
'multiple' => ($mapping['type'] === ClassMetadataInfo::MANY_TO_MANY || $mapping['type'] === ClassMetadataInfo::ONE_TO_MANY),
'multiple' => ($mapping['type'] === ORMClassMetadata::MANY_TO_MANY || $mapping['type'] === ORMClassMetadata::ONE_TO_MANY),
'em' => $this->getObjectManagerName($mapping['target'.ucfirst($this->objectModel)]),
'class' => $mapping['target'.ucfirst($this->objectModel)],
'required' => !$filter && $this->isRequired($class, $columnName),
Expand Down

0 comments on commit 089c213

Please sign in to comment.