Dynamic Property Clusters

Dynamic properties are stored in separate storage units, called dynamic property clusters.

This section applies to runtime and design‑time dynamic properties.

A cluster is associated with the object, which stores the static properties. For better performance, dynamic properties that are typically accessed together can be assigned to specific clusters.

In the following example, a Customer class has a number of static properties; for example, a name property which is a string of length 50 characters. Logic has been provided to enable users of the application to add information for contacting a person. A dynamic property cluster called CustomerCluster01 has been added for this purpose and two dynamic properties called email and cell have been added to the cluster, as shown in the following diagram.

Another property cluster called CustomerCluster02 has been added, to which a dynamic property called comment has been added.

A dynamic property of type String, StringUtf8, or Binary with a length greater than 540 is stored as a non‑embedded slob, slobutf8, or blob, respectively. The maximum length of an embedded Binary type is 540 characters, an embedded StringUtf8 type is 540 characters, and an embedded String type is 539 characters.

The isDesignTimeDynamicProperty and isRunTimeDynamicProperty methods in the Property class can be used to distinguish between design‑time and runtime dynamic properties, as shown in the following example.

vars
    prop: Property;
begin
    foreach prop in Customer.allPropertiesUpTo(Object) do
        if prop.isDesignTimeDynamicProperty then
            write prop.name & " is a design-time dynamic property";
        elseif prop.isRunTimeDynamicProperty then
            write prop.name & " is a runtime dynamic property";
        else
            write prop.name & " is a static property";
        endif;
    endforeach;
end;