UNPKG

@mikro-orm/core

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

19 lines (18 loc) 756 B
import type { AnyEntity } from '../typings'; export declare function Embedded<T extends object>(type?: EmbeddedOptions | (() => AnyEntity), options?: EmbeddedOptions): (target: AnyEntity, propertyName: string) => any; /** With `absolute` the prefix is set at the root of the entity (regardless of the nesting level) */ export type EmbeddedPrefixMode = 'absolute' | 'relative'; export type EmbeddedOptions = { entity?: string | (() => AnyEntity | AnyEntity[]); type?: string; prefix?: string | boolean; prefixMode?: EmbeddedPrefixMode; nullable?: boolean; object?: boolean; array?: boolean; hidden?: boolean; serializer?: (value: any) => any; serializedName?: string; groups?: string[]; persist?: boolean; };