UNPKG

ionic-orm-2

Version:

Data-mapper ORM for Ionic WebSQL and SQLite

13 lines (12 loc) 803 B
import { RelationOptions } from "../options/RelationOptions"; import { ObjectType } from "../../common/ObjectType"; /** * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2. * Entity1 is an owner of the relationship, and storages Entity1 id on its own side. */ export declare function OneToOne<T>(typeFunction: (type?: any) => ObjectType<T>, options?: RelationOptions): Function; /** * One-to-one relation allows to create direct relation between two entities. Entity1 have only one Entity2. * Entity1 is an owner of the relationship, and storages Entity1 id on its own side. */ export declare function OneToOne<T>(typeFunction: (type?: any) => ObjectType<T>, inverseSide?: string | ((object: T) => any), options?: RelationOptions): Function;