Entities in Negroni
An entity is the fundamental unit of a CDM data model. It represents a specific business concept, process, event, or object — for example, a Customer, an Order, or a Product. Entities are defined within manifests and are composed of attributes and relationships.
Entity Structure
Each entity consists of:
- Attributes — typed fields that describe the properties of the entity (name, date, amount, etc.)
- Relationships — references to other entities that define how they connect (one-to-many, many-to-many, etc.)
- Primary key — an auto-managed identifier attribute. Negroni enforces that
each entity has a primary key of type
integerorstring.
Entities are metadata-driven: their definitions are stored in the manifest file and can be versioned and tracked over time.
Entity Types
Negroni supports several entity categories:
| Type | Description |
|---|---|
| Core entities | Pre-built entities from Microsoft's CDM library. Ready to use with standard attributes. |
| Custom entities | Entities you define from scratch within a manifest. |
| Extended entities | Entities that inherit attributes from a core entity and add custom attributes on top. |
| Template entities | Entities used as reusable templates that other entities can be based on. |
| Exclusive entities | Entities that belong exclusively to a specific manifest. |
| Associated entities | Entities linked to another entity through a relationship attribute. |
Managing Entities
Creating a Custom Entity
- Open the manifest where the entity will be created.
- Click the New Entity icon on the toolbar.
- Select the Create Custom Entity tab or choose an existing entity as a starting point.
- Enter the entity name.
- Click Next, select the target manifest, and click Finish.
For a step-by-step walkthrough, see Creating an Entity.
Adding a Core Entity
Core entities are sourced from the Microsoft CDM library and Negroni's standard model set.
To add one:
- Right-click on the target manifest in the Navigator.
- Select Add Entity.
- In the Choose Existing Entity tab, enable Show Core Entities.
- Filter by Path or Folder to find the entity you need.
- Select it and click Finish.
Extending an Entity
You can extend a core entity to inherit its attributes and add your own on top:
- Open the entity you want to extend.
- Click the Extend Entity button.
- Select a core entity to extend from.
- Click Apply.
- The Extended Attributes tab appears showing inherited attributes.
Extended attributes are read-only to preserve data consistency. You can still add custom attributes alongside them.
Associated Entities
Associated entities are linked to a parent entity through a relationship attribute.
To create one:
- Open the parent entity in the Project Navigator.
- Navigate to the Relationships tab.
- Click the Add Relationship button.
- Enter the Foreign Key Type Name Attribute.
- Select the Associated Entity.
- Select the Target Entity Attribute.
- Select the Data Type.
- Click Finish.
Associated entities can be edited by selecting the relationship row and modifying its properties in the right-side Properties sidebar.