ZuloOne
English
Sign in
Menu

Identity

Updated

The primary key of every row is MetaId (a Guid), generated by the application. It is different on every instance. ID (from the number sequence) is a separate human-readable key. On a dictionary the caption of that field is Code; on a document it is Number. The Number column on a document is a shadow of the same value, for document.Number in scripts. A field named Name whose caption is still the English word "Name" keeps that English caption; the UI localizes it.

Note

Internal keys are not portable. Transfer of data and customizations uses business keys and names, not MetaId.

Do not declare ID, Created by, or Modified by as your own fields. The server creates ID (and ParentId on a hierarchy) and fills CreatedByMetaId / ModifiedByMetaId from the current user.

References are stored as the target's bare MetaId (a Guid, with no type tag). The target's type is taken from the metadata — usually a Reference EDT.

There are no foreign keys in the database. Delete on the data service refuses a row another record still references (RecordReferenceGuard: a Reference EDT, table parts, link tables, register dimensions, ParentId, a dictionary-list OtherKey). The API returns 409 with the list of references. That guard is the only referential integrity there is. See Schema.

The number-sequence counter is committed separately from a test's ambient transaction. Rolling the case back would otherwise return NextValue onto IDs a data package has already handed out. If the sequence landed in an occupied range, an insert pulls the pointer up to MAX(ID)+1 once.

See also#

Where next#

Was this page helpful?