--- title: "Mapped join" slug: "core-mapped-join" updated: 2026-05-19T12:49:30Z published: 2026-05-19T12:49:30Z canonical: "docs.lobstersoftware.com/core-mapped-join" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # Mapped join ![images/download/attachments/167859654/image-2024-1-24_15-32-34-version-1-modificationdate-1706106754258-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-32-34-version-1-modificationdate-1706106754258-api-v2.png) A [Mapped Join](/v1/docs/en/core-mapped-join) enables access to data for a data field of an entity within the search, which can be found in a separate table on the database side. In contrast to the [Entity join](/v1/docs/en/core-entity-join), the [Mapped Join](/v1/docs/en/core-mapped-join) supports [Restrictions](/v1/docs/en/core-i-search-restriction) for the *implicit* join for the (1:1) or (1:n) relation behind the data field path selected as the **Join property** when mapping field values. The assignment can be additionally restricted using both the generic **On** condition and the generic **Treat** parameter. Both parameters allow the optional definition of [Restrictions](/v1/docs/en/core-i-search-restriction), which are combined in an AND junction with the *implicit* **On** condition. These restriction options are a typical reason for using a [Mapped Join](/v1/docs/en/core-mapped-join). *Unrestricted* access to property values would also be possible directly via a [Property projection](/v1/docs/en/core-property-projection) using the path selected as the **Join property**. ## Configuration | Parameter | Data type | Description | | --- | --- | --- | | ***Specific parameters*** | | **Join Property** | *Data field path* | The [Combobox](/v1/docs/en/fre-combo-box-vo) **Join property** supports the selection of a valid data field path in the context of the search either via *dropdown* or direct entry, which must be completed by clicking on the + symbol or pressing the "Enter" key. ![images/download/attachments/167859654/image-2024-1-24_15-33-37-version-1-modificationdate-1706106817777-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-33-37-version-1-modificationdate-1706106817777-api-v2.png) | | **Treat** | *Search treat* | The **Treat** parameter provides an optional configuration for "Search treat" (`Treat`): ![images/download/attachments/167859654/image-2024-1-24_15-34-23-version-1-modificationdate-1706106863239-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-34-23-version-1-modificationdate-1706106863239-api-v2.png) → ![images/download/attachments/167859654/image-2024-1-24_15-34-58-version-1-modificationdate-1706106898182-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-34-58-version-1-modificationdate-1706106898182-api-v2.png) The associated user interface (right) with the **As** and **On** condition parameters only appears after the "Search treat" has been added in the context menu of the value configuration (left). | | **└ As** | *Entity type* | In the [Combobox](/v1/docs/en/fre-combo-box-vo) for **As**, an *entity type* can be selected that overrides the *entity type* derived from the definition for the **Join property** for the **Join alias** for the context of the definition of the **On** condition parameter. | | **└ On** condition | *Restriction* | ![images/download/attachments/167859654/image-2024-1-24_15-36-27-version-1-modificationdate-1706106987833-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-36-27-version-1-modificationdate-1706106987833-api-v2.png) | For the definition of the **On** condition, the *entity type* selected under **As** applies to the **Join alias**. In the example on the left, the overarching "Entity" (`Entity`) type was selected for **As**. A [Simple property restriction](/v1/docs/en/core-simple-property-search) was then selected under **On** condition. The [Combobox](/v1/docs/en/fre-combo-box-vo) element for the **Projection** then only shows paths for fields for the **Join alias** a that are supported by the selected "Entity" (parent) class. | | ***Generic parameters*** | | ***Join alias, Join type, Optional, On condition*** ***see*** [Entity join](/v1/docs/en/core-entity-join) | ## Examples ### Typical use case: (1:n) relation The *entity type* "E-mail" (`Mail`, see [E-mails](/v1/docs/en/administration-system-mail)) uses a list field `involved` to list different "e-mail participants" ("From", "To", "CC", "BCC"). A [Tuple search](/v1/docs/en/core-tuple-search) for [E-mails](/v1/docs/en/administration-system-mail) should only output the *visible* recipient addresses (type "To" or "CC") in a "recipient" column. Configuration: | The screenshot on the right shows the configuration for a [Mapped Join](/v1/docs/en/core-mapped-join), which enables the selective listing of "e-mail participants": - The list field `involved `is selected as the **Join property**. - The **Treat** parameter is not used. - The name `recipient` is arbitrarily defined as the **Join alias**. - The default "Left" is used for the **Join type** so that e-mails without addressees are also listed if necessary. - For the **Optional** option, the default selection is retained because the `recipient` values are to be summarized in a [Collection projection](/v1/docs/en/core-collection-projection) (see below) so that only one output line per e-mail is required. - The **On** condition here is a [Search junction](/v1/docs/en/core-search-junction) that gives an OR junction to two instances of the [Field restriction](/v1/docs/en/core-property-search), each of which checks the match with one of the desired "e-mail participant types" ("To", "CC"). **NOTE:** Instead of the OR junction, a single f[Field restriction](/v1/docs/en/core-property-search) with the "In" compare type could also be used here if a static list of types is provided as a compare value (e.g. via a [Create list](/v1/docs/en/core-create-list-resolver) resolver). | ![images/download/attachments/167859654/image-2024-1-24_15-30-57-version-1-modificationdate-1706106657288-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-30-57-version-1-modificationdate-1706106657288-api-v2.png) | | --- | --- | | The [Mapped Join](/v1/docs/en/core-mapped-join) with the alias `recipient` provides the individual values for recipients, which can be prepared as list values for the output column `recipients` as shown on the right using [Collection projection](/v1/docs/en/core-collection-projection): - As the **Property of collection**, the path to the `involved` property of the `recipient` value is selected. **NOTE:** `involved.involved` would list *all* participants (including "BCC" and "Von") past the [Mapped Join](/v1/docs/en/core-mapped-join) at this point. | ![images/download/attachments/167859654/image-2024-1-24_15-31-49-version-1-modificationdate-1706106709257-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-31-49-version-1-modificationdate-1706106709257-api-v2.png) | **NOTE:** If an additional output column is only to specify the sender ( e-mail participant type "From"/`SEND_FROM`), an additional [Mapped Join](/v1/docs/en/core-mapped-join) with an independent **Join alias** (e.g. `sender`) for the same **Join property** (`involved`) must be set up for this purpose. As each e-mail should only have precisely *one* sender, this can be defined directly as an output column via a [Property projection](/v1/docs/en/core-property-projection) (`sender.involved`). ### Special use case: (1:1) Relation with constraint The accounts for [Users](/v1/docs/en/base-user) refer to an entity of the type "address" via the "address" (`address`) property, so that the *address properties* from the database table for [Addresses](/v1/docs/en/base-address) (`base_address`) must be included if these are addressed in [Projections](/v1/docs/en/core-i-search-projection) in the context of a search for [Users](/v1/docs/en/base-user). The selection of a data field path such as `address.name1` *implies* the join from the user table to the address table. In the following example, a [Mapped Join](/v1/docs/en/core-mapped-join) with a secondary condition is used instead of the *implicit* join so that address data is not always "added" but only when a secondary condition is fulfilled. A [CSV search](/v1/docs/en/core-csv-search) for [Users](/v1/docs/en/base-user) should always output the address field "Name" (`name1.address`) in addition to the "username" (`username`), but only output further address data (*here*: "City"/`city` and "Country"/`countryCode`) if the "Account number" (`address.accNumber`) address property begins with the number 1. Configuration: | The [Mapped Join](/v1/docs/en/core-mapped-join) shown on the right serves as the basis for *conditional* access to a user’s address: - The `address` property is selected as the **Join property**. - A **Treat** is not required. - The name `addr` was arbitrarily assigned as the **Join alias**. - The **Join type** "Left" ensures that the [CSV search](/v1/docs/en/core-csv-search) can also list users for whom the address is not fulfilled due to the **On** condition or for whom no address is specified. - The default (selected) is retained for the **Optional** option. - In the **On** condition, a [Field restriction](/v1/docs/en/core-property-search) compares the "account number" (`accNumber`) address property with the static text `1%` using the `like` compare type. This condition is fulfilled if the account number begins with the character `1` or only contains this character. **NOTE:** As there is a (1:1) relation, it would also be possible to select or enter `address.accNumber` as the property path in the *check value*. However, the reference to the **Join alias** is more precise in purely formal terms. | ![images/download/attachments/167859654/image-2024-1-24_15-28-11-version-1-modificationdate-1706106491336-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-28-11-version-1-modificationdate-1706106491336-api-v2.png) | | --- | --- | | The screenshot on the right shows the [Projections](/v1/docs/en/core-i-search-projection) for the output columns of the [CSV search](/v1/docs/en/core-csv-search): - The first [Property projection](/v1/docs/en/core-property-projection) reads the "username" (`username`) property directly in the user account. - The second [Property projection](/v1/docs/en/core-property-projection) accesses the "Name" (`address.name1`) address property directly. This column is therefore always filled. - The third and fourth columns each address the "city" and "country" (`countryCode`) fields in the address via a [Property projection](/v1/docs/en/core-property-projection) using the **Join alias** addr, which provides data exactly when the **On** condition is met. | ![images/download/attachments/167859654/image-2024-1-24_15-26-53-version-1-modificationdate-1706106413140-api-v2.png](https://cdn.document360.io/4be90b94-ec83-41d8-963e-962df16110d4/Images/Documentation/image-2024-1-24_15-26-53-version-1-modificationdate-1706106413140-api-v2.png) |