company logo

ddetrans - Transient property

This option defines a property as transient. Transient attributes are initialized with the default value. Usually they are filled by the application (e.g. during the read event). Transient references must be set using the SetTransientReference () function ( PropertyHandle ).

Transient properties may also define virtual, transient or temporary collections in connection with a reference definition.

How and when a transient property is filled, depends on the specific property definition. Usually, transient properties having a source are filled automatically when being accessed. Transient properties not having a source must be filled by the application (usually by implementing a TypeContext ::doBeforeRead() handler in the structure context class for the owning instance).

You may also define transient fields in transient instances (e.g. view instances). Even though a transient instance contains transient properties, only, properties marked as transient behave different from those, which are not marked. Transient properties in transient instances are not filled, when creating the transient instance (e.g. calculating a view instance) but are filled from the source when being accessed or by the application program (when no source has been defined. Sources for transient properties in view instances refer to the view instance and thus, contain post calculated values, while sources for view properties refer to the source instance and calculate values from the source passed to the view.

Transient collections defined for for instance always get lost, when the instance is unselected. Defining a non-transient collection in a transient instance will remember the transient collection and reload it when re-selecting the instance. Instances created for a non-transient collection in a transient instance are transient by default, when not being based on a persistent collection (super set).

Notes:

When copying a database, transient attributes having a data source are not resolved. When transient attributes are filled by read handlers, those will be resolved when context handlers are enabled, only (CONTEXT_ENABLED=YES)

Type: logical