Boolean
This page was created by Lars.olofsson@mdriven.net on 2021-09-12. Last edited by Edgar on 2025-01-20.

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.

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments