@mikro-orm/core
Index
Classes
- AbstractNamingStrategy
- AbstractSchemaGenerator
- ArrayCollection
- ArrayType
- BaseEntity
- BigIntType
- BlobType
- BooleanType
- ChangeSet
- ChangeSetComputer
- ChangeSetPersister
- CharacterType
- CheckConstraintViolationException
- Collection
- Configuration
- Connection
- ConnectionException
- ConstraintViolationException
- Cursor
- CursorError
- DatabaseDriver
- DatabaseObjectExistsException
- DatabaseObjectNotFoundException
- DataloaderUtils
- DateTimeType
- DateType
- DeadlockException
- DecimalType
- DefaultLogger
- DoubleType
- DriverException
- EntityAssigner
- EntityCaseNamingStrategy
- EntityComparator
- EntityFactory
- EntityLoader
- EntityManager
- EntityMetadata
- EntityRepository
- EntitySchema
- EntitySerializer
- EntityTransformer
- EntityValidator
- EnumArrayType
- EnumType
- EventManager
- ExceptionConverter
- FileCacheAdapter
- FloatType
- ForeignKeyConstraintViolationException
- GeneratedCacheAdapter
- Hydrator
- IdentityMap
- IntegerType
- IntervalType
- InvalidFieldNameException
- JsonType
- LockWaitTimeoutException
- MediumIntType
- MemoryCacheAdapter
- MetadataDiscovery
- MetadataError
- MetadataProvider
- MetadataStorage
- MikroORM
- MongoNamingStrategy
- NonUniqueFieldNameException
- NotFoundError
- NotNullConstraintViolationException
- NullCacheAdapter
- NullHighlighter
- ObjectHydrator
- OptimisticLockError
- PlainObject
- Platform
- QueryHelper
- RawQueryFragment
- ReadOnlyException
- Reference
- ReflectMetadataProvider
- RequestContext
- ScalarReference
- SerializationContext
- ServerException
- SimpleLogger
- SmallIntType
- StringType
- SyntaxErrorException
- TableExistsException
- TableNotFoundException
- TextType
- TimeType
- TinyIntType
- TransactionContext
- TransactionEventBroadcaster
- Type
- Uint8ArrayType
- UnderscoreNamingStrategy
- UniqueConstraintViolationException
- UnitOfWork
- UnknownType
- Utils
- UuidType
- ValidationError
- WrappedEntity
Enumerations
Functions
- AfterCreate
- AfterDelete
- AfterUpdate
- AfterUpsert
- BeforeCreate
- BeforeDelete
- BeforeUpdate
- BeforeUpsert
- Check
- CreateRequestContext
- Embeddable
- Embedded
- EnsureRequestContext
- Entity
- Enum
- Filter
- Formula
- Index
- ManyToMany
- ManyToOne
- OnInit
- OnLoad
- OneToMany
- OneToOne
- PrimaryKey
- Property
- SerializedPrimaryKey
- Unique
- assign
- compareArrays
- compareBooleans
- compareBuffers
- compareObjects
- createSqlFunction
- defineConfig
- equals
- parseJsonSafe
- raw
- ref
- rel
- serialize
- sql
- wrap
Interfaces
- AssignOptions
- CacheAdapter
- ClearDatabaseOptions
- ConnectionConfig
- ConnectionOptions
- CountOptions
- CreateContextOptions
- CreateOptions
- CreateSchemaOptions
- DeleteOptions
- DriverMethodOptions
- DropSchemaOptions
- DynamicPassword
- Edge
- EnsureDatabaseOptions
- EntityProperty
- EnumOptions
- EventArgs
- EventSubscriber
- FactoryOptions
- FindAllOptions
- FindByCursorOptions
- FindOneOptions
- FindOneOrFailOptions
- FindOptions
- FlatQueryOrderMap
- FlushEventArgs
- ForkOptions
- FormulaOptions
- GenerateOptions
- GetReferenceOptions
- Highlighter
- IConfiguration
- IDatabaseDriver
- IEntityGenerator
- IMigrationGenerator
- IMigrator
- ISchemaGenerator
- ISeedManager
- IWrappedEntity
- IndexOptions
- InitCollectionOptions
- LoadCountOptions
- LoadHint
- LoadReferenceOptions
- LoadReferenceOrFailOptions
- LoadedCollection
- LoadedReference
- LockOptions
- LogContext
- Logger
- LoggerOptions
- ManyToManyOptions
- ManyToOneOptions
- MatchingOptions
- MergeOptions
- MetadataDiscoveryOptions
- MigrationDiff
- MigrationObject
- MikroORMOptions
- NamingStrategy
- NativeDeleteOptions
- NativeInsertUpdateManyOptions
- NativeInsertUpdateOptions
- Node
- OneToManyOptions
- OneToOneOptions
- PoolConfig
- PrimaryKeyOptions
- PropertyOptions
- QueryResult
- ReferenceOptions
- RefreshDatabaseOptions
- RegisterOptions
- SeederOptions
- SerializeOptions
- SerializedPrimaryKeyOptions
- Settings
- SimpleColumnMeta
- SyncCacheAdapter
- TransactionEventArgs
- TransactionOptions
- TransformContext
- TypeConfig
- UniqueOptions
- UpdateOptions
- UpdateSchemaOptions
- UpsertManyOptions
- UpsertOptions
Type Aliases
- AnyEntity
- AutoPath
- Cast
- CheckCallback
- CheckOptions
- ConnectionType
- Constructor
- DeepPartial
- DefineConfig
- Dictionary
- EmbeddableOptions
- EmbeddedOptions
- EmbeddedPrefixMode
- EntityClass
- EntityClassGroup
- EntityDTO
- EntityData
- EntityDictionary
- EntityField
- EntityKey
- EntityLoaderOptions
- EntityName
- EntityOptions
- EntityProps
- EntityRef
- EntitySchemaMetadata
- EntitySchemaProperty
- EntityType
- EntityValue
- ExpandHint
- ExpandProperty
- ExpandQuery
- ExpandScalar
- FilterItemValue
- FilterKey
- FilterObject
- FilterOptions
- FilterQuery
- FilterValue
- FromEntityType
- GetRepository
- Hidden
- IPrimaryKey
- IType
- ImportsResolver
- IsSubset
- IsUnknown
- Loaded
- LoggerNamespace
- LoggingOptions
- MergeLoaded
- MergeSelected
- MetadataProcessor
- MigrateOptions
- MigrationResult
- MigrationRow
- MigrationsOptions
- New
- NoInfer
- ObjectQuery
- Opt
- Options
- OrderDefinition
- Populate
- PopulateOptions
- Primary
- PrimaryProperty
- QBFilterQuery
- QBQueryOrderMap
- QueryOrderKeys
- QueryOrderKeysFlat
- QueryOrderMap
- Ref
- Rel
- RequiredEntityData
- Scalar
- ScalarRef
- Selected
- Transaction
- TransactionEventType
- UmzugMigration
- UnboxArray
Variables
Type Aliases
AnyEntity
Type parameters
- T = any
AutoPath
Type parameters
- O
- P: string | boolean
- E: string = never
- D: Prev[number] = 9
Cast
Type parameters
- T
- R
CheckCallback
Type parameters
- T
Type declaration
Parameters
columns: Record<keyof T, string>
Returns string
CheckOptions
Type parameters
- T = any
ConnectionType
Constructor
Type parameters
- T = unknown
Type declaration
Parameters
rest...args: any[]
Returns T
DeepPartial
Type parameters
- T
DefineConfig
Type parameters
- T: TypeConfig
Dictionary
Type parameters
- T = any
Type declaration
[k string]: T
EmbeddableOptions
Type declaration
optionalabstract?: boolean
optionaldiscriminatorColumn?: string
optionaldiscriminatorMap?: Dictionary<string>
optionaldiscriminatorValue?: number | string
EmbeddedOptions
Type declaration
optionalarray?: boolean
optionalentity?: string | () => AnyEntity | AnyEntity[]
optionalgroups?: string[]
optionalhidden?: boolean
optionalnullable?: boolean
optionalobject?: boolean
optionalpersist?: boolean
optionalprefix?: string | boolean
optionalprefixMode?: EmbeddedPrefixMode
optionalserializedName?: string
optionalserializer?: (value: any) => any
Parameters
value: any
Returns any
optionaltype?: string
EmbeddedPrefixMode
EntityClass
Type parameters
- T
EntityClassGroup
Type parameters
- T
Type declaration
entity: EntityClass<T>
schema: EntityMetadata<T> | EntitySchema<T>
EntityDTO
Type parameters
- T
- C: TypeConfig = never
EntityData
Type parameters
- T
- C: boolean = false
EntityDictionary
Type parameters
- T
EntityField
Type parameters
- T
- P: string = PopulatePath.ALL
EntityKey
Type parameters
- T = unknown
- B: boolean = false
EntityLoaderOptions
Type parameters
- Entity
- Fields: string = PopulatePath.ALL
- Excludes: string = never
Type declaration
optionalconnectionType?: ConnectionType
optionalconvertCustomTypes?: boolean
optionalexclude?: readonly EntityField<Entity, Excludes>[]
optionalfields?: readonly EntityField<Entity, Fields>[]
optionalfilters?: Dictionary<boolean | Dictionary> | string[] | boolean
optionalignoreLazyScalarProperties?: boolean
optionallockMode?: Exclude<LockMode, LockMode.OPTIMISTIC>
optionallogging?: LoggingOptions
optionallookup?: boolean
optionalorderBy?: QueryOrderMap<Entity> | QueryOrderMap<Entity>[]
optionalpopulateWhere?: PopulateHint | `${PopulateHint}`
optionalrefresh?: boolean
optionalschema?: string
optionalstrategy?: LoadStrategy
optionalvalidate?: boolean
optionalwhere?: FilterQuery<Entity>
EntityName
Type parameters
- T
EntityOptions
Type parameters
- T
Type declaration
optionalabstract?: boolean
optionalcollection?: string
optionalcomment?: string
optionaldiscriminatorColumn?: string
optionaldiscriminatorMap?: Dictionary<string>
optionaldiscriminatorValue?: number | string
optionalexpression?: string | (em: any, where: FilterQuery<T>, options: FindOptions<T, any, any, any>) => object
optionalforceConstructor?: boolean
optionalreadonly?: boolean
optionalrepository?: () => Constructor
Returns Constructor
optionalschema?: string
optionaltableName?: string
optionalvirtual?: boolean
EntityProps
Type parameters
- T
EntityRef
EntitySchemaMetadata
Type parameters
- Entity
- Base = never
EntitySchemaProperty
Type parameters
- Target
- Owner
EntityType
Type parameters
- T
EntityValue
Type parameters
- T
ExpandHint
Type parameters
- T
- L: string
ExpandProperty
Type parameters
- T
ExpandQuery
Type parameters
- T
ExpandScalar
Type parameters
- T
FilterItemValue
Type parameters
- T
FilterKey
Type parameters
- T
FilterObject
Type parameters
- T
FilterOptions
FilterQuery
Type parameters
- T
FilterValue
Type parameters
- T
FromEntityType
Type parameters
- T
GetRepository
Type parameters
- Entity: {}
- Fallback
Hidden
Type parameters
- T = unknown
IPrimaryKey
Type parameters
- T: IPrimaryKeyValue = IPrimaryKeyValue
IType
Type parameters
- Runtime
- Raw
- Serialized = Raw
ImportsResolver
Type declaration
Parameters
alias: string
basePath: string
extension: .js |
originFileName: string
Returns { name: string; path: string } | undefined
IsSubset
Type parameters
- T
- U
IsUnknown
Type parameters
- T
Loaded
Represents entity with its loaded relations (populate
hint) and selected properties (fields
hint).
Type parameters
- T
- L: string = never
- F: string = *
- E: string = never
LoggerNamespace
LoggingOptions
Logger options to modify format output and overrides, including a label and additional properties that can be accessed by custom loggers.
Differs from LoggerOptions in terms of how they are used; this type is primarily a public type meant to be used within methods like em.find()
.
MergeLoaded
Type parameters
- T
- U
- P: string
- F: string
- E: string
- R: boolean = false
MergeSelected
Type parameters
- T
- U
- F: string
MetadataProcessor
Type declaration
Parameters
metadata: EntityMetadata[]
platform: Platform
Returns MaybePromise<void>
MigrateOptions
Type declaration
optionalfrom?: string | number
optionalmigrations?: string[]
optionalto?: string | number
optionaltransaction?: Transaction
MigrationResult
Type declaration
code: string
diff: MigrationDiff
fileName: string
MigrationRow
Type declaration
executed_at: Date
name: string
MigrationsOptions
Type declaration
optionalallOrNothing?: boolean
optionaldisableForeignKeys?: boolean
optionaldropTables?: boolean
optionalemit?: js | ts | cjs
optionalfileName?: (timestamp: string, name?: string) => string
Parameters
timestamp: string
optionalname: string
Returns string
optionalgenerator?: Constructor<IMigrationGenerator>
optionalglob?: string
optionalmigrationsList?: (MigrationObject | Constructor<Migration>)[]
optionalpath?: string
optionalpathTs?: string
optionalsafe?: boolean
optionalsilent?: boolean
optionalsnapshot?: boolean
optionalsnapshotName?: string
optionaltableName?: string
optionaltransactional?: boolean
New
Type parameters
- T
- P: string = string
NoInfer
Type parameters
- T
ObjectQuery
Type parameters
- T
Opt
Type parameters
- T = unknown
Options
Type parameters
- D: IDatabaseDriver = IDatabaseDriver
- EM: D[typeof EntityManagerType] & EntityManager = D[typeof EntityManagerType] & EntityManager
OrderDefinition
Type parameters
- T
Populate
Type parameters
- T
- P: string = never
PopulateOptions
Type parameters
- T
Type declaration
optionalall?: boolean
optionalchildren?: PopulateOptions<T[keyof T]>[]
field: EntityKey<T>
optionalfilter?: boolean
optionalstrategy?: LoadStrategy
Primary
Type parameters
- T
PrimaryProperty
Type parameters
- T
QBFilterQuery
Type parameters
- T = any
QBQueryOrderMap
Type parameters
- T
QueryOrderKeys
Type parameters
- T
QueryOrderKeysFlat
QueryOrderMap
Type parameters
- T
Ref
Ref type represents a Reference
instance, and adds the primary keys to its prototype automatically, so you can do
ref.id
instead of ref.unwrap().id
. It resolves to either ScalarRef
or EntityRef
, based on the type argument.
Type parameters
- T
Rel
Identity type that can be used to get around issues with cycles in bidirectional relations. It will disable reflect-metadata inference.
Type parameters
- T
RequiredEntityData
Type parameters
- T
- I = never
- C: boolean = false
Scalar
ScalarRef
Selected
Type parameters
- T
- L: string = never
- F: string = *
Transaction
Type parameters
- T = any
TransactionEventType
UmzugMigration
Type declaration
name: string
optionalpath?: string
UnboxArray
Type parameters
- T
Variables
constARRAY_OPERATORS
constConfig
constEagerProps
constEntityManagerType
constEntityRepositoryType
constEventTypeMap
constHiddenProps
constJSON_KEY_OPERATORS
constJsonProperty
constObjectBindingPattern
constOptionalProps
constPrimaryKeyProp
constSCALAR_TYPES
constt
Type declaration
readonlyarray: typeof ArrayType
readonlybigint: typeof BigIntType
readonlyblob: typeof BlobType
readonlyboolean: typeof BooleanType
readonlycharacter: typeof CharacterType
readonlydate: typeof DateType
readonlydatetime: typeof DateTimeType
readonlydecimal: typeof DecimalType
readonlydouble: typeof DoubleType
readonlyenum: typeof EnumType
readonlyenumArray: typeof EnumArrayType
readonlyfloat: typeof FloatType
readonlyinteger: typeof IntegerType
readonlyinterval: typeof IntervalType
readonlyjson: typeof JsonType
readonlymediumint: typeof MediumIntType
readonlysmallint: typeof SmallIntType
readonlystring: typeof StringType
readonlytext: typeof TextType
readonlytime: typeof TimeType
readonlytinyint: typeof TinyIntType
readonlyuint8array: typeof Uint8ArrayType
readonlyunknown: typeof UnknownType
readonlyuuid: typeof UuidType
consttypes
Type declaration
readonlyarray: typeof ArrayType
readonlybigint: typeof BigIntType
readonlyblob: typeof BlobType
readonlyboolean: typeof BooleanType
readonlycharacter: typeof CharacterType
readonlydate: typeof DateType
readonlydatetime: typeof DateTimeType
readonlydecimal: typeof DecimalType
readonlydouble: typeof DoubleType
readonlyenum: typeof EnumType
readonlyenumArray: typeof EnumArrayType
readonlyfloat: typeof FloatType
readonlyinteger: typeof IntegerType
readonlyinterval: typeof IntervalType
readonlyjson: typeof JsonType
readonlymediumint: typeof MediumIntType
readonlysmallint: typeof SmallIntType
readonlystring: typeof StringType
readonlytext: typeof TextType
readonlytime: typeof TimeType
readonlytinyint: typeof TinyIntType
readonlyuint8array: typeof Uint8ArrayType
readonlyunknown: typeof UnknownType
readonlyuuid: typeof UuidType
With
absolute
the prefix is set at the root of the entity (regardless of the nesting level)