Skip to main content
Version: Next

Interface: MikroORMOptions<D\>

core.MikroORMOptions

Type parameters#

NameTypeDefault
DIDatabaseDriverIDatabaseDriver

Hierarchy#

Properties#

autoJoinOneToOneOwner#

autoJoinOneToOneOwner: boolean

Defined in: packages/core/src/utils/Configuration.ts:357


baseDir#

baseDir: string

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


batchSize#

batchSize: number

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


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:383


charset#

Optional charset: string

Inherited from: ConnectionOptions.charset

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


clientUrl#

Optional clientUrl: string

Inherited from: ConnectionOptions.clientUrl

Defined in: packages/core/src/utils/Configuration.ts:292


collate#

Optional collate: string

Inherited from: ConnectionOptions.collate

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


context#

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

Type declaration#

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

Parameters#

NameType
namestring

Returns: undefined | EntityManager<IDatabaseDriver<Connection>>

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

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


contextName#

contextName: string

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


dbName#

Optional dbName: string

Inherited from: ConnectionOptions.dbName

Defined in: packages/core/src/utils/Configuration.ts:289


debug#

debug: boolean | LoggerNamespace[]

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


discovery#

discovery: object

Type declaration#

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

Defined in: packages/core/src/utils/Configuration.ts:346


driver#

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

Type declaration#

+ new MikroORMOptions(config: Configuration<IDatabaseDriver<Connection>>): D

Parameters#

NameType
configConfiguration<IDatabaseDriver<Connection>>

Returns: D

Inherited from: ConnectionOptions.constructor

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

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


driverOptions#

driverOptions: Dictionary<any>

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


ensureIndexes#

ensureIndexes: boolean

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


entities#

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

Defined in: packages/core/src/utils/Configuration.ts:342


entitiesTs#

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

Defined in: packages/core/src/utils/Configuration.ts:343


entityRepository#

Optional entityRepository: Constructor<EntityRepository<any>>

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


filters#

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

Defined in: packages/core/src/utils/Configuration.ts:345


findOneOrFailHandler#

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

Type declaration#

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

Parameters#

NameType
entityNamestring
whereIPrimaryKeyValue | Dictionary<any>

Returns: Error

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

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


forceEntityConstructor#

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

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


forceUndefined#

forceUndefined: boolean

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


forceUtcTimezone#

forceUtcTimezone: boolean

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


highlighter#

highlighter: Highlighter

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


host#

Optional host: string

Inherited from: ConnectionOptions.host

Defined in: packages/core/src/utils/Configuration.ts:293


hydrator#

hydrator: HydratorConstructor

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


implicitTransactions#

Optional implicitTransactions: boolean

Defined in: packages/core/src/utils/Configuration.ts:356


loadStrategy#

loadStrategy: LoadStrategy

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


logger#

logger: (message: string) => void

Type declaration#

▸ (message: string): void

Parameters#

NameType
messagestring

Returns: void

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

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


metadataProvider#

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

Type declaration#

+ new MikroORMOptions(config: Configuration<IDatabaseDriver<Connection>>): MetadataProvider

Parameters#

NameType
configConfiguration<IDatabaseDriver<Connection>>

Returns: MetadataProvider

Inherited from: ConnectionOptions.constructor

Defined in: packages/core/src/utils/Configuration.ts:394

Defined in: packages/core/src/utils/Configuration.ts:394


migrations#

migrations: MigrationsOptions

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


multipleStatements#

Optional multipleStatements: boolean

Inherited from: ConnectionOptions.multipleStatements

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


name#

Optional name: string

Inherited from: ConnectionOptions.name

Defined in: packages/core/src/utils/Configuration.ts:291


namingStrategy#

Optional namingStrategy: () => NamingStrategy

Type declaration#

+ new MikroORMOptions(): NamingStrategy

Returns: NamingStrategy

Inherited from: ConnectionOptions.constructor

Defined in: packages/core/src/utils/Configuration.ts:355

Defined in: packages/core/src/utils/Configuration.ts:355


password#

Optional password: string

Inherited from: ConnectionOptions.password

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


pool#

Optional pool: PoolConfig

Inherited from: ConnectionOptions.pool

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


populateAfterFlush#

populateAfterFlush: boolean

Defined in: packages/core/src/utils/Configuration.ts:359


port#

Optional port: number

Inherited from: ConnectionOptions.port

Defined in: packages/core/src/utils/Configuration.ts:294


propagateToOneOwner#

propagateToOneOwner: boolean

Defined in: packages/core/src/utils/Configuration.ts:358


replicas#

Optional replicas: Partial<ConnectionOptions>[]

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


resultCache#

resultCache: object

Type declaration#

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

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


schema#

Optional schema: string

Inherited from: ConnectionOptions.schema

Defined in: packages/core/src/utils/Configuration.ts:290


strict#

strict: boolean

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


subscribers#

subscribers: EventSubscriber<any>[]

Defined in: packages/core/src/utils/Configuration.ts:344


timezone#

Optional timezone: string

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


tsNode#

Optional tsNode: boolean

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


type#

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

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


useBatchInserts#

Optional useBatchInserts: boolean

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


useBatchUpdates#

Optional useBatchUpdates: boolean

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


user#

Optional user: string

Inherited from: ConnectionOptions.user

Defined in: packages/core/src/utils/Configuration.ts:295


validate#

validate: boolean

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