Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-escapeing table names breaks on preescaped table names #19

Open
lukaferlez opened this issue Aug 13, 2020 · 0 comments
Open

Auto-escapeing table names breaks on preescaped table names #19

lukaferlez opened this issue Aug 13, 2020 · 0 comments

Comments

@lukaferlez
Copy link

The current escaping setup is designed to work with table name formats such as "scheme.table_name" and it will try to automatically escape table names on "." separator.

When working with names as "dbo.[something.something]" the existing escaping setup fails due to the fact that it is assumed that every . is a break in the name.

Dapper and other ADO.net components do not auto-escape names, probably due to such scenarios, and it is expected that the designer of the model escapes them himself in the Table and Column attributes.

I see two fixes for this

Remove auto-escaping

Did it in a fork & can create a pull request to merge it in, but this will be a breaking change to anyone not escaping names properly already.

Change parsing

Change the parsing of the table name to ignore everything that is already escaped, ie. between [ ] within the supplied name. In the next couple of days I can make the change in this direction if that would be more desirable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant