You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currenlty the implementation of GetDatabaseType and ToParameterType treat types with generics in different ways:
GetDatabaseType always strips the concrete generic arguments to retrieve the generic type definition and uses that to try and retrieve the registered type name.
ToParameterType does not have special handling.
I would expect these two functions to treat generic types in the same way (otherwise it is always required to add 1 concrete and 1 open version to e.g. the NpgsqlTypeMapping implementation).
My proposal would be to first attempt to find a mapping for the type directly, if there is no such definition, retry on the open generic version of it.
Currenlty the implementation of
GetDatabaseType
andToParameterType
treat types with generics in different ways:GetDatabaseType
always strips the concrete generic arguments to retrieve the generic type definition and uses that to try and retrieve the registered type name.ToParameterType
does not have special handling.I would expect these two functions to treat generic types in the same way (otherwise it is always required to add 1 concrete and 1 open version to e.g. the
NpgsqlTypeMapping
implementation).My proposal would be to first attempt to find a mapping for the type directly, if there is no such definition, retry on the open generic version of it.
This will most likely also resolve this issue: JasperFx/marten#3148
Will create pull request with proposed solution
The text was updated successfully, but these errors were encountered: