Skip to main content
Version: Next

Interface: MikroORMOptions<D>

core.MikroORMOptions

Type parameters#

NameType
DD: IDatabaseDriver = IDatabaseDriver

Hierarchy#

Properties#

autoJoinOneToOneOwner#

autoJoinOneToOneOwner: boolean

Defined in#

packages/core/src/utils/Configuration.ts:365


baseDir#

baseDir: string

Defined in#

packages/core/src/utils/Configuration.ts:389


batchSize#

batchSize: number

Defined in#

packages/core/src/utils/Configuration.ts:375


cache#

cache: Object

Type declaration#

NameType
adapter?(...params: any[]) => CacheAdapter
enabled?boolean
options?Dictionary<any>
pretty?boolean

Defined in#

packages/core/src/utils/Configuration.ts:391


charset#

Optional charset: string

Inherited from#

ConnectionOptions.charset

Defined in#

packages/core/src/utils/Configuration.ts:304


clientUrl#

Optional clientUrl: string

Inherited from#

ConnectionOptions.clientUrl

Defined in#

packages/core/src/utils/Configuration.ts:299


collate#

Optional collate: string

Inherited from#

ConnectionOptions.collate

Defined in#

packages/core/src/utils/Configuration.ts:305


context#

context: (name: string) => undefined | EntityManager<IDatabaseDriver<Connection>>

Type declaration#

▸ (name): undefined | EntityManager<IDatabaseDriver<Connection>>

Parameters#
NameType
namestring
Returns#

undefined | EntityManager<IDatabaseDriver<Connection>>

Defined in#

packages/core/src/utils/Configuration.ts:382


contextName#

contextName: string

Defined in#

packages/core/src/utils/Configuration.ts:383


dbName#

Optional dbName: string

Inherited from#

ConnectionOptions.dbName

Defined in#

packages/core/src/utils/Configuration.ts:296


debug#

debug: boolean | LoggerNamespace[]

Defined in#

packages/core/src/utils/Configuration.ts:386


discovery#

discovery: Object

Type declaration#

NameType
alwaysAnalyseProperties?boolean
disableDynamicFileAccess?boolean
requireEntitiesArray?boolean
warnWhenNoEntities?boolean

Defined in#

packages/core/src/utils/Configuration.ts:354


driver#

Optional driver: (config: Configuration<IDatabaseDriver<Connection>>) => D

Type declaration#

new MikroORMOptions(config)

Parameters#
NameType
configConfiguration<IDatabaseDriver<Connection>>

Defined in#

packages/core/src/utils/Configuration.ts:361


driverOptions#

driverOptions: Dictionary<any>

Defined in#

packages/core/src/utils/Configuration.ts:362


ensureIndexes#

ensureIndexes: boolean

Defined in#

packages/core/src/utils/Configuration.ts:372


entities#

entities: (string | EntityClass<AnyEntity<any>> | EntityClassGroup<AnyEntity<any>> | EntitySchema<any, undefined>)[]

Defined in#

packages/core/src/utils/Configuration.ts:350


entitiesTs#

entitiesTs: (string | EntityClass<AnyEntity<any>> | EntityClassGroup<AnyEntity<any>> | EntitySchema<any, undefined>)[]

Defined in#

packages/core/src/utils/Configuration.ts:351


entityRepository#

Optional entityRepository: Constructor<EntityRepository<any>>

Defined in#

packages/core/src/utils/Configuration.ts:378


filters#

filters: Dictionary<{ name?: string } & Omit<FilterDef<AnyEntity<any>>, "name">>

Defined in#

packages/core/src/utils/Configuration.ts:353


findOneOrFailHandler#

findOneOrFailHandler: (entityName: string, where: IPrimaryKeyValue | Dictionary<any>) => Error

Type declaration#

▸ (entityName, where): Error

Parameters#
NameType
entityNamestring
whereIPrimaryKeyValue | Dictionary<any>
Returns#

Error

Defined in#

packages/core/src/utils/Configuration.ts:385


forceEntityConstructor#

forceEntityConstructor: boolean | (string | Constructor<AnyEntity<any>>)[]

Defined in#

packages/core/src/utils/Configuration.ts:368


forceUndefined#

forceUndefined: boolean

Defined in#

packages/core/src/utils/Configuration.ts:369


forceUtcTimezone#

