/** * {@inheritdoc} */ protected function hasAssociationConfigs(ClassMetadata $metadata, $associationName) { if ($this->isExtendField($metadata->name, $associationName)) { return false; } // check for default field of oneToMany or manyToMany relation if (strpos($associationName, ExtendConfigDumper::DEFAULT_PREFIX) === 0) { $guessedName = substr($associationName, strlen(ExtendConfigDumper::DEFAULT_PREFIX)); if (!empty($guessedName) && $this->isExtendField($metadata->name, $guessedName)) { return false; } } // check for inverse side field of oneToMany relation $targetClass = $metadata->getAssociationTargetClass($associationName); $prefix = strtolower(ExtendHelper::getShortClassName($targetClass)) . '_'; if (strpos($associationName, $prefix) === 0) { $guessedName = substr($associationName, strlen($prefix)); if (!empty($guessedName) && $this->isExtendField($targetClass, $guessedName)) { return false; } } return parent::hasAssociationConfigs($metadata, $associationName); }