protected function buildJoinTableColumnName($className)
{
if (preg_match('/^(?P<PackageNamespace>\\w+(?:\\\\\\w+)*)\\\\Domain\\\\Model\\\\(?P<ModelNamePrefix>(\\w+\\\\)?)(?P<ModelName>\\w+)$/', $className, $matches)) {
$packageNamespaceParts = explode('\\', $matches['PackageNamespace']);
$tableName = strtolower(strtr($packageNamespaceParts[count($packageNamespaceParts) - 1], '\\', '_') . ($matches['ModelNamePrefix'] !== '' ? '_' . strtr(rtrim($matches['ModelNamePrefix'], '\\'), '\\', '_') : '') . '_' . $matches['ModelName']);
} else {
$classNameParts = explode('\\', $className);
$tableName = strtolower($classNameParts[1] . '_' . implode('_', array_slice($classNameParts, -2, 2)));
}
return $this->truncateIdentifier($tableName);
}