From 58677c29b4bc97273da950f6312e43ff540a7407 Mon Sep 17 00:00:00 2001 From: Maciej Malarz Date: Thu, 30 Jan 2020 20:21:41 +0100 Subject: [PATCH] Make Embeddable not transient --- lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 1 + tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php | 5 +++++ 2 files changed, 6 insertions(+) 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)); + } }