Enums¶
Formal natively support enums as a property and inside collections (1).
- Via
Set
s.
This means you don't need to create custom types for each enum in your project, it just works.
Info
Formal uses the case
name as the value persisted in the storage. Even when you use backed enums.
In order to search aggregates having an enum case inside a collection you can use this specification:
This will return the aggregate if this case is present in the collection.