SDB_Attribute - Attribute definition
Attribute definitions are used to define the attributes for a complex data type (structure). Attributes can be defined as transient or persistent attributes. Attributes are persistent by default when being defined in a persistent instance and they are transient, when being defined in a transient instance.
Within a persistent instance, transient attributes can be defined by setting the transient option. Transient attributes must be filled by the application as long as no source has been defined for the attribute. When a source is being defined, the attribute is filled, when accessing it (e.g. GetString()). This means, that the attribute value is not automatically calculated, when reading the instance.
Attributes of complex data type must not containrelationships to structured instances. Attributes may contain MEMO fields.
Defining attributes will create a warning when containing references or relationships, but no error. When using references in attributes, following restrictions must be taken into account:
- References in array attributes are not initialized properly
- References in copy nodes are not initialized properly
Attributes are transient by default when being defined in a transient instance. Within a persistent instance, transient attributes can be defined by setting the transient option.
Transient attributes might be filled by the application. This is typically done in the instance read handler for the structure containing the transient attribute.
A more simple way is defining a source expression for the transient attribute. When a source is being defined, the attribute is filled, when accessing it (e.g. Property::string()). This means, that the attribute value is not automatically calculated, when reading the instance, but only, when explicitly required.
- ik_Ident - Primary key