Tip data values used for a table s primary index must not change

The CRUD operations are fully handled by the supervisor and the entity main key value cannot be changed. Although this constraint is applicable in most cases, some exceptions exist such as 'due dates' in Sage X3.

This is considered a bad database design and must be avoided because it creates conflict when a synchronization service is used (for example, Business Intelligence, interface with an external product, or a payment system). When the main identifier is not invariant, identifying an update becomes quite impossible.

If finding a unique key is not obvious, then add a dedicated unique ID column in the database and use it as the main key. The getUuid function is dedicated to the generation of unique IDs and can be used for this purpose.

Note that the AUUID column that is present on every database line must not be used as the main key. This column is a dedicated technical column that has its own management. It is recommended to create another functional column if you need a unique key.