-
Notifications
You must be signed in to change notification settings - Fork 27
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
Properties should be "required" by default, if not declared as option or nullable #79
Comments
Original implementation for handling |
Fun, looks like they have gone through a few iterations with this one already! :) |
@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 |
@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 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: