Data Entities
A Data Entity (DomainEntity) represents a physical table in your generated database and the primary blueprint for a business concept (e.g. User, Product, Order).
Inside the Domain Modeler, entities are the main building blocks where you define columns (properties) and relationships (associations).
Setting Up an Entity
Section titled “Setting Up an Entity”When you add a new entity to a Data Model, you configure the following primary properties:
- Name: The physical database table name. This must be a valid database identifier (typically lowercase alphanumeric characters and underscores, like
customer_profile). - Display Name (Optional): A human-friendly name (e.g.,
Customer Profile) that replaces the raw entity name in the UI for presentation purposes. - Description (Recommended): A clear summary of the entity’s purpose to document your schema.
Key and Primary Properties
Section titled “Key and Primary Properties”API Now! does not automatically provision an implicit primary key field. Instead, every entity must have at least one property designated as the primary key. This is configured on the property level by checking the Primary attribute checkbox on a property (e.g., a custom id field).
Entity Inheritance
Section titled “Entity Inheritance”API Now! supports Entity Inheritance, allowing one entity to extend the structure and properties of another parent entity.
graph TD
User[User Entity]
Employee[Employee Entity] -->|Inherits| User
Customer[Customer Entity] -->|Inherits| User
How it Works
Section titled “How it Works”- Property Inheritance: The child entity automatically inherits all properties defined on the parent entity. For example, if
Userhasemailandpassword,Employeewill automatically receive those properties without duplicating them. - Multiple Parents: An entity can inherit properties from multiple parent entities.
- Resolution (Last Property Wins): When properties clash, the last property wins. The collision check is evaluated by the property’s physical
name, not its presentationdisplay name. - Physical Schema (Flattened Tables): In the physical database, the platform does not create parent-child table structures or perform runtime joins. Instead, all tables are completely flattened at deploy time, meaning the child table physically contains all of its own properties along with all inherited parent properties.
Standard System Entities
Section titled “Standard System Entities”When creating a new Data Domain, it is common to designate certain entities with standard system meanings:
- The User Entity: Applying the
Usersemantic module to an entity designates it as the primary table for system logins and access control.- Refer to the User Entity Semantic Module for more details.