diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index eb50d1251..8c3dac229 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -838,7 +838,7 @@ class ClassMetadataInfo implements ClassMetadata */ public function validateAssocations() { - foreach ($this->associationMappings as $field => $mapping) { + foreach ($this->associationMappings as $mapping) { if ( ! \Doctrine\Common\ClassLoader::classExists($mapping['targetEntity']) ) { throw MappingException::invalidTargetEntityClass($mapping['targetEntity'], $this->name, $mapping['fieldName']); }