> For the complete documentation index, see [llms.txt](https://myroslavs-organization.gitbook.io/orm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://myroslavs-organization.gitbook.io/orm/api/decorators/relations.md).

# Relations

**ManyToMany Decorator**

The `ManyToMany` decorator is used to set up "many-to-many" relationships between tables.

**Parameters of `ManyToManyDecoratorInterface`**

* **foreignKey:**
  * Type: `string`
  * Description: The name of the column that is the foreign key in the "many-to-many" relationship.
* **referencedColumn:**
  * Type: `string`
  * Description: The name of the column that the foreign key refers to.

**OneToMany Decorator**

The `OneToMany` decorator is used to set up "one-to-many" relationships between tables.

**Parameters of `OneToManyDecoratorInterface`**

* **referenceColumn:**
  * Type: `string`
  * Description: The name of the column that refers to the foreign key in the "one-to-many" relationship.
* **foreignKey:**
  * Type: `string`
  * Description: The name of the column that is the foreign key in the "one-to-many" relationship.

**OneToOne Decorator**

The `OneToOne` decorator is used to set up "one-to-one" relationships between tables.

**Parameters of `OneToOneDecoratorInterface`**

* **table:**
  * Type: `string`
  * Description: The name of the table to which the foreign key belongs in the "one-to-one" relationship.
* **foreignKey:**
  * Type: `string`
  * Description: The name of the column that is the foreign key in the "one-to-one" relationship.
* **referenceColumn:**
  * Type: `string`
  * Description: The name of the column that the foreign key refers to.
