Skip to main content

Business keys

Each data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept. should be identified by a unique fieldFieldA property of a DataElement expanded to a database column and user interface input element. or set of fieldsFieldA property of a DataElement expanded to a database column and user interface input element.. A business key contains an identifier that is known to the user of the systemSystemA set of interconnected components that work together to achieve a specific purpose or function. or element. Compared to an id or GUID which is used within the programming context.

A Name fieldFieldA property of a DataElement expanded to a database column and user interface input element. is expected to be present for each element and will serve as a business key.

Alternatively a functional key can be defined to use other fieldsFieldA property of a DataElement expanded to a database column and user interface input element.. (e.g. in the case of Bookings, a bookingNumber might be a fieldFieldA property of a DataElement expanded to a database column and user interface input element. that can be marked as functional key)

Name​

If a data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept. has a fieldFieldA property of a DataElement expanded to a database column and user interface input element. name, it should be a String. The name fieldFieldA property of a DataElement expanded to a database column and user interface input element. is part of the DataRef for the data element, meaning it can be used to identify an instance of that data elementData Element (DataElement). A fundamental data concept or entity within an application's domain, acting as an anthropomorphic translation of a real-life object or concept..

The name will also be used as a default representation in dropdowns.

If no name fieldFieldA property of a DataElement expanded to a database column and user interface input element. is defined, an implicit name fieldFieldA property of a DataElement expanded to a database column and user interface input element. will still be expanded, but the value of the name itself will be auto-generated. It is possible to prevent this behavior with the option nameNotWanted, but be aware that this has far-reaching effects, as the option itself is a combinatorial effect.

Option
nameNotWanted DataElement

Will prevent the expandersExpanderA unit of generation that combines a data tree instance (functional M1 model) with a template to generate an artifact. from generating a name fieldFieldA property of a DataElement expanded to a database column and user interface input element.

<options>
<nameNotWanted/>
</options>

Functional key​

Option
functionalKey DataElement

Defines 1 or more fieldsFieldA property of a DataElement expanded to a database column and user interface input element. as a functional key. These fieldsFieldA property of a DataElement expanded to a database column and user interface input element. will be added to the dataRef of the dataElement. Add the names of the fieldsFieldA property of a DataElement expanded to a database column and user interface input element. as value, separated by _ (e.g. name_version).

This option generates a DataRef class which contains said FieldsFieldA property of a DataElement expanded to a database column and user interface input element. in addition to the name and id, so they can be used to look up instances.

caution

Though it is currently possible to use multiple link fieldsFieldA property of a DataElement expanded to a database column and user interface input element. in the key, this is not advised. It can lead to unexpected behavior as some DataRef constructors are a composite of fieldsFieldA property of a DataElement expanded to a database column and user interface input element. from all included linked elements, which can cause name collisions.

This new DataRef class will then be used when fetching data from the database. Adding this option forces all functional fieldsFieldA property of a DataElement expanded to a database column and user interface input element. to be contained in each projectionProjectionA tailored subset of fields on a DataElement designed to encapsulate data for a specific technical or functional view..

It is also possible to create a new DataRef with only the functional fieldsFieldA property of a DataElement expanded to a database column and user interface input element. with the method withFunctionalKey(...). This DataRef can then be used in the getProjection, create, modify etc. without the need of an id. Although it is not yet supported by the find method.

The DataRef can be converted from and to a String with the {DataElement}DataRefConverter, using :: as separator.

<options>
<functionalKey>name_version</functionalKey>
</options>