Skip to content
Stefan Maroń edited this page Nov 16, 2021 · 3 revisions

LC0013 - NotBlank on single field PKs

If a table has a primary key which consists of one field of type code or text, this field should be set to NotBlank = true.

There are exceptions for this, on setup tables, for example. In those cases you can either use a pragma to suppress the warning or you can set NotBlank = false. Then the warning will not show up for this field.

Background

If you create a record with primary key empty and you delete or rename this record, the system will search for relations to that record.
Every field with a relation to this table and without a value, now refers to this record.
The result would be a wrong update or even delete of related records.

Read more: