Skip to main content
Module

x/typeorm/src/index.ts>ManyToOne

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

Many-to-one relation allows to create type of relation when Entity1 can have single instance of Entity2, but Entity2 can have a multiple instances of Entity1. Entity1 is an owner of the relationship, and storages Entity2 id on its own side.

Parameters

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

Returns

Function

Many-to-one relation allows to create type of relation when Entity1 can have single instance of Entity2, but Entity2 can have a multiple instances of Entity1. Entity1 is an owner of the relationship, and storages Entity2 id on its own side.

Parameters

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

Returns

Function