From 2b2f4894cb2b21b45d27f68229dae9229ad75b4c Mon Sep 17 00:00:00 2001 From: "Johannes M. Schmitt" Date: Sat, 2 Nov 2013 13:55:19 +0100 Subject: [PATCH] fixes declaring class --- lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index 3a4d080ab..5ddac59f7 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -899,7 +899,8 @@ class ClassMetadataInfo implements ClassMetadata foreach ($this->fieldMappings as $field => $mapping) { if (isset($mapping['declaredField'])) { - $declaringClass = isset($this->embeddedClasses[$field]['declared']) ? $this->embeddedClasses[$field]['declared'] : $this->name; + $declaringClass = isset($this->embeddedClasses[$mapping['declaredField']]['declared']) + ? $this->embeddedClasses[$mapping['declaredField']]['declared'] : $this->name; $this->reflFields[$field] = new ReflectionEmbeddedProperty( $reflService->getAccessibleProperty($declaringClass, $mapping['declaredField']),