Skip to main content
Version: Next

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​

  1. In the sidebar, open Administration → Datamodel → Entity Types. The search page lists all entity types.

    Search page Entity Types All entity types on the search page

  2. Click in the toolbar of the results table. The dialog Add new Entity opens.

  3. Fill in the fields:

    FieldExampleNotes
    NameteamRequired. Technical name — only letters, digits and _, no hyphen. Must be unique. It becomes the key of the type and appears in URLs (/search/team).
    LabelTeamRequired. Display name, per language ( opens the translations).
    Plural LabelTeamsUsed as the title of relationship tabs.
    DescriptionA team within a department of an organizationShown as a tooltip.
    is abstractoffAbstract types cannot have entities of their own; they only serve as parents for other types.
    embeddable onlyoffThe type can only be used embedded in other entities.
    Label ScriptLua script that computes the display name of each entity — see Key and Label Scripts.
    Key ScriptLua script that computes the key of each entity — see Key and Label Scripts.
    IconLucide:UsersRoundIcon of the type in menus, headers and the graph. Find names in Administration → UI → Icons.

    Dialog Add new Entity The create dialog filled in for the entity type Team

  4. 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.

Success message The message after creating the entity type

note

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:

TabContent
Data SheetThe fields from the create dialog.
PropertiesThe properties of the type — see Properties.
Virtual PropertiesComputed properties — see Virtual Properties.
RelationshipsRelationships to other types — see Relationships.
ParentsParent types this type inherits from.
Life-CyclesThe lifecycle of the type — see Lifecycle.
ActionsButtons on the entities — see Actions.
HooksLogic that runs automatically on create, update or status change.
ListsOrdered lists of sub-entities.
ComponentsEmbedded components.
TraitsAdditional settings such as the default sort — see Table Settings.

The tabs for the model parts are sorted alphabetically.

Data Sheet of the entity type Address 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!).

Changing the name

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.