Boolean

A boolean in OCL can be both Non-nullable and Nullable.

NonNullableBoolean : Boolean
NullableBoolean : Boolean?

As an attribute on a class that is saved to database, almost always use non-nullable. Why? Because otherwise it will default to null and it's easy to by mistake not handle False and Null correctly.

This page was edited 84 days ago on 02/10/2024. What links here