forceUtcTimezone: boolean

Defined in#

packages/core/src/utils/Configuration.ts:370


highlighter#

highlighter: Highlighter

Defined in#

packages/core/src/utils/Configuration.ts:387


host#

Optional host: string

Inherited from#

ConnectionOptions.host

Defined in#

packages/core/src/utils/Configuration.ts:300


hydrator#

hydrator: HydratorConstructor

Defined in#

packages/core/src/utils/Configuration.ts:376


implicitTransactions#

Optional implicitTransactions: boolean

Defined in#

packages/core/src/utils/Configuration.ts:364


loadStrategy#

loadStrategy: LoadStrategy

Defined in#

packages/core/src/utils/Configuration.ts:377


logger#

logger: (message: string) => void

Type declaration#

▸ (message): void

Parameters#
NameType
messagestring
Returns#

void

Defined in#

packages/core/src/utils/Configuration.ts:384


metadataProvider#

metadataProvider: (config: Configuration<IDatabaseDriver<Connection>>) => MetadataProvider

Type declaration#

new MikroORMOptions(config)

Parameters#
NameType
configConfiguration<IDatabaseDriver<Connection>>

Defined in#

packages/core/src/utils/Configuration.ts:402


migrations#

migrations: MigrationsOptions

Defined in#

packages/core/src/utils/Configuration.ts:390


multipleStatements#

Optional multipleStatements: boolean

Inherited from#

ConnectionOptions.multipleStatements

Defined in#

packages/core/src/utils/Configuration.ts:306


name#

Optional name: string

Inherited from#

ConnectionOptions.name

Defined in#

packages/core/src/utils/Configuration.ts:298


namingStrategy#

Optional namingStrategy: () => NamingStrategy

Type declaration#

new MikroORMOptions()

Defined in#

packages/core/src/utils/Configuration.ts:363


password#

Optional password: string | () => MaybePromise<string> | MaybePromise<DynamicPassword>

Inherited from#

ConnectionOptions.password

Defined in#

packages/core/src/utils/Configuration.ts:303


pool#

Optional pool: PoolConfig

Inherited from#

ConnectionOptions.pool

Defined in#

packages/core/src/utils/Configuration.ts:307


populateAfterFlush#

populateAfterFlush: boolean

Defined in#

packages/core/src/utils/Configuration.ts:367


port#

Optional port: number

Inherited from#

ConnectionOptions.port

Defined in#

packages/core/src/utils/Configuration.ts:301


propagateToOneOwner#

propagateToOneOwner: boolean

Defined in#

packages/core/src/utils/Configuration.ts:366


replicas#

Optional replicas: Partial<ConnectionOptions>[]

Defined in#

packages/core/src/utils/Configuration.ts:379


resultCache#

resultCache: Object

Type declaration#

NameType
adapter?(...params: any[]) => CacheAdapter
expiration?number
options?Dictionary<any>

Defined in#

packages/core/src/utils/Configuration.ts:397


schema#

Optional schema: string

Inherited from#

ConnectionOptions.schema

Defined in#

packages/core/src/utils/Configuration.ts:297


seeder#

seeder: Object

Type declaration#

NameType
defaultSeederstring
pathstring

Defined in#

packages/core/src/utils/Configuration.ts:403


strict#

strict: boolean

Defined in#

packages/core/src/utils/Configuration.ts:380


subscribers#

subscribers: EventSubscriber<any>[]

Defined in#

packages/core/src/utils/Configuration.ts:352


timezone#

Optional timezone: string

Defined in#

packages/core/src/utils/Configuration.ts:371


tsNode#

Optional tsNode: boolean

Defined in#

packages/core/src/utils/Configuration.ts:388


type#

Optional type: "mongo" | "mysql" | "mariadb" | "postgresql" | "sqlite"

Defined in#

packages/core/src/utils/Configuration.ts:360


useBatchInserts#

Optional useBatchInserts: boolean

Defined in#

packages/core/src/utils/Configuration.ts:373


useBatchUpdates#

Optional useBatchUpdates: boolean

Defined in#

packages/core/src/utils/Configuration.ts:374


user#

Optional user: string

Inherited from#

ConnectionOptions.user

Defined in#

packages/core/src/utils/Configuration.ts:302


validate#

validate: boolean

Defined in#

packages/core/src/utils/Configuration.ts:381