public static function parseTableName($className)
    {
        $parts = explode('\\', $className);
        $name = end($parts);
        $tableName = null;

        $words = explode('#', Text::camelCaseToSeparator($name, "#"));
        $last = array_pop($words);
        $last = Text::plural(strtolower($last));
        array_push($words, $last);
        foreach ($words as $word) {
            $tableName .= ucfirst($word);
        }
        return lcfirst($tableName);
    }