Rules

The following rules apply to the AuditMappings class:

Audit mappings are made available to an application by adding a class named AuditMappings with a audit_mappings stereotype to the model. Individual entity classes can then enable audit mappings by setting theAudit Fields option.

If the meta-model contains an AuditMappings class then a Java implementation class for it must be provided in the impl package.

Note: If this implementation class is not present, the server application cannot be compiled. In this situation the developer should either:
  • delete the `AuditMappings` class from the model
  • explicitly disable audit mappings completely by specifying the generator switch-noauditmappings.

The following rules apply to the AuditMappings implementation class:

If the details struct contains any of the audit mapping fields, then these are updated in the struct automatically during the operation and are included in the update or insert.

For audit mapping fields, which are not present in the details struct, the corresponding field will still be updated on the database, i.e. it is not necessary to include the audit mapping fields in the details struct to get them updated on the database. Note however that such fields are not included in table level auditing.