Skip to content

Commit 3d493b4

Browse files
tobias-93bobvandevijver
authored andcommitted
Fix compatibility with ORM 3
1 parent 1cf2022 commit 3d493b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Guesser/DoctrineFieldGuesser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Admingenerator\GeneratorBundle\Exception\NotImplementedException;
66
use Doctrine\Persistence\ManagerRegistry;
7-
use Doctrine\ORM\Mapping\ClassMetadataInfo;
7+
use Doctrine\ORM\Mapping\ClassMetadata as ORMClassMetadata;
88
use Doctrine\Persistence\Mapping\ClassMetadata;
99
use Symfony\Component\HttpKernel\Kernel;
1010

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

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

0 commit comments

Comments
 (0)