You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Has Attachment and MimeType fields migration code without IsRequired - when no "Required" attribute is stamped, of course. Interestingly, all DateTime fields are flagged as IsRequired automatically.
I looked at the code, I can see that the decision to flag is made here, but I'm not entirely sure what the logic is exactly.
The text was updated successfully, but these errors were encountered:
simon-reynolds
changed the title
Question: shouldn't most properties be "required" by default, if not declared as option?
Properties should be "required" by default, if not declared as option or nullable
Apr 2, 2021
Original implementation for handling option types is broken
Attempting to work around it with usage of ValueConverterSelector but ValueConverters has issues at the moment around handling null values
Will keep an eye on dotnet/efcore#13850
@simon-reynolds any thoughts on the issue? Supporting option feels like rather fundamental. I see there have been no updates on the issue in the efcore project you linked - is it an absolute blocker?
Hi @zelenij
At the moment ValueConverters are not called for null values in the database so it is a blocker
I'm trying to see what other ways there may be to get around this
@zelenij, dotnet/efcore#13850 has been closed but the functionality that allows conversion of null values will be available from EFCore 6 onwards
I'm afraid full option support will only really be feasible from then.
I'll use this ticket to track development against the EF Core 6 preview builds for handling option values
Uh oh!
There was an error while loading. Please reload this page.
I was under impression that by default fields like string, byte[] etc would be automatically flagged as IsRequired. However, a simple type like this:
Has Attachment and MimeType fields migration code without IsRequired - when no "Required" attribute is stamped, of course. Interestingly, all DateTime fields are flagged as IsRequired automatically.
I looked at the code, I can see that the decision to flag is made here, but I'm not entirely sure what the logic is exactly.
EFCore.FSharp/src/EFCore.FSharp/Migrations/Design/FSharpSnapshotGenerator.fs
Line 203 in 4834d7a
The text was updated successfully, but these errors were encountered: