MetadataDiscoveryOptions
Index
Properties
optionalafterDiscovered
Hook called after all entities are discovered. Can be used to access and modify all metadata at once.
Type declaration
Parameters
storage: MetadataStorage
platform: Platform
Returns MaybePromise<void>
optionalcheckDuplicateFieldNames
Check for duplicate field names and throw an error if found.
optionalcheckDuplicateTableNames
Check for duplicate table names and throw an error if found.
optionalcheckNonPersistentCompositeProps
Check for composite primary keys marked as persist: false and throw an error if found.
optionalgetMappedType
optionalinferDefaultValues
Infer default values from property initializers when possible (if the constructor can be invoked without parameters).
optionalonMetadata
Hook called for each entity metadata during discovery.
Can be used to modify metadata dynamically before defaults are filled in.
The hook can be async when using MikroORM.init().
Type declaration
Parameters
meta: EntityMetadata<any, EntityCtor<any>>
platform: Platform
Returns MaybePromise<void>
optionaltsConfigPath
Path to the TypeScript configuration file for ts-morph metadata provider.
optionalwarnWhenNoEntities
Throw an error when no entities are discovered.
Configuration options for metadata discovery.
https://mikro-orm.io/docs/configuration#entity-discovery