Skip to main content

AssociationAttribute Class

Identifies the end of an association that establishes a one-to-many entity relationship.

Declaration

AssociationAttribute = class(
    TCustomAttribute
)

Remarks

Apply this attribute to both fields/properties at the ends of the association to establish a one-to-many relationship between their entity classes. If the association’s end is a collection that implements the IdxEMFCollection or IdxEMFCollection<T> interface, apply the AssociationAttribute only to the field rather than the property associated with it.

You can optionally pass an association name as a parameter to both the AssociationAttributes at the ends to identify them. This name must be unique among all the associations defined in your entity model. If no association name is provided, the ExpressEntityMapping Framework automatically resolves association ends by the types being linked – so you don’t have to provide association names in most cases. If a type is used in more than one association and cannot be singled out for an end, you should provide an association name for this end and its counterpart.

Combine the AssociationAttribute with the AggregatedAttribute to make an aggregate relationship. Refer to the Entity Relationships topic for examples of how to establish relationships using these attributes.

Inheritance

TObject
TCustomAttribute
AssociationAttribute
See Also