Skip to main content

AggregatedAttribute Class

Indicates if an entity class‘s collection field/property referencing an association‘s “many” end aggregates its referenced entity objects.

Declaration

AggregatedAttribute = class(
    TCustomAttribute
)

Remarks

Mark an entity class’s collection field/property with the AggregatedAttribute to set the cascade option for this class. With the option, the entity class’s instance aggregates all entity objects that refer to it. The aggregated objects cannot exist without the referenced entity object, thus updating/deleting this object also updates/deletes the aggregated objects. If the cascade option is not set, update/delete operations with the referenced object do the following:

  • An update operation doesn’t affect the referenced objects;

  • A delete operation removes the object and assigns NULL to the corresponding field/property in the referenced objects.

The AggregatedAttribute applies only to fields/properties marked with the AssociationAttribute. Refer to the Entity Relationships topic for examples of how to enable the cascade option in various entity relationships.

Inheritance

TObject
TCustomAttribute
AggregatedAttribute
See Also