DataOption uniqueKey

Verifies the uniqueness of element instances during creation and modification.

The field name or list of field names provided as the option value determine the unique key of the data element. When specifying a list of field names, these should be separated by underscores.

The uniqueness is enforced at the logic level. A <dataElement>UniquenessValidation class is generated which exposes a checkUnique method. Internally, a finder using the combination of the provided fields is then used to retrieve already existing instances. If a finder artifact for the combination of fields does not exist in the model, it will be automatically generated and added to the model. The checkUnique() method is invoked by the create and modify methods of the <dataElement>Bean.