Unit 2: Design Entities
In this course you will learn about the different types of entities within a domain namespace. You will also practice how to design entites with their properties using the Solution Designer.
Outlineโ
Entities are objects with properties that define various aspects of a project, allowing for flexible customization.
They can be categorized into three types:
- Entity, which are simple value objects without an ID and are used for commands and services but are not persisted
- Root entity, which serves as the main entry point, has a unique ID and can be persisted in a database
- External entity, which maps to an external system or domain, containing minimal identifiers to load the original entity without needing full definitions.
Entity inheritanceโ
The IBM DevOps Solution Workbench offers inheritance for (root) entities. This allows us to define common properties for the parent entity and to transfer them to the child entities, to which only their specific properties have to be added. Additionally entities can be made abstract to prevent them from instantiation. It is a common use case that parent root entities are abstract so only instances of its child root entities can be created.
Prerequisitesโ
You have successfully completed the Preparation section in the Course Introduction.
- Open your workspace in the Solution Designer.
- Find your imported project and open it by clicking on it.
- On the left sidebar, click on Domains and then select domain namespace
ord.