-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
SQLite: decimal literals formatted incorrectly #8205
Comments
Looks like we need to add the following. partial class SqliteSqlGenerationHelper
{
protected overrride string DecimalFormat => "G";
} BUT this is only the tip of the iceberg. Any arithmetic operation will coerce the values into |
Oh wait, the above code probably isn't sufficient. They need to be |
We should review all literals too--we had anther issue with |
It looks like
|
@smitpatel the logic used by Microsoft.Data.Sqlite is |
This should be fixed in SQLite to allow lossless arithmetic operations. |
|
Fixed by aspnet/Microsoft.Data.Sqlite#381 |
This issue was moved to aspnet/Microsoft.Data.Sqlite#382 |
When I insert a decimal value into a Sqlite database using EntityFramework Core, it will save it in a
Text
column. This is fine and prevents loss of data, but sometimes makes you unable to find a value you added beforeSteps to reproduce
It adds the value as
"3"
into the database, but uses"3.0"
in the query. It seems to not use the sameToString()
Further technical details
EF Core version: 1.1.1
Database Provider: Microsoft.EntityFrameworkCore.Sqlite
Operating system: Win7 x86
IDE: Visual Studio 2017
Edit:
This works for some reason:
The text was updated successfully, but these errors were encountered: