Is there a way to make a nullable field non-optional when creating an entity? #6744
Replies: 3 comments 11 replies
-
|
Why would you care about this? If the value can be null, you are not required to provide the value, why should we have a compile error for things that are fine on runtime? edit: if this is about object embeddables (where I can understand you might want to enforce explicit |
Beta Was this translation helpful? Give feedback.
-
We just have a lot of fields that are nullable and it's easy to forget that they exist when creating entities (e.g. |
Beta Was this translation helpful? Give feedback.
-
|
Maybe you could use a custom type, with some special runtime value for null (e.g. a symbol property), which would be converted back to edit: actually, not necessarily, the runtime value would be under your control and never |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
If I have a property like:
Is there to way to make it required when creating a row? Basically I don't want to forget to supply the field, even if it's null:
Beta Was this translation helpful? Give feedback.
All reactions