diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index d59fd3bb773..bafd5d27499 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -44,6 +44,7 @@ class AnnotationDriver extends AbstractAnnotationDriver protected $entityAnnotationClasses = [ Mapping\Entity::class => 1, Mapping\MappedSuperclass::class => 2, + Mapping\Embeddable::class => 3, ]; /** diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php index 7a483ebc783..f78b313e78d 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php @@ -328,6 +328,11 @@ public function getInfiniteEmbeddableNestingData() ['DDCNestingEmbeddable1', 'DDCNestingEmbeddable4'], ]; } + + public function testEmbeddableIsNotTransient() + { + $this->assertFalse($this->_em->getMetadataFactory()->isTransient(DDC93Address::class)); + } }