No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<message>Write the content here to display this box</message> | <message>Write the content here to display this box</message> | ||
'''Allow null''' sets an attribute's nullability, i.e. if this attribute should be able to hold "no value". It affects both the in-memory value (it will show up with a question mark at the end of the type, like Boolean?). | '''Allow null''' sets an attribute's nullability, i.e. if this attribute should be able to hold "no value". It affects both the in-memory value (it will show up with a question mark at the end of the type, like Boolean?). | ||
In c# and ocl its a bit tricky to know to check for both null and <nowiki>''</nowiki> (empty string) for strings - hence the ->isnullorempty operator on string is good to use. | |||
Nullability is at its best for numbers - helping user to distinguish if someone wrote 0 or no-one has written anything yet... | |||
Read more about [[Initial values and Default Database values|'''Initial values''' and '''Default Database values''']] for a fuller explanation of the properties [[InitialValue]], [[DefaultDBValue]] and [[Allow Null]] | Read more about [[Initial values and Default Database values|'''Initial values''' and '''Default Database values''']] for a fuller explanation of the properties [[InitialValue]], [[DefaultDBValue]] and [[Allow Null]] | ||
{{Edited|July|12|2024}} | {{Edited|July|12|2024}} |
Revision as of 14:34, 20 December 2024
Allow null sets an attribute's nullability, i.e. if this attribute should be able to hold "no value". It affects both the in-memory value (it will show up with a question mark at the end of the type, like Boolean?).
In c# and ocl its a bit tricky to know to check for both null and '' (empty string) for strings - hence the ->isnullorempty operator on string is good to use.
Nullability is at its best for numbers - helping user to distinguish if someone wrote 0 or no-one has written anything yet...
Read more about Initial values and Default Database values for a fuller explanation of the properties InitialValue, DefaultDBValue and Allow Null