diff --git a/lib/Doctrine/ORM/Mapping/AssociationOverride.php b/lib/Doctrine/ORM/Mapping/AssociationOverride.php index cd149760b..f9f7f4912 100644 --- a/lib/Doctrine/ORM/Mapping/AssociationOverride.php +++ b/lib/Doctrine/ORM/Mapping/AssociationOverride.php @@ -23,10 +23,10 @@ namespace Doctrine\ORM\Mapping; * This annotation is used to override association mapping of property for an entity relationship. * * @author Fabio B. Silva - * @since 2.2 + * @since 2.3 * * @Annotation - * @Target({"PROPERTY","ANNOTATION"}) + * @Target("ANNOTATION") */ final class AssociationOverride implements Annotation { diff --git a/lib/Doctrine/ORM/Mapping/AssociationOverrides.php b/lib/Doctrine/ORM/Mapping/AssociationOverrides.php index 6cc0d9a41..b46f47f85 100644 --- a/lib/Doctrine/ORM/Mapping/AssociationOverrides.php +++ b/lib/Doctrine/ORM/Mapping/AssociationOverrides.php @@ -23,7 +23,7 @@ namespace Doctrine\ORM\Mapping; * This annotation is used to override association mappings of relationship properties. * * @author Fabio B. Silva - * @since 2.2 + * @since 2.3 * * @Annotation * @Target("CLASS") diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php index d42c4e9f5..5d63afda6 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php @@ -477,11 +477,6 @@ class ClassMetadataInfo implements ClassMetadata */ public $associationMappings = array(); - /** - * @var array - */ - public $overrideAssociationMappings = array(); - /** * READ-ONLY: Flag indicating whether the identifier/primary key of the class is composite. * @@ -576,7 +571,7 @@ class ClassMetadataInfo implements ClassMetadata /** * NamingStrategy determining the default column and table names * - * @var \Doctrine\ORM\NamingStrategy + * @var Doctrine\ORM\Mapping\NamingStrategy */ protected $namingStrategy; @@ -1808,9 +1803,12 @@ class ClassMetadataInfo implements ClassMetadata } /** + * Sets the association to override association mapping of property for an entity relationship. + * * @param string $fieldName + * @param array $overrideMapping */ - public function setAssociationOverride($fieldName, $overrideMapping) + public function setAssociationOverride($fieldName, array $overrideMapping) { if (!isset($this->associationMappings[$fieldName])) { throw MappingException::invalidOverrideFieldName($this->name, $fieldName); diff --git a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php index 97b219f6a..d7ec9af70 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php @@ -527,13 +527,13 @@ class YamlDriver extends AbstractFileDriver } } - // Evaluate association-overrides + // Evaluate associationOverride if (isset($element['associationOverride'])) { foreach ($element['associationOverride'] as $fieldName => $associationOverride) { $override = array(); - // Check for join-columns + // Check for joinColumn if (isset($associationOverride['joinColumn'])) { $joinColumns = array(); foreach ($associationOverride['joinColumn'] as $name => $joinColumnElement) { @@ -545,7 +545,7 @@ class YamlDriver extends AbstractFileDriver $override['joinColumns'] = $joinColumns; } - // Check for join-table + // Check for joinTable if (isset($associationOverride['joinTable'])) { $joinTableElement = $associationOverride['joinTable'];