docs: generate references manually for 2.1.1 (#10534)
* docs: generate references manually for 2.1.1 * re-generate for core-flows * Revert "re-generate for core-flows" This reverts commit ff785c80214dc6125e2da4c6e8a674a87b03e9dd.
This commit is contained in:
1 parent
482929f74d
commit
ab1bfb966d
1109 files changed
+348717
-331421
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ sidebar_label: belongsTo
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# belongsTo Relationship Method - API Reference
|
||||
# belongsTo Relationship Method - DML Reference
|
||||
|
||||
This method defines the inverse of the [hasOne](../dml.Relationship_Methods.hasOne/page.mdx) or [hasMany](../dml.Relationship_Methods.hasMany/page.mdx) relationship.
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ sidebar_label: hasMany
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# hasMany Relationship Method - API Reference
|
||||
# hasMany Relationship Method - DML Reference
|
||||
|
||||
This method defines a relationship between two data models,
|
||||
where the owner of the relationship has many records of the related
|
||||
|
||||
+17
-5
@@ -5,7 +5,9 @@ sidebar_label: hasOne
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# hasOne Relationship Method - API Reference
|
||||
# hasOne Relationship Method - DML Reference
|
||||
|
||||
## hasOne<TypeParameter T>(entityBuilder, options): HasOneWithForeignKey<T>
|
||||
|
||||
This method defines a relationship between two data models,
|
||||
where the owner of the relationship has one record of the related
|
||||
@@ -16,7 +18,7 @@ For example: A user "hasOne" email.
|
||||
Use the [belongsTo](../dml.Relationship_Methods.belongsTo/page.mdx) method to define the inverse of this relationship in
|
||||
the other data model.
|
||||
|
||||
## Example
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import { model } from "@medusajs/framework/utils"
|
||||
@@ -27,10 +29,20 @@ const User = model.define("user", {
|
||||
})
|
||||
```
|
||||
|
||||
## Type Parameters
|
||||
### Type Parameters
|
||||
|
||||
<TypeList types={[{"name":"T","type":"`object`","description":"The type of the entity builder passed as a first parameter. By default, it's\na function returning the related model.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
|
||||
|
||||
## Parameters
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[RelationshipOptions](../../../../types/DmlTypes/types/types.DmlTypes.RelationshipOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
|
||||
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object` & `Record<string, any>` & `object`","description":"The relationship's options.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"foreignKey","type":"`true`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
|
||||
|
||||
## hasOne<TypeParameter T>(entityBuilder, options?): HasOne<T>
|
||||
|
||||
### Type Parameters
|
||||
|
||||
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"name":"entityBuilder","type":"T","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object` & `Record<string, any>` & `object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`false`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="hasOne"/>
|
||||
+2
-2
@@ -5,7 +5,7 @@ sidebar_label: manyToMany
|
||||
|
||||
import { TypeList } from "docs-ui"
|
||||
|
||||
# manyToMany Relationship Method - API Reference
|
||||
# manyToMany Relationship Method - DML Reference
|
||||
|
||||
This method defines a relationship between two data models,
|
||||
where both data models have many related records.
|
||||
@@ -35,4 +35,4 @@ const Product = model.define("product", {
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ManyToManyOptions](../../../entity_builder/types/dml.entity_builder.ManyToManyOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotTable","type":"`string`","description":"The name of the pivot table\ncreated in the database for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"joinColumn","type":"`string`","description":"The column name in the pivot table that for the current entity","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverseJoinColumn","type":"`string`","description":"The column name in the pivot table for the opposite entity","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotEntity","type":"() => [DmlEntity](../../../entity/classes/dml.entity.DmlEntity/page.mdx)<any, any>","description":"A function that returns the data model\nrepresenting the pivot table created in the\ndatabase for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="manyToMany"/>
|
||||
<TypeList types={[{"name":"entityBuilder","type":"T","description":"A function that returns the data model this model is related to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[ManyToManyOptions](../../../entity_builder/types/dml.entity_builder.ManyToManyOptions/page.mdx)","description":"The relationship's options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"mappedBy","type":"`string`","description":"The name of the relationship as defined in the other\ndata model. This is only required by the `belongsTo` and `manyToMany`\nrelationship method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotTable","type":"`string`","description":"The name of the pivot table\ncreated in the database for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"joinColumn","type":"`string` \\| `string`[]","description":"The column name in the pivot table that for the current entity","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverseJoinColumn","type":"`string` \\| `string`[]","description":"The column name in the pivot table for the opposite entity","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"pivotEntity","type":"() => [DmlEntity](../../../entity/classes/dml.entity.DmlEntity/page.mdx)<any, any>","description":"A function that returns the data model\nrepresenting the pivot table created in the\ndatabase for this relationship.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"joinColumn","type":"`string` \\| `string`[]","description":"The column name in the pivot table that for the current entity","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverseJoinColumn","type":"`string` \\| `string`[]","description":"The column name in the pivot table for the opposite entity","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="manyToMany"/>
|
||||
Reference in new issue
Block a user