Skip to content

Commit 63f126a

Browse files
committed
🤖 Update LLMs files [skip ci]
1 parent bb6aa5f commit 63f126a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎docusaurus/static/llms-full.txt‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4176,14 +4176,18 @@ Defining relations between content-types (that are designated as entities in the
41764176

41774177
Relations between content-types can be managed through the [admin panel](/cms/features/content-manager#relational-fields) or through [REST API](/cms/api/rest) or [Document Service API](/cms/api/document-service) requests.
41784178

4179-
Relations can be connected, disconnected or set through the Content API by passing parameters in the body of the request:
4179+
Relations can be connected, disconnected or set through the Content API by passing parameters in the body of the request. These payloads work for both single-entry relations and multi relations (one-to-many, many-to-one, many-to-many, and many-way). When a relational field allows multiple links, the API expects arrays of relation IDs and returns arrays in responses.
41804180

41814181
| Parameter name | Description | Type of update |
41824182
|-------------------------|-------------|----------------|
41834183
| [`connect`](#connect) | Connects new entities.<br /><br />Can be used in combination with `disconnect`.<br /><br />Can be used with [positional arguments](#relations-reordering) to define an order for relations. | Partial |
41844184
| [`disconnect`](#disconnect) | Disconnects entities.<br /><br />Can be used in combination with `connect`. | Partial |
41854185
| [`set`](#set) | Set entities to a specific set. Using `set` will overwrite all existing connections to other entities.<br /><br />Cannot be used in combination with `connect` or `disconnect`. | Full |
41864186

4187+
:::note
4188+
Multi relations can be managed from the REST API and the [GraphQL API](/cms/api/graphql#fetch-relations): the `connect`, `disconnect`, and `set` operations are available across both APIs. However, the [Document Service API](/cms/api/document-service) does not handle relations.
4189+
:::
4190+
41874191
:::note
41884192
When [Internationalization (i18n)](/cms/features/internationalization) is enabled on the content-type, you can also pass a locale to set relations for a specific locale, as in this Document Service API example:
41894193

@@ -7939,6 +7943,10 @@ There are 6 different types of relations:
79397943
- <img width="25" src="/img/assets/icons/v5/ctb_relation_manytomany.svg" /> Many-to-many: Content-type A *has and belongs to many* Content-type B
79407944
- <img width="25" src="/img/assets/icons/v5/ctb_relation_manyway.svg" /> Many way: Content-type A *has many* Content-type B
79417945

7946+
:::info Multi relations and single relations
7947+
Relations where at least one side can reference several entries are called multi relations. In the Content-type Builder, this includes one-to-many, many-to-one, many-to-many, and many-way relations. These relations appear as multi-select fields in the Content Manager and return arrays from the REST, GraphQL, and Document Service APIs; while single relations (one-way and one-to-one relations) return a single linked entry (see [Managing relations with API requests](/cms/api/rest/relations) for more information).
7948+
:::
7949+
79427950
</Tabs>
79437951

79447952
#### <img width="28" src="/img/assets/icons/v5/ctb_boolean.svg" /> Boolean {#boolean}

0 commit comments

Comments
 (0)