-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Remove SqlServer TypeMapping for CLR type char #8656
Comments
Additional data points:
|
Note: this came out of the work for #8631. |
cc @anpete |
Note: decided for preview2 to just to update the way we deal with |
@lajones Can this issue be closed? |
@ajcvickers @divega @anpete @smitpatel I thought the solution to just change the |
I have added text in #242 which I think covers the follow up for this (@ajcvickers feel free to review it). Closing for now. |
An EntityType with property
char
is not supported by the SQL Server provider. HoweverSqlServerTypeMapper
does have a mapping in_clrTypeMappings
forchar
(mapping it to a SQL Serverint
column).The reason for this is to support generation of single character literals in the Query Pipeline e.g. as arguments to functions, or
LIKE
can take anESCAPE
argument which is a single character - see this test. Query checks that it can interpret each argument (in this case a single character) - if it fails to find a type mapping for that type then it assumes it cannot generate literals for that type.We should remove the entry in
_clrTypeMappings
forSqlServerTypeMapper
forchar
so that we will generate the correct error if someone tries to create a property of that type. But we need to provide an alternate means to translate the literal above. We discussed:LIKE
to enforce that theESCAPE
argument is a string, orstring
TypeMapping if achar
one does not exist.The text was updated successfully, but these errors were encountered: