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
Query Exception : Null TypeMapping in Sql Tree #22978
Comments
By the way, i tried the same query in Entity Framework Core 2.0 and it works as expected (no exception) So it is only produces error in EF.Core 3.1 (in my case 3.1.8) |
Can you try with 5.0 nightly packages? We believe that this issue is fixed in 5.0 |
Yes, in version 5.0.0-rc.1.20451.13 it works as expected. |
3.1 is current LTS version and is supported. But like with every other product, we fix bugs in current release as product moves forward. We patch bugs in older release according to our patch policy. You can read more about our patch policy here - https://docs.microsoft.com/en-us/ef/core/what-is-new/release-planning#patch-releases This particular issue is fixed in 5.0 release. In order to backport it to 3.1 release, it requires to match patch release criteria. |
OK, but take in consideration, that this query works in EF 6 for Net Framework, EF.Core 2.0, and for consistency it is good to be working in EF 3.1. It seems a breaking change without a good reason - because the expression is perfectly valid (the Convert function is supported) and must be translated to SQL without problems. |
I updated the Dynamic Linq library (my version of it), so it would not use the Convert function in this case, so my code is working as expected, now |
I ran into this bug this morning. I read smitpatel's post from Oct 2020 with a mixture of anger, frustration and 'It figures'. I am using an officially supported version with a status of LTS and the response seems to be 'meh'. This is why developers have such a low opinion of MS. You leave us hanging. My situation is a double whammy since I am working on a UWP app which was promoted by MS as the go to cross platform framework up until the point that it wasn't and now seems to be the unwanted step child. Because MS has not kept up with UWP, the 5.0 versions are not compatible and developers are stuck with 3.1, which really isn't stuck considering that it is LTS, but wait, that really doesn't mean much if the bug doesn't meet certain criteria. Since several months have past, is there any update to the status of fixing this bug in the 3.1.x versions? |
This query:
produces "Null TypeMapping in Sql Tree" exception inside Microsoft.EntityFrameworkCore.Relational
The filter condition in the query is created using Dynamic Linq library, but exception is occured only when using equals (or not equals) to null value
This can be reproduced using this DEMO project: Demo Project
The github repo: https://github.com/BBGONE/JRIApp.Core
This project has several demo pages, the bug is exposed in the DataGrid Demo, when i try to filter results by selecting for product table, filter
condition for Size : EMPTY or NOT EMPTY.
Include provider and version information
EF Core version: 3.1.8
Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer)
Operating system: Windows 10 Professional
IDE: (e.g. Visual Studio 2019 16.7.5)
The text was updated successfully, but these errors were encountered: