Associations

4 minutes to read Download PDF Edit

An association describes a relation between entities. In a domain model diagram an association is represented by a line or an arrow between two entities.

The value of the association can only be viewed or edited from objects of the entity that is the owner of the association. Either one entity or both entities can be the owner of the association. If one entity is the owner, there is an arrow that points from the owner to the other entity. If both entities are owner, there is a line between the two entities.

The cardinality (or number of referred objects) of an association is indicated by the number one (1) or a star (*) at either side of the association.

See below for more examples.

Behavior Properties

Delete behavior

Delete behavior defines what should happen to the associated object when an object is deleted. The following options can be configured for each end of the association.

Value Description
delete object but keep object(s) When an object is deleted, the associated object(s) are not deleted.
delete object and object(s) as well When an object is deleted, the associated object(s) are also deleted.
delete object only if it has no object(s) An object can only be deleted if it is not associated with any other object(s).

Default value: delete object but keep object(s)

Common Properties

Name

The name of the association is used to refer to it from forms, microflows, XPath constraints etc.

Type Properties

Type

Type defines whether an association is a reference (single) or a reference set (plural).

Value Description
Reference Single: an object of the owning entity refers to zero or one objects of the other entity.
Reference set Plural: an object of the owning entity refers to zero or more objects of the other entity.

Default value: Reference

Owner

This property defines whether an association has one or two owners. If there is one owner, the owner is located at the start of the arrow.

Value Description
Default Only one entity is owner, namely the one where the arrow starts.
Both Both entities are owner.

Default value: Default

Copyright © Mendix. All rights reserved. | Mendix.com | Terms of Use | Privacy Policy