private function getTableNamePrefix($className)
    {
        $name = ltrim($className, '\\');
        foreach ($this->namingMap as $prefix => $namespace) {
            if (strpos($name, $namespace) === 0) {
                return $prefix . '_';
            }
        }

        return '';
    }