-
Notifications
You must be signed in to change notification settings - Fork 189
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
When inserting double.NaN, Entity State is always Modified #93
Comments
Nullable double, insert NaN public double? TestNumber {get; set;} |
I've been able to reproduce the issue with EF Core 2.x and 3.1. I've filed bug 31785728 so that my dev team can investigate. |
I've been able to reproduce the issue with Postgresql, may be a problem in ef core. |
Thanks for pinging me, there indeed seem to be some EF-side issues around NaN. Will post back soon. |
I've submitted a fix to EF Core, please take a look at npgsql/efcore.pg#1472 and dotnet/efcore#22168. The code in the PR can be used as-is inside a provider's mapping, so you shouldn't need to block on the PR getting merged. See also npgsql/efcore.pg#1472 which adds some functionality to the PostgreSQL provider (literal SQL generation and method translation for the testing methods on double). |
Thanks, @roji! I'll ask my team to review the npgsql changes when they address this bug. |
Version:
https://www.nuget.org/packages/Oracle.EntityFrameworkCore/2.19.80
After calling
dbcontext.SaveChanges
, the state of the entity becomesModified
.This may be a problem in implementing the double type comparison.
The text was updated successfully, but these errors were encountered: