fix docblock and remove white spaces
This commit is contained in:
parent
9e010cbd34
commit
3085c52f95
@ -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 <fabio.bat.silva@gmail.com>
|
||||
* @since 2.2
|
||||
* @since 2.3
|
||||
*
|
||||
* @Annotation
|
||||
* @Target({"PROPERTY","ANNOTATION"})
|
||||
* @Target("ANNOTATION")
|
||||
*/
|
||||
final class AssociationOverride implements Annotation
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace Doctrine\ORM\Mapping;
|
||||
* This annotation is used to override association mappings of relationship properties.
|
||||
*
|
||||
* @author Fabio B. Silva <fabio.bat.silva@gmail.com>
|
||||
* @since 2.2
|
||||
* @since 2.3
|
||||
*
|
||||
* @Annotation
|
||||
* @Target("CLASS")
|
||||
|
@ -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);
|
||||
|
@ -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'];
|
||||
|
Loading…
x
Reference in New Issue
Block a user