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);
    }
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);
    }
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 ) ; }
Build a name for a column in a jointable.

@param string $className
@return string
Build a name for a column in a jointable .