Closed Wasenshi123 closed 5 months ago
Hi, will look at this at the weekend
Not only Any
#12 . Same issue with SqlNullabilityProcessor
.
The fix is actually quite easy - I believe it should be enough to create a WindowFunctionsNpgsqlSqlNullabilityProcessor that would derive from from NpgsqlSqlNullabilityProcessor instead of the normal SqlNullabilityProcessor (already tried that in our fork and it seems to work). I might submit a PR later this week if I find the time.
@martinzima thank you! it works perfectly!
When executing query that looks like this:
it will throw exception like this:
Unhandled expression '[Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression+ConcreteColumnExpression] Equal ANY([Microsoft.EntityFrameworkCore.Query.SqlExpressions.SqlParameterExpression])' of type 'Npgsql.EntityFrameworkCore.PostgreSQL.Query.Expressions.Internal.PostgresAnyExpression' encountered in 'SqlNullabilityProcessor'.
with Stack Trace like this:
I only tested with Postgres, but believe this affect some of SQL server also.
From my investigation, your extension lib missed some framework-specific classes for SqlNullabilityProcessor. They should be inherited from so that default functionality of each framework would stay intact. (SqlServerSqlNullabilityProcessor, NpgsqlSqlNullabilityProcessor)
Expected Behavior: Normal query should be intact when using the extension.
Current Behavior: Some normal queries are affected when using the extension.