Skip to content

Commit 0d60b51

Browse files
committed
Small docs tweaks
1 parent b59ad40 commit 0d60b51

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎doc/api/types/README.md‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ This page contains the documentation of all other types and classes than [Model]
3030

3131
## `type` RelationThrough
3232

33-
| Property | Type | Description |
34-
| ------------ | -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
35-
| from | string<br>[ReferenceBuilder](/api/objection/#ref)<br>Array | The column that is joined to `from` property of the `RelationJoin`. For example `Person_movies.actorId` where `Person_movies` is the join table. Composite key can be specified using an array of columns e.g. `['persons_movies.a', 'persons_movies.b']`. You can join nested json fields using the [ref](/api/objection/#ref) helper. |
36-
| to | string<br>[ReferenceBuilder](/api/objection/#ref)<br>Array | The column that is joined to `to` property of the `RelationJoin`. For example `Person_movies.movieId` where `Person_movies` is the join table. Composite key can be specified using an array of columns e.g. `['persons_movies.a', 'persons_movies.b']`. You can join nested json fields using the [ref](/api/objection/#ref) helper. |
37-
| modelClass | string<br>ModelClass | If you have a model class for the join table, you should specify it here. This is optional so you don't need to create a model class if you don't want to. |
38-
| extra | string<br>string[]<br>Object | Join table columns listed here are automatically joined to the related objects when they are fetched and automatically written to the join table instead of the related table on insert and update. The values can be aliased by providing an object `{propertyName: 'columnName', otherPropertyName: 'otherColumnName'} instead of array` See [this recipe](/recipes/extra-properties.html) for more info. |
33+
| Property | Type | Description |
34+
| ------------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
35+
| from | string<br>[ReferenceBuilder](/api/objection/#ref)<br>Array | The column that is joined to `from` property of the `RelationJoin`. For example `Person_movies.actorId` where `Person_movies` is the join table. Composite key can be specified using an array of columns e.g. `['persons_movies.a', 'persons_movies.b']`. You can join nested json fields using the [ref](/api/objection/#ref) helper. |
36+
| to | string<br>[ReferenceBuilder](/api/objection/#ref)<br>Array | The column that is joined to `to` property of the `RelationJoin`. For example `Person_movies.movieId` where `Person_movies` is the join table. Composite key can be specified using an array of columns e.g. `['persons_movies.a', 'persons_movies.b']`. You can join nested json fields using the [ref](/api/objection/#ref) helper. |
37+
| modelClass | string<br>ModelClass | If you have a model class for the join table, you should specify it here. This is optional so you don't need to create a model class if you don't want to. |
38+
| extra | string<br>string[]<br>Object | Join table columns listed here are automatically joined to the related objects when they are fetched and automatically written to the join table instead of the related table on insert and update. The values can be aliased by providing an object `{propertyName: 'columnName', otherPropertyName: 'otherColumnName'} instead of array` See [this recipe](/recipes/extra-properties.html) for more info. |
3939
| modify | function([QueryBuilder](/api/query-builder/))<br>string<br>object | Optional modifier for the join table query. If specified as a function, it will be called each time before fetching the relation. If specified as a string, modifier with specified name will be applied each time when fetching the relation. If specified as an object, it will be used as an additional query parameter - e. g. passing {name: 'Jenny'} would additionally narrow fetched rows to the ones with the name 'Jenny'. |
40-
| filter | function([QueryBuilder](/api/query-builder/))<br>string<br>object | Alias for modify. |
41-
| beforeInsert | function([Model](/api/model/),&nbsp;[QueryContext](/api/query-builder/other-methods.html#context)) | Optional insert hook that is called for each inserted join table model instance. This function can be async. |
40+
| filter | function([QueryBuilder](/api/query-builder/))<br>string<br>object | Alias for modify. |
41+
| beforeInsert | function([Model](/api/model/),&nbsp;[QueryContext](/api/query-builder/other-methods.html#context)) | Optional insert hook that is called for each inserted join table model instance. This function can be async. |
4242

4343
## `type` ModelOptions
4444

0 commit comments

Comments
 (0)