From 09a48a896eb3adfb1569beafab8566b69167b01e Mon Sep 17 00:00:00 2001 From: jwage Date: Wed, 7 Oct 2009 18:53:30 +0000 Subject: [PATCH] [2.0][DDC-34] Fixing issue with duplicate association mappings when dealing with mapped super classes --- lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index 3650ace23..dad972353 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -128,7 +128,11 @@ class AnnotationDriver implements Driver // Evaluate annotations on properties/fields foreach ($class->getProperties() as $property) { - if ($metadata->hasField($property->getName())) { + if ($metadata->isMappedSuperclass && ! $property->isPrivate() + || + $metadata->isInheritedField($property->name) + || + $metadata->isInheritedAssociation($property->name)) { continue; }