Check for the being owning side
* Small fix do get rid of notice `undefined index 'joinTable'` as the inverse side does not declare `joinTable` at all. * Shortened access to `$classMetadata->associationMappings[$fieldName]` for read accesses to increase readability
This commit is contained in:
parent
61bcfda167
commit
ac70c18d50
@ -45,8 +45,8 @@ appropriate autoloaders.
|
||||
}
|
||||
|
||||
foreach ($classMetadata->getAssociationMappings() as $fieldName => $mapping) {
|
||||
if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadataInfo::MANY_TO_MANY) {
|
||||
$mappedTableName = $classMetadata->associationMappings[$fieldName]['joinTable']['name'];
|
||||
if ($mapping['type'] == \Doctrine\ORM\Mapping\ClassMetadataInfo::MANY_TO_MANY && $mapping['isOwningSide']) {
|
||||
$mappedTableName = $mapping['joinTable']['name'];
|
||||
$classMetadata->associationMappings[$fieldName]['joinTable']['name'] = $this->prefix . $mappedTableName;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user