# Module and field names
Up to MAM 2.15 module and field names should not exceed 12 characters. This was not enforced by the CoreEngine.
In MAM versions after 2.15 28 characters are allowed in module and field names. Longer characters are not allowed by the CoreEngine and during configuration an error is logged in catalina.out. With MAM 3.0 some of the changed fields are omitted and deleted from the documentation.
There is one exception for the CoreEngine modules, where the option "create_table" is set to false. In such modules, the field names may still be larger.
Not more than 28 characters are allowed, because the index names in the MySQL database must not exceed 64 characters. The name is partly formed from module and field names.
Note!: The check by name length can be explicitly disabled by setting the option strict_name_length
to false in the global configuration config.xml
:
<global>
...
<strict_name_length>false</strict_name_length>
...
</global>
# Changes resulting from the longer names
# Customize existing fields via database update XML
- featureperm_and_preset_store.module
- submit_comet.module
# Customize existing fields per code in the CoreEngine
- Fields of type CEObjectLink
- Individual fields
- ce_role_accs.module
- fileaccess.rela_module
- fileacc_item.source_modul
There are exceptions for the fields
obj_chg_evt_listener.module
Existing fields remain at 32 characters, otherwise the index must be deleted and created again. New fields are created with 28 characters.
TypeAhead tables: MODULNAME_INDEXNAME_im
The tables for TypeAhead are renamed
- MODULNAME_idx_INDEXNAME_m to
MODULNAME_INDEXNAME_im
The index names for existing tables remain as they are.
The index names are adjusted for new tables.
Index name before **MODULENAME\_idx\_INDEXNAME\_m\_hash\_IF** Index name today **MODULENAME\_INDEXNAME\_im\_H** Index name before **MODULENAME\_idx\_INDEXNAME\_m\_object\_id\_IF** Index name today **MODULENAME\_INDEXNAME\_im\_ID**
The field field remains at 32 characters for existing tables, otherwise the index must be deleted and created again. In new tables, the field is created with 28 characters.
Previously, additional composite indices were created in this table. These were not used and are no longer created for new tables.
MODULENAME_idx_values -> MODULNAME_iv
- MODULNAME_idx_INDEXNAME_m to
MODULNAME_INDEXNAME_im
# Existing fields that are not adjusted
There are fields in which module names are stored, which are not adjusted. The fields are larger because they can contain compound module names (e.g. relations).
Fields
- MODULENAME_chg_evt.FIELD_NAME
- MODULENAME_audit.FIELD_NAME
# Naming Rules
When creating modules or fields, the following rules must be followed:
- not longer than 28 characters
- no special characters (exception: underscore
_
) - no spaces
- no upper case letters
Example: sample_metadata_field
# Forbidden Field Names
It's not allowed to create fields with the following names:
Field name | Reason | Solution for Existing Customer Fields |
---|---|---|
module | Some API functions do not support this name | Rename the field in its configuration and in the database. If reqiured, rename it in further configuration or JAVA files. |
# Rename Field in the Database
Example update script for renaming a column from module
to related_module
:
<upd version="yyyymmdd-0001" priority="low" pos="before_sync_db">
<description>Rename column 'module' in the table 'TABLE_NAME' to 'related_module'</description>
<rename-column table="TABLE_NAME">
<column name="module" newname="related_module"/>
</rename-column>
</upd>