Skip to content

Typo bug in DbProvider.EscapeTableName #89

@gideonkorir

Description

@gideonkorir

Keep getting System.FormatException when I specify the table schema either using conventions or TableAttribute. Tracked the culprit to EscapeTableName:

public string EscapeTableName(TableName table)
        {
            var schema = "";
            if (!table.Schema.IsNullOrEmpty())
            {
                schema = Escape(schema,EscapeChars.Start,EscapeChars.End)+".";
            }

            return schema + Escape(table.Name,EscapeChars.Start, EscapeChars.End);
        }

After we check that table.Schema is not null or empty, we try and escape the empty schema variable which causes us to throw

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions