-
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
RevEng: Decimal column with same precision and scale as the default produce warnings at runtime #12241
Comments
Marking for re-triage. Currently decimal warning is in ModelValidator code. And the inference about requiring |
Triage: we will make a change to always scaffold a column type for decimal for all providers. This means there may be some extra configuration in the model that is not needed, but there will be no warnings at runtime. We will then leave this issue open to do a provider-specific fix once the infrastructure is in place. |
Reopening:
|
@bricelam Why is this still open? |
We want to scaffold the decimal type only in SqlServer provider rather than everywhere. So providers have to contribute in certain way that, ClrType requires |
Reply from future; Why is this still open? |
@dengere Because the work to implement this hasn't been done. |
I have a sort of related "issue" to #6965.
If my column in the database is decimal(18,2) the scaffolding will not produce .HasColumnType("decimal(18, 2)") since I guess it is equal to the default.
BUT on the other hand I get frightening warnings when I run the project that no type was specified for the decimal column and that the values might be silently truncated.
It would be best if the scaffolding produced the HascolumnType even if it is equal to the current default so I dont get heartattacks from the warnings. :-)
Further technical details
EF Core version: 2.1
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Win10
IDE: Visual Studio 2017 15.7.3
The text was updated successfully, but these errors were encountered: