MikroORMOptions <D, EM>
Hierarchy
- ConnectionOptions
- MikroORMOptions
Index
Properties
- allowGlobalContext
- assign
- autoJoinOneToOneOwner
- autoJoinRefsForFilters
- baseDir
- batchSize
- charset
- clientUrl
- collate
- colors
- connect
- context
- contextName
- dataloader
- dbName
- debug
- disableIdentityMap
- disableTransactions
- discovery
- driver
- driverOptions
- dynamicImportProvider
- embeddables
- ensureDatabase
- ensureIndexes
- entities
- entitiesTs
- entityGenerator
- entityManager
- entityRepository
- extensions
- filters
- findExactlyOneOrFailHandler
- findOneOrFailHandler
- flushMode
- forceEntityConstructor
- forceUndefined
- forceUtcTimezone
- highlighter
- host
- hydrator
- ignoreDeprecations
- ignoreUndefinedInQuery
- implicitTransactions
- loadStrategy
- logger
- loggerFactory
- metadataCache
- metadataProvider
- migrations
- multipleStatements
- name
- namingStrategy
- onQuery
- password
- persistOnCreate
- pool
- populateAfterFlush
- populateWhere
- port
- preferReadReplicas
- preferTs
- propagationOnPrototype
- replicas
- resultCache
- schema
- schemaGenerator
- seeder
- serialization
- strict
- subscribers
- timezone
- tsNode
- upsertManaged
- useBatchInserts
- useBatchUpdates
- user
- validate
- validateRequired
- verbose
Properties
allowGlobalContext
assign
autoJoinOneToOneOwner
autoJoinRefsForFilters
baseDir
batchSize
optionalinheritedcharset
optionalinheritedclientUrl
optionalinheritedcollate
optionalcolors
connect
context
Type declaration
Parameters
name: string
Returns undefined | EntityManager<IDatabaseDriver<Connection>>
contextName
dataloader
optionalinheriteddbName
debug
optionaldisableIdentityMap
optionaldisableTransactions
discovery
optionaldriver
Type declaration
Parameters
Returns D
optionalinheriteddriverOptions
dynamicImportProvider
Type declaration
Parameters
id: string
Returns Promise<unknown>
embeddables
Type declaration
prefixMode: EmbeddedPrefixMode
ensureDatabase
ensureIndexes
entities
entitiesTs
entityGenerator
optionalentityManager
optionalentityRepository
extensions
filters
findExactlyOneOrFailHandler
Type declaration
Parameters
entityName: string
where: IPrimaryKeyValue | Dictionary
Returns Error
findOneOrFailHandler
Type declaration
Parameters
entityName: string
where: IPrimaryKeyValue | Dictionary
Returns Error
flushMode
forceEntityConstructor
forceUndefined
optionalforceUtcTimezone
highlighter
optionalinheritedhost
hydrator
ignoreDeprecations
optionalignoreUndefinedInQuery
optionalimplicitTransactions
loadStrategy
logger
Type declaration
Parameters
message: string
Returns void
optionalloggerFactory
Type declaration
Parameters
options: LoggerOptions
Returns Logger
metadataCache
Type declaration
optionaladapter?: new (...params: any[]) => SyncCacheAdapter
Parameters
rest...params: any[]
Returns SyncCacheAdapter
optionalcombined?: string | boolean
optionalenabled?: boolean
optionaloptions?: Dictionary
optionalpretty?: boolean
metadataProvider
Type declaration
Parameters
Returns MetadataProvider
migrations
optionalinheritedmultipleStatements
optionalinheritedname
optionalnamingStrategy
Type declaration
Returns NamingStrategy
onQuery
Type declaration
Parameters
sql: string
params: unknown[]
Returns string
optionalinheritedpassword
persistOnCreate
optionalinheritedpool
populateAfterFlush
optionalpopulateWhere
optionalinheritedport
preferReadReplicas
optionalpreferTs
propagationOnPrototype
optionalreplicas
resultCache
Type declaration
optionaladapter?: new (...params: any[]) => CacheAdapter
Parameters
rest...params: any[]
Returns CacheAdapter
optionalexpiration?: number
optionalglobal?: number | boolean | [string, number]
optionaloptions?: Dictionary
optionalinheritedschema
schemaGenerator
Type declaration
optionalcreateForeignKeyConstraints?: boolean
optionaldisableForeignKeys?: boolean
optionalignoreSchema?: string[]
optionalmanagementDbName?: string
seeder
serialization
Type declaration
optionalforceObject?: boolean
Enforce unpopulated references to be returned as objects, e.g.
{ author: { id: 1 } }
instead of{ author: 1 }
.optionalincludePrimaryKeys?: boolean
Using this option, you can force the ORM to use the TS options regardless of whether the TypeScript support is detected or not. This effectively means using
entitiesTs
for discovery andpathTs
for migrations and seeders. Should be used only for tests and stay disabled for production builds.