-
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
Translation for Nullable<T>.ToString()
#33942
Comments
@ranma42 thanks for digging into this, the current situation indeed seems quite problematic. Without going into specifics, we'd ideally align the translation with the .NET behavior, which as you say is to return an empty string; this would be a small breaking change, but one which I think would be accepted (as the current behavior is simply buggy). I'll bring this up in a design discussion to make sure the team agrees. |
Design discussion: we agree that we should align the Nullable ToString() behavior to the .NET one in all cases (empty string); although this is a breaking change, we consider it a minor one, and the current behavior is buggy. |
This should now be fixed in the codebase. Given that it is a breaking change, should it be mentioned in https://github.com/dotnet/EntityFramework.Docs/blob/main/entity-framework/core/what-is-new/ef-core-9.0/breaking-changes.md before closing? |
We can do the documentation note later, I filed an issue to track this - dotnet/EntityFramework.Docs#4765 |
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
- Breaking change note for dotnet/efcore#33942 - Update function mappings Fixes #4765 Fixes #4805
What is the intended translation for
Nullable<T>.ToString()
?It is currently unclear (at least to me) what is the intended result (and/or translation) because:
ToString_boolean_property_nullable
, but it does so without ever populating the column withNULL
NULL
forNULL
s inbool?
columns in SQL Server and Sqlite"True"
string forNULL
in otherbool?
expressionsreported as Inconsistent results for
Nullable<bool>.ToString()
#33941""
for enumsNULL
) for several types in SQL Server and SqliteI realized that the situation was unclear while working on #33940
The text was updated successfully, but these errors were encountered: