Entities
Within each model, you create entities. An entity represents a specific type of master data — think of it as a structured table or list. If the model is a filing cabinet, entities are the individual drawers.
What makes a good entity?
An entity should represent one clearly defined type of data. Keep each entity focused on a single concept. Some examples:
| Model | Entities |
|---|---|
| Customer Management | Customers, Contacts, Customer Segments |
| Product Management | Products, Product Categories, Brands |
| Supplier Management | Suppliers, Contracts, Certifications |
Entity hierarchy
Entities can be arranged in a parent–child hierarchy using domain attributes. A domain attribute creates a link from one entity to another, so records in the child entity reference records in the parent. For example:
- Business Unit → Zone → Country
- Product → Product Category
This hierarchy defines how data flows through the grid. When editing a Business Unit, you select which Zone it belongs to, and that Zone is linked to a Country.
Key characteristics
- Each entity has its own set of attributes (columns) that you define
- Entities have a built-in Code field that serves as the unique business identifier and a Name field
- Enable Auto-generate Code to let Primentra assign sequential numeric codes automatically when new records are created — users do not need to enter a code manually
- Permission settings can be configured per entity, giving fine-grained access control
- Entities can be marked as shared across models, making them available as domain references in other models — useful for common reference data like Countries or Currencies
Create an entity:
- Select a model from the sidebar or model list
- Click New entity
- Fill in: Name and optional Description
- Configure toggles: Active, Requires approval, Shared across models, Auto-generate Code
- Add attributes (see Attributes below)
- Click Save
The Table Name (used in the database and integration views) is auto-generated from the entity name. You can override it manually if needed.
Entity list columns:
| Column | Description |
|---|---|
| Entity | Entity name and optional description |
| Fields | Number of attributes (columns) on the entity |
| Records | Number of data rows stored in the database |
| Approval | Whether the entity requires approval workflows |
| Status | Active or Inactive |
All columns are sortable — click a column header to sort ascending, click again for descending, and a third click resets to default.
Reorder entities: Drag the drag handle on any entity row to change its position within the model. You can also use the up/down arrows. The order determines how entities appear in the sidebar and model detail view.
Active / Inactive: When an entity is set to Inactive, it is hidden from regular users and its data cannot be edited through the UI. The data remains in the database — setting an entity to inactive does not delete any data.
Required field behavior: Code and Name are always required. Custom attributes marked as Required enforce validation:
- Red border appears on empty required cells as soon as the row is modified
- Save is blocked until all required fields on modified rows have a value
- The save dialog lists exactly which rows and fields are missing
Note: When you add a new required attribute to an entity that already has data, untouched records are not validated — the requirement only takes effect the next time each record is modified.