remove else
This commit is contained in:
parent
99b1eaaabb
commit
f7c16ab364
@ -2943,17 +2943,17 @@ class ClassMetadataInfo implements ClassMetadata
|
|||||||
{
|
{
|
||||||
if (isset($this->fieldNames[$columnName])) {
|
if (isset($this->fieldNames[$columnName])) {
|
||||||
return $this->fieldNames[$columnName];
|
return $this->fieldNames[$columnName];
|
||||||
} else {
|
|
||||||
foreach ($this->associationMappings as $assocName => $mapping) {
|
|
||||||
if ($this->isAssociationWithSingleJoinColumn($assocName) &&
|
|
||||||
$this->associationMappings[$assocName]['joinColumns'][0]['name'] == $columnName) {
|
|
||||||
|
|
||||||
return $assocName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
throw MappingException::noFieldNameFoundForColumn($this->name, $columnName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach ($this->associationMappings as $assocName => $mapping) {
|
||||||
|
if ($this->isAssociationWithSingleJoinColumn($assocName) &&
|
||||||
|
$this->associationMappings[$assocName]['joinColumns'][0]['name'] == $columnName) {
|
||||||
|
|
||||||
|
return $assocName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
throw MappingException::noFieldNameFoundForColumn($this->name, $columnName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user