Skip to main content
Module

x/typeorm/src/index.ts>ManyToMany

Forked from https://github.com/typeorm/typeorm
Latest
function ManyToMany
import { ManyToMany } from "https://deno.land/x/typeorm@v0.2.23-rc10/src/index.ts";

Many-to-many is a type of relationship when Entity1 can have multiple instances of Entity2, and Entity2 can have multiple instances of Entity1. To achieve it, this type of relation creates a junction table, where it storage entity1 and entity2 ids. This is owner side of the relationship.

Parameters

typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>)
optional
options: RelationOptions

Returns

Function

Many-to-many is a type of relationship when Entity1 can have multiple instances of Entity2, and Entity2 can have multiple instances of Entity1. To achieve it, this type of relation creates a junction table, where it storage entity1 and entity2 ids. This is owner side of the relationship.

Parameters

typeFunctionOrTarget: string | ((type?: any) => ObjectType<T>)
optional
inverseSide: string | ((object: T) => any)
optional
options: RelationOptions

Returns

Function