If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.

Association Properties

Last modified: August 20, 2024

Introduction

There are two ways to edit the properties of an association. This page describes the properties you can edit in the properties pane of the association in the domain model, or from opening the association properties dialog directly from the association or the association tab in the entity properties.

You can also edit an association directly within the association tab in the entity properties. For more information see Association Tab Properties.

Association Properties

An example of the association properties is represented in the image below:

Association Properties

Associations have the following properties:

Name

The name used to refer to the association. For example, in forms or microflows.

Documentation

You can write notes and documentation in the Documentation property.

Multiplicity

Multiplicity can be of the following types:

Multiplicity Meaning Equivalent of
One-to-one One X object is associated with one Y object An association of type Reference with owner set to Both
One-to-many (default) One X object is associated with multiple Y object An association of type Reference with owner set to Default
Many-to-many Multiple X objects are associated with multiple Y objects An association of type Reference set – in this case ownership is set by the Navigability property

For more information about association types, see the Type section in Association Tab Properties, and for information on ownership, see the Owner section in Association Tab Properties.

Navigability Meaning Equivalent of
X objects refer to Y objects (default) The owner of the association is X An association of type Reference set with owner set to Default
X and Y objects refer to each other Both entities are owners An association of type Reference set with owner set to Both

This corresponds to the Owner property for Reference sets. See the Owner section of Association Tab Properties for a more detailed discussion of the impact of changing navigability.

Despite it’s name, navigability is usually only important when adding or changing associations. Making one object owner of an association does not prevent you reading the association from the non-owner end.

Delete Behavior

Value Description
Delete {name of entity} object but keep {name of other entity} object(s) (default) When an object is deleted, the associated object(s) are not deleted.
Delete {name of entity} object and {name of other entity} object(s) as well[1] When an object is deleted, the associated object(s) are also deleted.
Delete {name of entity} object only if it is not associated with {name of other entity}[2] object(s) An object can only be deleted if it is not associated with any other object(s).

[1] This delete behavior is used if you want to delete any associated Profile when a Customer is deleted:

[2]This delete behavior is used if you want to be able to delete a Customer only if it is not associated with any Order. In this case you will be asked to enter an Error message if ‘Customer’ object cannot be deleted to inform the end user that this customer cannot be deleted and perhaps suggest a next course of action:

Read More