Conditional filter not working with EntityFramework6.Npgsql 3.2.1.1
ondrasvoboda opened this issue · 6 comments
Description
I recently upgraded EntityFramework6.Npgsql provider to version 3.2.1.1 and conditional filter stopped working. I'm getting following exception when executing any query. Reverting EntityFramework6.Npgsql back fixed this.
I think the problem is on EntityFramework6.Npgsql side. I started an issue here: npgsql/EntityFramework6.Npgsql#126 but I'm unable to provide them a code sample without DynamicFilters component. Maybe you can help.
Thanks
Exception
Exception message: Object reference not set to an instance of an object
Stack trace:
at System.Object.GetType()
at Npgsql.NpgsqlServices.ConvertValueToNumericIfEnum(DbParameter parameter)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.SyncParameterProperties(EntityParameter entityParameter, DbParameter storeParameter, DbProviderServices storeProviderServices)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.PrepareEntityCommandBeforeExecution(EntityCommand entityCommand)
at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.<ExecuteStoreCommandsAsync>d__c.MoveNext()
Further technical details
- EF version: 6.2
- EF DynamicFilters version: 3.0.1
- Database Provider: EntityFramework6.Npgsql 3.2.1.1
Hello @ondrasvoboda ,
Can you provide a runnable project/solution with this issue?
You can send it in private here: info@zzzprojects.com
Best Regards,
Jonathan
Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
Hi,
I've modified your test project. Please see the attachment.
10/11 tests are failing with the above exception in DisableFilterTests.
If you switch EntityFramework6.Npgsql to version 3.2.0 all is OK.
Great thank,
The issue has been assigned to one of my developers.
Hello @ondrasvoboda ,
At this moment, we didn't find the cause of the issue.
On the good side, we already have a fork for their provider used for EF Classic: https://github.com/zzzprojects/EntityFramework6.Npgsql
So the next time we merge the Npgsql code to our fork, we will be able to check this issue more easily.
Meanwhile, I believe you will need to stick with v3.2.0
Hi @JonathanMagnan,
is there anything new about this issue?
Fixed in npgsql/EntityFramework6.Npgsql#126