HOME COMMUNITY BLOG
Skip to end of metadata
Go to start of metadata

The Entity model is the most basic part of the model. It defines data entities which in turn define database tables for storing customer data. Entities contain not only fields but also predefined filters, row-level-security rules, row-color rules and more.

 

Entities are essential for defining internal data structures but also for guiding the ORIGAM Runtime in generating SQL queries automatically.

Usage

Model elements which reference entities:

Model ElementReference Attribute
Data StructureEntity
Entity RelationshipRelatedEntity
Entity FieldForeignEntity

Common Attributes

Every entity has the following common attributes.

CaptionA description of the entity. Can be used to describe an entity in error messages (e.g. when mandatory fields are not entered).
DescribingFieldUsed to select a field from an entity which can be used to directly describe a row to the user. This can is typically a field that is at the same time a primary key to the table, e.g. an Invoice number. This attribute can be used for error messages to tell the user something like "There is an error in the entity {entity caption} in the row 201420009".

Inheritance

inheritance is used when defining the data model. For example, IAsapEntity2 is a predefined entity that already contains a number of fields and filters, that when inherited, give you all the basic fields present in your entities. Whenever you see repeating columns, create an inheritable entity (by setting Inheritable attribute to True) and inherit from it, rather than  repeatedly defining the fields over and over again.

Types

  • Database Entity
  • Virtual Entity

Database Entity

This entity maps to a database. Database entities can be used in Data Structures referenced by Screen Menu Item menu items or the DataService LoadData method in sequential workflows where they retrieve data from the mapped database tables.

A database entity has these specific attributes:

IsAuditingEnabledWhen set to True an audit log will be automatically recorded for every change made through ORIGAM. Default is False.
DatabaseObjectType

Type of object in the database. Either a table or a view.

For views you need to provide your database script manually using a Deployment Script. Creating scripts for tables can be automated by using the Deployment Script Generator.

DatabaseObjectNameThe name of the database table or view. Typically you will use the same Name and DatabaseObjectName to keep things simple but you can take advantage of different names e.g. if you want to connect to already existing database tables.
GenerateDeploymentScriptWhen set to False the entity will be skipped by the Deployment Script Generator. This can be useful e.g. if the table already exists and is not under your control. Default is True.

Virtual Entity

This entity does not map to a database. The main feature of a virtual entity is that it will not require a database script to be generated but at the same time it will clearly define the internal data structures. It can be useful in the following cases:

  • Ancestor–You want to create an entity ancestor for inheritance. In this case you would use a virtual entity because the ancestor entity will not physically exist in the database. E.g. IAsapEntity2.
  • Wizard Screen–You want to create a screen in the wizard (sequential workflow connected to a menu) and you need to create a screen whose structure is not defined by any database entities. In that case you will create a virtual entity and base the screen on this entity. You will not be able to save these data to a database directly by calling a DataService.

MODEL STRUCTURE

Entities
  /Database Entity / Virtual Entity
  Conditional Formatting Rule
  Aggregated Field
   Conditional Formatting Rule
   Dependency
   Dynamic Field Label
   Row Level Security Rule
  Database Field
   Conditional Formatting Rule
   Dependency
   Dynamic Field Label
   Row Level Security Rule
  Function Call
   Conditional Formatting Rule
   Dependency
   Dynamic Field Label
   Parameter
    Data Constant Reference
    Field Reference
    Filter Reference
    Function Call
    Lookup Reference
     Data Constant Reference
     Field Reference
     Function Call
     Parameter Reference
    Parameter Reference
   Row Level Security Rule
  Lookup Field
   Conditional Formatting Rule
   Dependency
   Dynamic Field Label
   Row Level Security Rule
  Virtual Field
   Conditional Formatting Rule
   Dependency
   Dynamic Field Label
   Row Level Security Rule
  Filter
   Function Call
    Parameter
     Data Constant Reference
     Field Reference
     Filter Reference
     Function Call
     Lookup Reference
      Data Constant Reference
      Field Reference
      Function Call
      Parameter Reference
     Parameter Reference
  Index
   Index Field
  Parameter
  Relationship
   Filter Reference
   Key
  Row Level Security Filter
  Row Level Security Rule
  Menu Action
   Parameter Mapping
  Report Action
   Parameter Mapping
  Sequential Workflow Action
   Client Script Invocation
   Parameter Mapping
  Dropdown Action
   Menu Action
    Parameter Mapping
   Report Action
    Parameter Mapping
   Sequential Workflow Action
    Client Script Invocation
    Parameter Mapping

 

 

  • No labels