-
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
RelationalMethodCallTranslatorProvider and explicit typeMapping #27524
Comments
Currently, the TypeMapping on DbFunction is not set by anything. It is derived when accessing based on store type string specified. This means that the store type must be mappable by the provider for given CLR type returned by function. There is no way to specify a value converter for DbFunctions yet. So the CLR type has to be mappable by provider for this to work correctly in all path (till we get value converter support). If the CLR type can be mapped to multiple different store type then store type string helps figuring out the correct one. Passing in the type mapping here will help with inferring the type mapping. Currently user set type mapping is ignored other than validating that it is mappable type. |
Poaching |
Hi,
is it on purpose that
dbFunction.TypeMapping
is not passed in into these calls, but the defaultnull
is used?efcore/src/EFCore.Relational/Query/RelationalMethodCallTranslatorProvider.cs
Lines 78 to 91 in f8585c2
We have some SQL function returning
string[]
, and have to useHasDbFunction
with a more complexHasTranslation
instead of the simple fluent API, presumably because of this.The text was updated successfully, but these errors were encountered: