Skip to content

Commit cc8ff43

Browse files
committed
Mention relations management in Entity Service and Query Engine APIs
1 parent 780b6d7 commit cc8ff43

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

docs/developer-docs/latest/developer-resources/database-apis-reference/entity-service/crud.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ Syntax: `create(uid: string, parameters: Params)` ⇒ `Entry`
8585
| `populate` | Relations, components and dynamic zones to [populate](/developer-docs/latest/developer-resources/database-apis-reference/entity-service/populate.md) | [`PopulateParameter`<Fa-Link color="grey"/>](/developer-docs/latest/developer-resources/database-apis-reference/entity-service/populate.md) |
8686
| `data` | Input data | `Object` |
8787

88+
!!!include(developer-docs/latest/developer-resources/database-apis-reference/snippets/managing-relations.md)!!!
89+
8890
### Example
8991

9092
```js
@@ -105,6 +107,8 @@ Updates one entry and returns it.
105107

106108
Syntax: `update(uid: string, id: ID, parameters: Params)``Entry`
107109

110+
!!!include(developer-docs/latest/developer-resources/database-apis-reference/snippets/managing-relations.md)!!!
111+
108112
### Parameters
109113

110114
| Parameter | Description | Type |

docs/developer-docs/latest/developer-resources/database-apis-reference/query-engine/single-operations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ const entry = await strapi.db.query('api::blog.article').create({
113113
});
114114
```
115115

116+
!!!include(developer-docs/latest/developer-resources/database-apis-reference/snippets/managing-relations.md)!!!
117+
116118
## update()
117119

118120
Updates one entry and returns it.
@@ -139,6 +141,8 @@ const entry = await strapi.db.query('api::blog.article').update({
139141
});
140142
```
141143

144+
!!!include(developer-docs/latest/developer-resources/database-apis-reference/snippets/managing-relations.md)!!!
145+
142146
## delete()
143147

144148
Deletes one entry and returns it.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:::tip
2+
In the `data` object, relations can be managed with the `connect`, `disconnect`, and `set` parameters using the syntax described for the REST API (see [managing relations](/developer-docs/latest/developer-resources/database-apis-reference/rest/relations.md)).
3+
:::

0 commit comments

Comments
 (0)