Data modelling

Field types

The entity fields should be in one of the following categories:

  • id (usually indexable)
  • primitives (int, string, decimal)
  • list of primitives
  • other entity owned only by the parent (example: unit of measure)
  • list of other owned entities (example: contact information)
  • other common entity owned by many parents (example: person type)
  • list of other common entities (example: person departments)

All entities are implementations of the base entity class.

References by id between entities should be named using the reference’s type and appending the “Id”. Example: crmBusinessPartnerId, refers to an entity whose type is CrmBusinessPartner.