Entity Types
An entity type defines a kind of object, for example Organization or Address. In this example you create the new entity type Team — a team within a department of an organization.
Create an Entity Type
-
In the sidebar, open Administration → Datamodel → Entity Types. The search page lists all entity types.
All entity types on the search page -
Click in the toolbar of the results table. The dialog Add new Entity opens.
-
Fill in the fields:
Field Example Notes Name teamRequired. Technical name — only letters, digits and _, no hyphen. Must be unique. It becomes the key of the type and appears in URLs (/search/team).Label Team Required. Display name, per language ( opens the translations). Plural Label Teams Used as the title of relationship tabs. Description A team within a department of an organization Shown as a tooltip. is abstract off Abstract types cannot have entities of their own; they only serve as parents for other types. embeddable only off The type can only be used embedded in other entities. Label Script Lua script that computes the display name of each entity — see Key and Label Scripts. Key Script Lua script that computes the key of each entity — see Key and Label Scripts. Icon Lucide:UsersRoundIcon of the type in menus, headers and the graph. Find names in Administration → UI → Icons.
The create dialog filled in for the entity type Team -
Click Submit. The button is only active when all required fields are filled; a name that does not match the pattern shows Must match pattern: [a-zA-Z0-9_]+.
The message Entity created successfully. confirms the new type. Click it to open the overview page of the type.
The message after creating the entity type
The dialog only contains the basic fields. Properties, relationships, parents, lifecycle and actions are added afterwards on the overview page of the type.
Edit an Entity Type
Open the entity type, for example by clicking its row on the search page Entity Types. The overview page of a type has the usual tabs plus one tab for each part of the model:
| Tab | Content |
|---|---|
| Data Sheet | The fields from the create dialog. |
| Properties | The properties of the type — see Properties. |
| Virtual Properties | Computed properties — see Virtual Properties. |
| Relationships | Relationships to other types — see Relationships. |
| Parents | Parent types this type inherits from. |
| Life-Cycles | The lifecycle of the type — see Lifecycle. |
| Actions | Buttons on the entities — see Actions. |
| Hooks | Logic that runs automatically on create, update or status change. |
| Lists | Ordered lists of sub-entities. |
| Components | Embedded components. |
| Traits | Additional settings such as the default sort — see Table Settings. |
The tabs for the model parts are sorted alphabetically.
The entity type Address with its Data Sheet
Data Sheet: Click a field, change the value and leave the field. Each field is saved when you leave it — there is no Save button and no message. Every save creates a commit of the entity type (see Model Changes and Existing Data). A required field cannot be emptied (Mandatory field was emptied, enter a value!).
The name is not checked while you type on the Data Sheet. An invalid name is rejected by the server when you leave the field.
The header offers the same buttons as for every entity: graph, Copy link, delete, Branch from here, Merge into … and — if a versioning scheme is assigned — Increase Version.
Inheritance
On the tab Parents, link an existing entity type as parent with Link existing (see Link Existing). The child type inherits all properties, relationships and lists of its parent. Inherited properties appear in the forms and search of the child type, but you edit them on the parent type.
Delete an Entity Type
Deleting works as for every entity: click in the header and confirm the dialog Delete entity? with Delete.
An entity type that is still in use — because entities of this type or child types exist — cannot be deleted: Cannot delete Entity. The Entity is still in use in the context of another Entity. There is no way to mark a type as deprecated.