# Mikro Orm > [![Martin Adámek](https://avatars1.githubusercontent.com/u/615580?s=460\&v=4)](https://github.com/B4nan) --- # Source: https://mikro-orm.io/blog/tags/typescript/page/2.md # Source: https://mikro-orm.io/blog/tags/sql/page/2.md # Source: https://mikro-orm.io/blog/tags/node/page/2.md # Source: https://mikro-orm.io/blog/tags/javascript/page/2.md # Source: https://mikro-orm.io/blog/page/2.md ## [MikroORM 3: Knex.js, CLI, Schema Updates, Entity Generator and more…](https://mikro-orm.io/blog/mikro-orm-3-released.md) · 11 min read [![Martin Adámek](https://avatars1.githubusercontent.com/u/615580?s=460\&v=4)](https://github.com/B4nan) [Martin Adámek](https://github.com/B4nan) Author of MikroORM New major version of the TypeScript ORM has been released, read about its new features and breaking changes. **Tags:** * [typescript](https://mikro-orm.io/blog/tags/typescript.md) * [javascript](https://mikro-orm.io/blog/tags/javascript.md) * [node](https://mikro-orm.io/blog/tags/node.md) * [sql](https://mikro-orm.io/blog/tags/sql.md) [**Read More**](https://mikro-orm.io/blog/mikro-orm-3-released.md) --- # Source: https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md # abstractAbstractNamingStrategy ### Hierarchy * *AbstractNamingStrategy* * [MongoNamingStrategy](https://mikro-orm.io/api/core/class/MongoNamingStrategy.md) * [UnderscoreNamingStrategy](https://mikro-orm.io/api/core/class/UnderscoreNamingStrategy.md) * [EntityCaseNamingStrategy](https://mikro-orm.io/api/core/class/EntityCaseNamingStrategy.md) ### Implements * [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**aliasName](#aliasName) * [**classToMigrationName](#classToMigrationName) * [**classToTableName](#classToTableName) * [**columnNameToProperty](#columnNameToProperty) * [**enumValueToEnumProperty](#enumValueToEnumProperty) * [**getClassName](#getClassName) * [**getEntityName](#getEntityName) * [**getEnumClassName](#getEnumClassName) * [**getEnumTypeName](#getEnumTypeName) * [**indexName](#indexName) * [**inverseSideName](#inverseSideName) * [**joinColumnName](#joinColumnName) * [**joinKeyColumnName](#joinKeyColumnName) * [**joinTableName](#joinTableName) * [**propertyToColumnName](#propertyToColumnName) * [**referenceColumnName](#referenceColumnName) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new AbstractNamingStrategy**(): [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) - #### Returns [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) ## Methods[**](#Methods) ### [**](#aliasName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L85)aliasName * ****aliasName**(entityName, index): string - Implementation of NamingStrategy.aliasName Returns alias name for given entity. The alias needs to be unique across the query, which is by default ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique. *** #### Parameters * ##### entityName: string * ##### index: number #### Returns string ### [**](#classToMigrationName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L15)classToMigrationName * ****classToMigrationName**(timestamp, customMigrationName): string - Implementation of NamingStrategy.classToMigrationName Return a migration name. This name should allow ordering. *** #### Parameters * ##### timestamp: string * ##### optionalcustomMigrationName: string #### Returns string ### [**](#classToTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L107)abstractclassToTableName * ****classToTableName**(entityName): string - Implementation of NamingStrategy.classToTableName Return a table name for an entity class *** #### Parameters * ##### entityName: string #### Returns string ### [**](#columnNameToProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L56)columnNameToProperty * ****columnNameToProperty**(columnName): string - Implementation of NamingStrategy.columnNameToProperty Return a property for a column name (used in `EntityGenerator`). *** #### Parameters * ##### columnName: string #### Returns string ### [**](#enumValueToEnumProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L81)enumValueToEnumProperty * ****enumValueToEnumProperty**(enumValue, columnName, tableName, schemaName): string - Implementation of NamingStrategy.enumValueToEnumProperty Get an enum option name for a given enum value. *** #### Parameters * ##### enumValue: string The enum value to generate a name for. * ##### columnName: string The column name which has the enum. * ##### tableName: string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string The name of the enum property that will hold the value. ### [**](#getClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L8)getClassName * ****getClassName**(file, separator): string - Implementation of NamingStrategy.getClassName Return a name of the class based on its file name *** #### Parameters * ##### file: string * ##### separator: string = '-' #### Returns string ### [**](#getEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L51)getEntityName * ****getEntityName**(tableName, schemaName): string - Implementation of NamingStrategy.getEntityName Return a name of the entity class based on database table name (used in `EntityGenerator`). Default implementation ignores the schema name. *** #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getEnumClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L67)getEnumClassName * ****getEnumClassName**(columnName, tableName, schemaName): string - Implementation of NamingStrategy.getEnumClassName Get an enum class name. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new class name that will be used for the enum. ### [**](#getEnumTypeName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L74)getEnumTypeName * ****getEnumTypeName**(columnName, tableName, schemaName): string - Implementation of NamingStrategy.getEnumTypeName Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new type name that will be used for the enum. ### [**](#indexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L25)indexName * ****indexName**(tableName, columns, type): string - Implementation of NamingStrategy.indexName Returns key/constraint name for the given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name). *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | check | foreign | sequence #### Returns string ### [**](#inverseSideName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L93)inverseSideName * ****inverseSideName**(entityName, propertyName, kind): string - Implementation of NamingStrategy.inverseSideName Returns the name of the inverse side property. Used in the `EntityGenerator` with `bidirectionalRelations` option. *** #### Parameters * ##### entityName: string * ##### propertyName: string * ##### kind: [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) #### Returns string ### [**](#joinColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L109)abstractjoinColumnName * ****joinColumnName**(propertyName): string - Implementation of NamingStrategy.joinColumnName Return a join column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#joinKeyColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L111)abstractjoinKeyColumnName * ****joinKeyColumnName**(entityName, referencedColumnName): string - Implementation of NamingStrategy.joinKeyColumnName Return the foreign key column name for the given parameters *** #### Parameters * ##### entityName: string * ##### optionalreferencedColumnName: string #### Returns string ### [**](#joinTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L113)abstractjoinTableName * ****joinTableName**(sourceEntity, targetEntity, propertyName): string - Implementation of NamingStrategy.joinTableName Return a join table name *** #### Parameters * ##### sourceEntity: string * ##### targetEntity: string * ##### optionalpropertyName: string #### Returns string ### [**](#propertyToColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L115)abstractpropertyToColumnName * ****propertyToColumnName**(propertyName, object): string - Implementation of NamingStrategy.propertyToColumnName Return a column name for a property *** #### Parameters * ##### propertyName: string * ##### optionalobject: boolean #### Returns string ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L117)abstractreferenceColumnName * ****referenceColumnName**(): string - Implementation of NamingStrategy.referenceColumnName Return the default reference column name *** #### Returns string --- # Source: https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md # abstractAbstractSchemaGenerator \ ### Hierarchy * *AbstractSchemaGenerator* * [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) * [MongoSchemaGenerator](https://mikro-orm.io/api/mongodb/class/MongoSchemaGenerator.md) ### Implements * [ISchemaGenerator](https://mikro-orm.io/api/core/interface/ISchemaGenerator.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clearDatabase](#clearDatabase) * [**createDatabase](#createDatabase) * [**createSchema](#createSchema) * [**dropDatabase](#dropDatabase) * [**dropSchema](#dropSchema) * [**ensureDatabase](#ensureDatabase) * [**ensureIndexes](#ensureIndexes) * [**execute](#execute) * [**getCreateSchemaSQL](#getCreateSchemaSQL) * [**getDropSchemaSQL](#getDropSchemaSQL) * [**getUpdateSchemaMigrationSQL](#getUpdateSchemaMigrationSQL) * [**getUpdateSchemaSQL](#getUpdateSchemaSQL) * [**refreshDatabase](#refreshDatabase) * [**updateSchema](#updateSchema) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L26)constructor * ****new AbstractSchemaGenerator**\(em): [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md)\ - #### Parameters * ##### em: D | ReturnType\ #### Returns [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md)\ ## Methods[**](#Methods) ### [**](#clearDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L59)clearDatabase * ****clearDatabase**(options): Promise\ - Implementation of ISchemaGenerator.clearDatabase #### Parameters * ##### optionaloptions: [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) #### Returns Promise\ ### [**](#createDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L106)createDatabase * ****createDatabase**(name): Promise\ - Implementation of ISchemaGenerator.createDatabase creates new database and connects to it *** #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#createSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L35)createSchema * ****createSchema**(options): Promise\ - Implementation of ISchemaGenerator.createSchema #### Parameters * ##### optionaloptions: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) #### Returns Promise\ ### [**](#dropDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L110)dropDatabase * ****dropDatabase**(name): Promise\ - Implementation of ISchemaGenerator.dropDatabase #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#dropSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L83)dropSchema * ****dropSchema**(options): Promise\ - Implementation of ISchemaGenerator.dropSchema #### Parameters * ##### optionaloptions: [DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md) #### Returns Promise\ ### [**](#ensureDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L42)ensureDatabase * ****ensureDatabase**(options): Promise\ - Implementation of ISchemaGenerator.ensureDatabase Returns true if the database was created. *** #### Parameters * ##### optionaloptions: [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) #### Returns Promise\ ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L118)ensureIndexes * ****ensureIndexes**(): Promise\ - Implementation of ISchemaGenerator.ensureIndexes #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L114)execute * ****execute**(query): Promise\ - Implementation of ISchemaGenerator.execute #### Parameters * ##### query: string #### Returns Promise\ ### [**](#getCreateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L79)getCreateSchemaSQL * ****getCreateSchemaSQL**(options): Promise\ - Implementation of ISchemaGenerator.getCreateSchemaSQL #### Parameters * ##### optionaloptions: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) #### Returns Promise\ ### [**](#getDropSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L87)getDropSchemaSQL * ****getDropSchemaSQL**(options): Promise\ - Implementation of ISchemaGenerator.getDropSchemaSQL #### Parameters * ##### optionaloptions: Omit<[DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md), dropDb> #### Returns Promise\ ### [**](#getUpdateSchemaMigrationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L99)getUpdateSchemaMigrationSQL * ****getUpdateSchemaMigrationSQL**(options): Promise<{ down: string; up: string }> - Implementation of ISchemaGenerator.getUpdateSchemaMigrationSQL #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise<{ down: string; up: string }> ### [**](#getUpdateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L95)getUpdateSchemaSQL * ****getUpdateSchemaSQL**(options): Promise\ - Implementation of ISchemaGenerator.getUpdateSchemaSQL #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise\ ### [**](#refreshDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L46)refreshDatabase * ****refreshDatabase**(options): Promise\ - Implementation of ISchemaGenerator.refreshDatabase #### Parameters * ##### optionaloptions: [RefreshDatabaseOptions](https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md) #### Returns Promise\ ### [**](#updateSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L91)updateSchema * ****updateSchema**(options): Promise\ - Implementation of ISchemaGenerator.updateSchema #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise\ --- # Source: https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md # abstractAbstractSqlConnection ### Hierarchy * [Connection](https://mikro-orm.io/api/core/class/Connection.md) * *AbstractSqlConnection* * [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) * [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) * [PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md) * [MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new AbstractSqlConnection**(config, options, type): [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) - Overrides Connection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)begin * ****begin**(options): Promise\> - Overrides Connection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)checkConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Overrides Connection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)close * ****close**(force): Promise\ - Overrides Connection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)commit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Overrides Connection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L42)connect * ****connect**(): void | Promise\ - Overrides Connection.connect Establishes connection to database *** #### Returns void | Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L39)abstractcreateKnex * ****createKnex**(): void - #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from Connection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)execute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Overrides Connection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L118)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from Connection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L91)inheritedgetConnectionOptions * ****getConnectionOptions**(): [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - Inherited from Connection.getConnectionOptions #### Returns [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L71)abstractinheritedgetDefaultClientUrl * ****getDefaultClientUrl**(): string - Inherited from Connection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)getKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from Connection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)isConnected * ****isConnected**(): Promise\ - Overrides Connection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L197)loadFile * ****loadFile**(path): Promise\ - Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)rollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Overrides Connection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from Connection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from Connection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)transactional * ****transactional**\(cb, options): Promise\ - Overrides Connection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md # abstractAbstractSqlDriver \ ### Hierarchy * [DatabaseDriver](https://mikro-orm.io/api/core/class/DatabaseDriver.md)\ * *AbstractSqlDriver* * [PostgreSqlDriver](https://mikro-orm.io/api/postgresql/class/PostgreSqlDriver.md) * [MySqlDriver](https://mikro-orm.io/api/mysql/class/MySqlDriver.md) * [MariaDbDriver](https://mikro-orm.io/api/mariadb/class/MariaDbDriver.md) * [SqliteDriver](https://mikro-orm.io/api/sqlite/class/SqliteDriver.md) * [BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md) * [LibSqlDriver](https://mikro-orm.io/api/libsql/class/LibSqlDriver.md) * [MsSqlDriver](https://mikro-orm.io/api/mssql/class/MsSqlDriver.md) ## Index[**](#Index) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)\> Overrides DatabaseDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from DatabaseDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from DatabaseDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from DatabaseDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise\ - Inherited from DatabaseDriver.connect #### Returns Promise\ ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from DatabaseDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)count * ****count**\(entityName, where, options): Promise\ - Overrides DatabaseDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)countVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Overrides DatabaseDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)createEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Overrides DatabaseDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)execute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)find * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Overrides DatabaseDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)findOne * ****findOne**\(entityName, where, options): Promise\> - Overrides DatabaseDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)findVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Overrides DatabaseDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): Connection - Inherited from DatabaseDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns Connection ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from DatabaseDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from DatabaseDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)getPlatform * ****getPlatform**(): Platform - Overrides DatabaseDriver.getPlatform #### Returns Platform ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)loadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Overrides DatabaseDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)lockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Overrides DatabaseDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)mapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Overrides DatabaseDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)nativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)nativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L511)nativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)nativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L720)nativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise\ - Inherited from DatabaseDriver.reconnect #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from DatabaseDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)syncCollections * ****syncCollections**\(collections, options): Promise\ - Overrides DatabaseDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md # abstractAbstractSqlPlatform ### Hierarchy * [Platform](https://mikro-orm.io/api/core/class/Platform.md) * *AbstractSqlPlatform* * [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) * [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) * [PostgreSqlPlatform](https://mikro-orm.io/api/postgresql/class/PostgreSqlPlatform.md) * [MsSqlPlatform](https://mikro-orm.io/api/mssql/class/MsSqlPlatform.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new AbstractSqlPlatform**(): [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) - Inherited from Platform.constructor #### Returns [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from Platform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from Platform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from Platform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from Platform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from Platform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from Platform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from Platform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from Platform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L388)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from Platform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from Platform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L81)escape * ****escape**(value): string - Overrides Platform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from Platform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from Platform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)generateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Overrides Platform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from Platform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L37)getBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from Platform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from Platform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L208)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from Platform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L232)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from Platform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)getCommitTransactionSQL * ****getCommitTransactionSQL**(): string - #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from Platform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L140)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from Platform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L144)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from Platform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from Platform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from Platform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from Platform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from Platform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from Platform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Platform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L582)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from Platform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from Platform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from Platform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from Platform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from Platform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L248)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from Platform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from Platform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from Platform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L256)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from Platform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from Platform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L376)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(prop): string - Inherited from Platform.getFullTextWhereClause #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L577)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from Platform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L212)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from Platform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from Platform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from Platform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L100)getJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Overrides Platform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Platform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from Platform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from Platform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from Platform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from Platform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)getReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)getRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Overrides Platform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)getRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)getRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)getSavepointSQL * ****getSavepointSQL**(savepointName): string - #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)getSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Overrides Platform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)getSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Overrides Platform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)getSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Overrides Platform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)getSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Overrides Platform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from Platform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from Platform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from Platform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from Platform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from Platform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L224)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from Platform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from Platform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L236)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from Platform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)indexForeignKeys * ****indexForeignKeys**(): boolean - Overrides Platform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from Platform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from Platform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from Platform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from Platform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from Platform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)isRaw * ****isRaw**(value): boolean - Overrides Platform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)lookupExtensions * ****lookupExtensions**(orm): void - Overrides Platform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from Platform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L283)inheritednormalizeColumnType * ****normalizeColumnType**(type, options): string - Inherited from Platform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from Platform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from Platform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from Platform.processDateProperty #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from Platform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L65)quoteValue * ****quoteValue**(value): string - Overrides Platform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from Platform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from Platform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from Platform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from Platform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from Platform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from Platform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from Platform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from Platform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from Platform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)supportsSchemas * ****supportsSchemas**(): boolean - #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from Platform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from Platform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from Platform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from Platform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from Platform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from Platform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from Platform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from Platform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from Platform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from Platform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)usesPivotTable * ****usesPivotTable**(): boolean - Overrides Platform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L65)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from Platform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from Platform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/core/function/AfterCreate.md # AfterCreate ### Callable * ****AfterCreate**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/AfterDelete.md # AfterDelete ### Callable * ****AfterDelete**(): (target, method) => void *** * Called after deleting entity, but only when providing initialized entity to EM#remove() *** #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/AfterUpdate.md # AfterUpdate ### Callable * ****AfterUpdate**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/AfterUpsert.md # AfterUpsert ### Callable * ****AfterUpsert**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/knex/interface/Alias.md # Alias \ ## Index[**](#Index) ### Properties * [**aliasName](#aliasName) * [**entityName](#entityName) * [**metadata](#metadata) * [**subQuery](#subQuery) ## Properties[**](#Properties) ### [**](#aliasName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilderHelper.ts#L983)aliasName **aliasName: string ### [**](#entityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilderHelper.ts#L984)entityName **entityName: string ### [**](#metadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilderHelper.ts#L985)optionalmetadata **metadata? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#subQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilderHelper.ts#L986)optionalsubQuery **subQuery? : QueryBuilder\ --- # Source: https://mikro-orm.io/api/core/class/ArrayCollection.md # ArrayCollection \ ### Hierarchy * *ArrayCollection* * [Collection](https://mikro-orm.io/api/core/class/Collection.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**owner](#owner) ### Accessors * [**length](#length) ### Methods * [**\[iterator\]](#\[iterator]) * [**add](#add) * [**contains](#contains) * [**count](#count) * [**exists](#exists) * [**filter](#filter) * [**find](#find) * [**getIdentifiers](#getIdentifiers) * [**getItems](#getItems) * [**indexBy](#indexBy) * [**isDirty](#isDirty) * [**isEmpty](#isEmpty) * [**isInitialized](#isInitialized) * [**isPartial](#isPartial) * [**loadCount](#loadCount) * [**map](#map) * [**reduce](#reduce) * [**remove](#remove) * [**removeAll](#removeAll) * [**set](#set) * [**setDirty](#setDirty) * [**slice](#slice) * [**toArray](#toArray) * [**toJSON](#toJSON) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L19)constructor * ****new ArrayCollection**\(owner, items): [ArrayCollection](https://mikro-orm.io/api/core/class/ArrayCollection.md)\ - #### Parameters * ##### owner: O * ##### optionalitems: T\[] #### Returns [ArrayCollection](https://mikro-orm.io/api/core/class/ArrayCollection.md)\ ## Properties[**](#Properties) ### [**](#owner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L19)readonlyowner **owner: O ## Accessors[**](#Accessors) ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L367)length * **get length(): number - #### Returns number ## Methods[**](#Methods) ### [**](#\[iterator])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L371)\[iterator] * ****\[iterator]**(): IterableIterator\ - #### Returns IterableIterator\ ### [**](#add)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L78)add * ****add**(entity, ...entities): void - #### Parameters * ##### entity: T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> * ##### rest...entities: (T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\)\[] #### Returns void ### [**](#contains)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L210)contains * ****contains**(item, check): boolean - #### Parameters * ##### item: T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ * ##### optionalcheck: boolean #### Returns boolean ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L333)count * ****count**(): number - #### Returns number ### [**](#exists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L242)exists * ****exists**(cb): boolean - Tests for the existence of an element that satisfies the given predicate. *** #### Parameters * ##### cb: (item) => boolean #### Returns boolean ### [**](#filter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L270)filter * ****filter**(cb): T\[] - Extracts a subset of the collection items. *** #### Parameters * ##### cb: (item, index) => boolean #### Returns T\[] ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L255)find * ****find**(cb): undefined | T - Returns the first element of this collection that satisfies the predicate. *** #### Parameters * ##### cb: (item, index) => boolean #### Returns undefined | T ### [**](#getIdentifiers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L51)getIdentifiers * ****getIdentifiers**\(field): U\[] - #### Parameters * ##### optionalfield: string | string\[] #### Returns U\[] ### [**](#getItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L32)getItems * ****getItems**(): T\[] - #### Returns T\[] ### [**](#indexBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L314)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L320)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L326)indexBy * ****indexBy**\(key): Record\ * ****indexBy**\(key, valueKey): Record\ - Maps the collection items to a dictionary, indexed by the key you specify. If there are more items with the same key, only the first one will be present. *** #### Parameters * ##### key: K1 #### Returns Record\ ### [**](#isDirty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L351)isDirty * ****isDirty**(): boolean - #### Returns boolean ### [**](#isEmpty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L359)isEmpty * ****isEmpty**(): boolean - #### Returns boolean ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L337)isInitialized * ****isInitialized**(fully): boolean - #### Parameters * ##### fully: boolean = false #### Returns boolean ### [**](#isPartial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L355)isPartial * ****isPartial**(): boolean - #### Returns boolean ### [**](#loadCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L28)loadCount * ****loadCount**(): Promise\ - #### Returns Promise\ ### [**](#map)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L286)map * ****map**\(mapper): R\[] - Maps the collection items based on your provided mapper function. *** #### Parameters * ##### mapper: (item, index) => R #### Returns R\[] ### [**](#reduce)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L300)reduce * ****reduce**\(cb, initial): R - Maps the collection items based on your provided mapper function to a single object. *** #### Parameters * ##### cb: (obj, item, index) => R * ##### initial: R = ... #### Returns R ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L157)remove * ****remove**(entity, ...entities): void - Remove specified item(s) from the collection. Note that removing item from collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. *** #### Parameters * ##### entity: T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> * ##### rest...entities: (T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\)\[] #### Returns void ### [**](#removeAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L187)removeAll * ****removeAll**(): void - Remove all items from the collection. Note that removing items from collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. *** #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L105)set * ****set**(items): void - #### Parameters * ##### items: Iterable\, any, any> #### Returns void ### [**](#setDirty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L363)setDirty * ****setDirty**(dirty): void - #### Parameters * ##### dirty: boolean = true #### Returns void ### [**](#slice)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L219)slice * ****slice**(start, end): T\[] - Extracts a slice of the collection items starting at position start to end (exclusive) of the collection. If end is null it returns all elements from start to the end of the collection. *** #### Parameters * ##### start: number = 0 * ##### optionalend: number #### Returns T\[] ### [**](#toArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L36)toArray * ****toArray**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L47)toJSON * ****toJSON**(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] --- # Source: https://mikro-orm.io/api/core/class/ArrayType.md # ArrayType \ ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *ArrayType* * [EnumArrayType](https://mikro-orm.io/api/core/class/EnumArrayType.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L9)constructor * ****new ArrayType**\(toJsValue, toDbValue): [ArrayType](https://mikro-orm.io/api/core/class/ArrayType.md)\ - Overrides Type.constructor #### Parameters * ##### toJsValue: (i) => T = ... * ##### toDbValue: (i) => string = ... #### Returns [ArrayType](https://mikro-orm.io/api/core/class/ArrayType.md)\ ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L45)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | string * ##### b: null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L16)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): null | string - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: null | T\[] * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L33)convertToJSValue * ****convertToJSValue**(value, platform): null | T\[] - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: null | string | T\[] * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns null | T\[] ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L53)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L49)toJSON * ****toJSON**(value): T\[] - Overrides Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: T\[] #### Returns T\[] ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/AssignOptions.md # AssignOptions \ ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**em](#em) * [**ignoreUndefined](#ignoreUndefined) * [**merge](#merge) * [**mergeEmbeddedProperties](#mergeEmbeddedProperties) * [**mergeObjectProperties](#mergeObjectProperties) * [**onlyOwnProperties](#onlyOwnProperties) * [**onlyProperties](#onlyProperties) * [**schema](#schema) * [**updateByPrimaryKey](#updateByPrimaryKey) * [**updateNestedEntities](#updateNestedEntities) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L350)optionalconvertCustomTypes **convertCustomTypes? : Convert `assign` excepts runtime values for properties using custom types. To be able to assign raw database values, you can enable the `convertCustomTypes` option. Defaults to `false`. ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L386)optionalem **em? : [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> When using the static `assign()` helper, you can pass the EntityManager instance explicitly via the `em` option. This is only needed when you try to assign a relation property. The value is automatically inferred from the target entity when it is managed, or when you use `em.assign()` instead. ### [**](#ignoreUndefined)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L344)optionalignoreUndefined **ignoreUndefined? : boolean With `ignoreUndefined` enabled, `undefined` properties passed in the payload are skipped. Defaults to `false`. ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L371)optionalmerge **merge? : boolean When assigning to a relation property, if the value is a POJO and `updateByPrimaryKey` is enabled, we check if the target exists in the identity map based on its primary key and call `assign` on it recursively. If there is no primary key provided, or the entity is not present in the context, such an entity is considered as new (resulting in `INSERT` query), created via `em.create()`. You can use `merge: true` to use `em.merge()` instead, which means there won't be any query used for persisting the relation. Defaults to `false`. ### [**](#mergeEmbeddedProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L362)optionalmergeEmbeddedProperties **mergeEmbeddedProperties? : boolean When assigning to an embedded property, the values are deeply merged with the existing data. Use `mergeEmbeddedProperties: false` to replace them instead. Defaults to `true`. ### [**](#mergeObjectProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L356)optionalmergeObjectProperties **mergeObjectProperties? : boolean When assigning to a JSON property, the value is replaced. Use `mergeObjectProperties: true` to enable deep merging of the payload with the existing value. Defaults to `false`. ### [**](#onlyOwnProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L339)optionalonlyOwnProperties **onlyOwnProperties? : boolean With `onlyOwnProperties` enabled, inverse sides of to-many relations are skipped, and payloads of other relations are converted to foreign keys. Defaults to `false`. ### [**](#onlyProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L333)optionalonlyProperties **onlyProperties? : boolean When you have some properties in the payload that are not represented by an entity property mapping, you can skip such unknown properties via `onlyProperties: true`. Defaults to `false`. ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L379)optionalschema **schema? : string When assigning to a to-many relation properties (`Collection`) with `updateNestedEntities` and `updateByPrimaryKey` enabled (default), you can use this option to override the relation schema. This is used only when trying to find the entity reference in the current context. If it is not found, we create the relation entity using the target entity schema. The value is automatically inferred from the target entity. ### [**](#updateByPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L327)optionalupdateByPrimaryKey **updateByPrimaryKey? : boolean When assigning to a relation property with object payload and `updateNestedEntities` enabled (default), you can control how a payload without a primary key is handled. By default, it is considered as a new object, resulting in an `INSERT` query. Use `updateByPrimaryKey: false` to allow assigning the data on an existing relation instead. Defaults to `true`. ### [**](#updateNestedEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L319)optionalupdateNestedEntities **updateNestedEntities? : boolean Allows disabling processing of nested relations. When disabled, an object payload in place of a relation always results in an `INSERT` query. To assign a value of the relation, use the foreign key instead of an object. Defaults to `true`. --- # Source: https://mikro-orm.io/api/core/class/BaseEntity.md # abstractBaseEntity ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**assign](#assign) * [**getSchema](#getSchema) * [**init](#init) * [**isInitialized](#isInitialized) * [**isTouched](#isTouched) * [**populate](#populate) * [**populated](#populated) * [**serialize](#serialize) * [**setSchema](#setSchema) * [**toObject](#toObject) * [**toPOJO](#toPOJO) * [**toReference](#toReference) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BaseEntity**(): [BaseEntity](https://mikro-orm.io/api/core/class/BaseEntity.md) - #### Returns [BaseEntity](https://mikro-orm.io/api/core/class/BaseEntity.md) ## Methods[**](#Methods) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L54)assign * ****assign**\(data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> - #### Parameters * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### options: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ = {} #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> ### [**](#getSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L72)getSchema * ****getSchema**(): undefined | string - #### Returns undefined | string ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L63)init * ****init**\(options): Promise\> - #### Parameters * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L11)isInitialized * ****isInitialized**(): boolean - #### Returns boolean ### [**](#isTouched)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L15)isTouched * ****isTouched**(): boolean - #### Returns boolean ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L23)populate * ****populate**\(populate, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - #### Parameters * ##### populate: false | [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] * ##### options: [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ = {} #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L19)populated * ****populated**(populated): void - #### Parameters * ##### populated: boolean = true #### Returns void ### [**](#serialize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L45)serialize * ****serialize**\(options): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - #### Parameters * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#setSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L76)setSchema * ****setSchema**(schema): void - #### Parameters * ##### optionalschema: string #### Returns void ### [**](#toObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L34)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L35)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L36)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L37)toObject * ****toObject**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ * ****toObject**\(ignoreFields): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ * ****toObject**\(ignoreFields): Omit<[EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\, Ignored> - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ ### [**](#toPOJO)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L41)toPOJO * ****toPOJO**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ ### [**](#toReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L30)toReference * ****toReference**\(): [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> - #### Returns [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> --- # Source: https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md # abstractBaseSqliteConnection ### Hierarchy * [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * *BaseSqliteConnection* * [SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md) * [BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md) * [LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new BaseSqliteConnection**(config, options, type): [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) - Inherited from AbstractSqlConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from AbstractSqlConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from AbstractSqlConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L9)connect * ****connect**(): Promise\ - Overrides AbstractSqlConnection.connect Establishes connection to database *** #### Returns Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L39)abstractinheritedcreateKnex * ****createKnex**(): void - Inherited from AbstractSqlConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from AbstractSqlConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L24)getClientUrl * ****getClientUrl**(): string - Overrides AbstractSqlConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L91)inheritedgetConnectionOptions * ****getConnectionOptions**(): [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - Inherited from AbstractSqlConnection.getConnectionOptions #### Returns [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L20)getDefaultClientUrl * ****getDefaultClientUrl**(): string - Overrides AbstractSqlConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from AbstractSqlConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from AbstractSqlConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from AbstractSqlConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L28)loadFile * ****loadFile**(path): Promise\ - Overrides AbstractSqlConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from AbstractSqlConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from AbstractSqlConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md # abstractBaseSqlitePlatform ### Hierarchy * [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) * *BaseSqlitePlatform* * [SqlitePlatform](https://mikro-orm.io/api/sqlite/class/SqlitePlatform.md) * [BetterSqlitePlatform](https://mikro-orm.io/api/better-sqlite/class/BetterSqlitePlatform.md) * [LibSqlPlatform](https://mikro-orm.io/api/libsql/class/LibSqlPlatform.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BaseSqlitePlatform**(): [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) - Inherited from AbstractSqlPlatform.constructor #### Returns [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from AbstractSqlPlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from AbstractSqlPlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from AbstractSqlPlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from AbstractSqlPlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from AbstractSqlPlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from AbstractSqlPlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L73)convertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Overrides AbstractSqlPlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from AbstractSqlPlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L81)inheritedescape * ****escape**(value): string - Inherited from AbstractSqlPlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from AbstractSqlPlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from AbstractSqlPlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from AbstractSqlPlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L22)getBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Overrides AbstractSqlPlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L51)getBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L55)getCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from AbstractSqlPlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L14)getCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Overrides AbstractSqlPlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### length: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L18)getDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length: number } * ##### length: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from AbstractSqlPlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from AbstractSqlPlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from AbstractSqlPlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L99)getDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Overrides AbstractSqlPlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from AbstractSqlPlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L26)getEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from AbstractSqlPlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from AbstractSqlPlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L47)getFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from AbstractSqlPlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L107)getFullTextWhereClause * ****getFullTextWhereClause**(): string - Overrides AbstractSqlPlatform.getFullTextWhereClause #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L91)getIndexName * ****getIndexName**(tableName, columns, type): string - Overrides AbstractSqlPlatform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L43)getIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L100)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from AbstractSqlPlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from AbstractSqlPlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from AbstractSqlPlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from AbstractSqlPlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from AbstractSqlPlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from AbstractSqlPlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from AbstractSqlPlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from AbstractSqlPlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from AbstractSqlPlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from AbstractSqlPlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from AbstractSqlPlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L39)getSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from AbstractSqlPlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from AbstractSqlPlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L35)getTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L59)getVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from AbstractSqlPlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from AbstractSqlPlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from AbstractSqlPlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from AbstractSqlPlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from AbstractSqlPlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from AbstractSqlPlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from AbstractSqlPlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from AbstractSqlPlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from AbstractSqlPlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L63)normalizeColumnType * ****normalizeColumnType**(type, options): string - Overrides AbstractSqlPlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from AbstractSqlPlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from AbstractSqlPlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L83)processDateProperty * ****processDateProperty**(value): string | number | Date - Overrides AbstractSqlPlatform.processDateProperty This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. We use this method to convert Dates to timestamps when computing the changeset, so we have the right data type in the payload as well as in original entity data. Without that, we would end up with diffs including all Date properties, as we would be comparing Date object with timestamp. *** #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from AbstractSqlPlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L119)quoteValue * ****quoteValue**(value): string - Overrides AbstractSqlPlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L111)quoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Overrides AbstractSqlPlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from AbstractSqlPlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from AbstractSqlPlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from AbstractSqlPlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from AbstractSqlPlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L103)supportsDownMigrations * ****supportsDownMigrations**(): boolean - Overrides AbstractSqlPlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from AbstractSqlPlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from AbstractSqlPlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from AbstractSqlPlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)inheritedsupportsSchemas * ****supportsSchemas**(): boolean - Inherited from AbstractSqlPlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from AbstractSqlPlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from AbstractSqlPlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from AbstractSqlPlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from AbstractSqlPlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from AbstractSqlPlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from AbstractSqlPlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L6)usesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Overrides AbstractSqlPlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from AbstractSqlPlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from AbstractSqlPlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from AbstractSqlPlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from AbstractSqlPlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L10)usesReturningStatement * ****usesReturningStatement**(): boolean - Overrides AbstractSqlPlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from AbstractSqlPlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md # abstractBaseSqliteSchemaHelper ### Hierarchy * [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) * *BaseSqliteSchemaHelper* * [SqliteSchemaHelper](https://mikro-orm.io/api/sqlite/class/SqliteSchemaHelper.md) * [BetterSqliteSchemaHelper](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteSchemaHelper.md) * [LibSqlSchemaHelper](https://mikro-orm.io/api/libsql/class/LibSqlSchemaHelper.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**isImplicitIndex](#isImplicitIndex) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new BaseSqliteSchemaHelper**(platform): [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) - Inherited from SchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from SchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from SchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from SchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from SchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from SchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from SchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from SchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from SchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from SchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L174)inheritedcreateTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Inherited from SchemaHelper.createTableColumn #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L196)databaseExists * ****databaseExists**(connection, name): Promise\ - Overrides SchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L8)disableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Overrides SchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from SchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L12)enableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Overrides SchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from SchemaHelper.finalizeTable #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from SchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from SchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L209)getAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Overrides SchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L236)inheritedgetChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Inherited from SchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L161)getChecks * ****getChecks**(connection, tableName, schemaName): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Overrides SchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L67)getColumns * ****getColumns**(connection, tableName, schemaName): Promise\ - Overrides SchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L192)getCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Overrides SchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from SchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from SchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from SchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)inheritedgetDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Inherited from SchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from SchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from SchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L34)getDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Overrides SchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L25)getDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Overrides SchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from SchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from SchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from SchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L105)getEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Overrides SchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### schemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from SchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L166)getForeignKeysSQL * ****getForeignKeysSQL**(tableName): string - Overrides SchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L131)getIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Overrides SchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L20)getListTablesSQL * ****getListTablesSQL**(): string - Overrides SchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L188)getManagementDbName * ****getManagementDbName**(): string - Overrides SchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)inheritedgetNamespaces * ****getNamespaces**(connection): Promise\ - Inherited from SchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)inheritedgetPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Inherited from SchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L224)inheritedgetPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Inherited from SchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L124)getPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Overrides SchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from SchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L119)inheritedgetRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - Inherited from SchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L151)inheritedgetRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Inherited from SchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L20)inheritedgetSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Inherited from SchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from SchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from SchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from SchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inheritedinferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Inherited from SchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#isImplicitIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L204)isImplicitIndex * ****isImplicitIndex**(name): boolean - Implicit indexes will be ignored when diffing *** #### Parameters * ##### name: string #### Returns boolean ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L102)inheritedloadInformationSchema * ****loadInformationSchema**(schema, connection, tables, schemas): Promise\ - Inherited from SchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalschemas: string\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L170)mapForeignKeys * ****mapForeignKeys**(fks, tableName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Overrides SchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L297)inheritednormalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length, defaultValues): string | number - Inherited from SchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### optionallength: number * ##### defaultValues: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ = {} #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from SchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from SchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L16)supportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Overrides SchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/core/function/BeforeCreate.md # BeforeCreate ### Callable * ****BeforeCreate**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/BeforeDelete.md # BeforeDelete ### Callable * ****BeforeDelete**(): (target, method) => void *** * Called before deleting entity, but only when providing initialized entity to EM#remove() *** #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/BeforeUpdate.md # BeforeUpdate ### Callable * ****BeforeUpdate**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/BeforeUpsert.md # BeforeUpsert ### Callable * ****BeforeUpsert**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md # BetterSqliteConnection ### Hierarchy * [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) * *BetterSqliteConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new BetterSqliteConnection**(config, options, type): [BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md) - Inherited from BaseSqliteConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from BaseSqliteConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from BaseSqliteConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from BaseSqliteConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from BaseSqliteConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L9)inheritedconnect * ****connect**(): Promise\ - Inherited from BaseSqliteConnection.connect Establishes connection to database *** #### Returns Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqliteConnection.ts#L5)createKnex * ****createKnex**(): void - Overrides BaseSqliteConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from BaseSqliteConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from BaseSqliteConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L24)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from BaseSqliteConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L91)inheritedgetConnectionOptions * ****getConnectionOptions**(): [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - Inherited from BaseSqliteConnection.getConnectionOptions #### Returns [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L20)inheritedgetDefaultClientUrl * ****getDefaultClientUrl**(): string - Inherited from BaseSqliteConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from BaseSqliteConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from BaseSqliteConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from BaseSqliteConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L28)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from BaseSqliteConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from BaseSqliteConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from BaseSqliteConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from BaseSqliteConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from BaseSqliteConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md # BetterSqliteDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md)> * *BetterSqliteDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqliteDriver.ts#L8)constructor * ****new BetterSqliteDriver**(config): [BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L511)inheritednativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L720)inheritednativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/better-sqlite/class/BetterSqliteExceptionConverter.md # BetterSqliteExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *BetterSqliteExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BetterSqliteExceptionConverter**(): [BetterSqliteExceptionConverter](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [BetterSqliteExceptionConverter](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqliteExceptionConverter.ts#L15)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@inheritDoc** * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/BetterSqliteKnexDialect.md # BetterSqliteKnexDialect ### Hierarchy * BetterSqlite3Dialect * *BetterSqliteKnexDialect* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**\_driver](#_driver) * [**tableCompiler](#tableCompiler) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BetterSqliteKnexDialect**(): [BetterSqliteKnexDialect](https://mikro-orm.io/api/knex/class/BetterSqliteKnexDialect.md) - Inherited from MonkeyPatchable.BetterSqlite3Dialect.constructor #### Returns [BetterSqliteKnexDialect](https://mikro-orm.io/api/knex/class/BetterSqliteKnexDialect.md) ## Methods[**](#Methods) ### [**](#_driver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BetterSqliteKnexDialect.ts#L6)\_driver * ****\_driver**(): any - #### Returns any ### [**](#tableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BetterSqliteKnexDialect.ts#L10)tableCompiler * ****tableCompiler**(): any - #### Returns any --- # Source: https://mikro-orm.io/api/better-sqlite/class/BetterSqlitePlatform.md # BetterSqlitePlatform ### Hierarchy * [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) * *BetterSqlitePlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BetterSqlitePlatform**(): [BetterSqlitePlatform](https://mikro-orm.io/api/better-sqlite/class/BetterSqlitePlatform.md) - Inherited from BaseSqlitePlatform.constructor #### Returns [BetterSqlitePlatform](https://mikro-orm.io/api/better-sqlite/class/BetterSqlitePlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from BaseSqlitePlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from BaseSqlitePlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from BaseSqlitePlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from BaseSqlitePlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from BaseSqlitePlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from BaseSqlitePlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from BaseSqlitePlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from BaseSqlitePlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L73)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from BaseSqlitePlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from BaseSqlitePlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqlitePlatform.ts#L12)escape * ****escape**(value): string - Overrides BaseSqlitePlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from BaseSqlitePlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from BaseSqlitePlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from BaseSqlitePlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L22)inheritedgetBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Inherited from BaseSqlitePlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L51)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L55)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from BaseSqlitePlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from BaseSqlitePlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L14)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from BaseSqlitePlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### length: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L18)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length: number } * ##### length: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from BaseSqlitePlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from BaseSqlitePlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from BaseSqlitePlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from BaseSqlitePlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from BaseSqlitePlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L99)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from BaseSqlitePlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from BaseSqlitePlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from BaseSqlitePlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from BaseSqlitePlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L26)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from BaseSqlitePlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from BaseSqlitePlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L47)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from BaseSqlitePlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L107)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(): string - Inherited from BaseSqlitePlatform.getFullTextWhereClause #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L91)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from BaseSqlitePlatform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L43)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L100)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from BaseSqlitePlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from BaseSqlitePlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from BaseSqlitePlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from BaseSqlitePlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from BaseSqlitePlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from BaseSqlitePlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from BaseSqlitePlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from BaseSqlitePlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from BaseSqlitePlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from BaseSqlitePlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from BaseSqlitePlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from BaseSqlitePlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L39)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from BaseSqlitePlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from BaseSqlitePlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from BaseSqlitePlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L35)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L59)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from BaseSqlitePlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from BaseSqlitePlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from BaseSqlitePlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from BaseSqlitePlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from BaseSqlitePlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from BaseSqlitePlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from BaseSqlitePlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from BaseSqlitePlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from BaseSqlitePlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L63)inheritednormalizeColumnType * ****normalizeColumnType**(type, options): string - Inherited from BaseSqlitePlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from BaseSqlitePlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from BaseSqlitePlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L83)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from BaseSqlitePlatform.processDateProperty This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. We use this method to convert Dates to timestamps when computing the changeset, so we have the right data type in the payload as well as in original entity data. Without that, we would end up with diffs including all Date properties, as we would be comparing Date object with timestamp. *** #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from BaseSqlitePlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L119)inheritedquoteValue * ****quoteValue**(value): string - Inherited from BaseSqlitePlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L111)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from BaseSqlitePlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from BaseSqlitePlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from BaseSqlitePlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from BaseSqlitePlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from BaseSqlitePlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L103)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from BaseSqlitePlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from BaseSqlitePlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from BaseSqlitePlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from BaseSqlitePlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)inheritedsupportsSchemas * ****supportsSchemas**(): boolean - Inherited from BaseSqlitePlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from BaseSqlitePlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from BaseSqlitePlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from BaseSqlitePlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from BaseSqlitePlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from BaseSqlitePlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from BaseSqlitePlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L6)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from BaseSqlitePlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from BaseSqlitePlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from BaseSqlitePlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from BaseSqlitePlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from BaseSqlitePlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L10)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from BaseSqlitePlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from BaseSqlitePlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/better-sqlite/class/BetterSqliteSchemaHelper.md # BetterSqliteSchemaHelper ### Hierarchy * [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) * *BetterSqliteSchemaHelper* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**isImplicitIndex](#isImplicitIndex) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new BetterSqliteSchemaHelper**(platform): [BetterSqliteSchemaHelper](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteSchemaHelper.md) - Inherited from BaseSqliteSchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [BetterSqliteSchemaHelper](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteSchemaHelper.md) ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from BaseSqliteSchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from BaseSqliteSchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from BaseSqliteSchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from BaseSqliteSchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from BaseSqliteSchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from BaseSqliteSchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from BaseSqliteSchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from BaseSqliteSchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from BaseSqliteSchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L174)inheritedcreateTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Inherited from BaseSqliteSchemaHelper.createTableColumn #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L196)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from BaseSqliteSchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L8)inheriteddisableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Inherited from BaseSqliteSchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from BaseSqliteSchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L12)inheritedenableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Inherited from BaseSqliteSchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from BaseSqliteSchemaHelper.finalizeTable #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from BaseSqliteSchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from BaseSqliteSchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L209)inheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from BaseSqliteSchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L236)inheritedgetChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Inherited from BaseSqliteSchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L161)inheritedgetChecks * ****getChecks**(connection, tableName, schemaName): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Inherited from BaseSqliteSchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L67)inheritedgetColumns * ****getColumns**(connection, tableName, schemaName): Promise\ - Inherited from BaseSqliteSchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L192)inheritedgetCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from BaseSqliteSchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from BaseSqliteSchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)inheritedgetDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from BaseSqliteSchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from BaseSqliteSchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L34)inheritedgetDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Inherited from BaseSqliteSchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L25)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from BaseSqliteSchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from BaseSqliteSchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L105)inheritedgetEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from BaseSqliteSchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### schemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from BaseSqliteSchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L166)inheritedgetForeignKeysSQL * ****getForeignKeysSQL**(tableName): string - Inherited from BaseSqliteSchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L131)inheritedgetIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Inherited from BaseSqliteSchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L20)inheritedgetListTablesSQL * ****getListTablesSQL**(): string - Inherited from BaseSqliteSchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L188)inheritedgetManagementDbName * ****getManagementDbName**(): string - Inherited from BaseSqliteSchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)inheritedgetNamespaces * ****getNamespaces**(connection): Promise\ - Inherited from BaseSqliteSchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)inheritedgetPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Inherited from BaseSqliteSchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L224)inheritedgetPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Inherited from BaseSqliteSchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L124)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from BaseSqliteSchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from BaseSqliteSchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L119)inheritedgetRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - Inherited from BaseSqliteSchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L151)inheritedgetRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Inherited from BaseSqliteSchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L20)inheritedgetSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Inherited from BaseSqliteSchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from BaseSqliteSchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from BaseSqliteSchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from BaseSqliteSchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inheritedinferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Inherited from BaseSqliteSchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#isImplicitIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L204)inheritedisImplicitIndex * ****isImplicitIndex**(name): boolean - Inherited from BaseSqliteSchemaHelper.isImplicitIndex Implicit indexes will be ignored when diffing *** #### Parameters * ##### name: string #### Returns boolean ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L102)inheritedloadInformationSchema * ****loadInformationSchema**(schema, connection, tables, schemas): Promise\ - Inherited from BaseSqliteSchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalschemas: string\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L170)inheritedmapForeignKeys * ****mapForeignKeys**(fks, tableName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from BaseSqliteSchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L297)inheritednormalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length, defaultValues): string | number - Inherited from BaseSqliteSchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### optionallength: number * ##### defaultValues: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ = {} #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from BaseSqliteSchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from BaseSqliteSchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L16)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from BaseSqliteSchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/core/class/BigIntType.md # BigIntType \ This type will automatically convert string values returned from the database to native JS bigints (default) or numbers (safe only for values up to `Number.MAX_SAFE_INTEGER`), or strings, depending on the `mode`. ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ | null | undefined, string | null | undefined> * *BigIntType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**mode](#mode) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L11)constructor * ****new BigIntType**\(mode): [BigIntType](https://mikro-orm.io/api/core/class/BigIntType.md)\ - Overrides Type.constructor #### Parameters * ##### optionalmode: Mode #### Returns [BigIntType](https://mikro-orm.io/api/core/class/BigIntType.md)\ ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#mode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L11)publicoptionalmode **mode? : Mode ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L51)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L55)compareValues * ****compareValues**(a, b): boolean - Overrides Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: string * ##### b: string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L15)convertToDatabaseValue * ****convertToDatabaseValue**(value): undefined | null | string - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | JSTypeByMode\ #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L23)convertToJSValue * ****convertToJSValue**(value): undefined | null | JSTypeByMode\ - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string | bigint #### Returns undefined | null | JSTypeByMode\ ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L47)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BigIntType.ts#L39)toJSON * ****toJSON**(value): undefined | null | JSTypeByMode\ - Overrides Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | JSTypeByMode\ #### Returns undefined | null | JSTypeByMode\ ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/BlobType.md # BlobType ### Hierarchy * [Uint8ArrayType](https://mikro-orm.io/api/core/class/Uint8ArrayType.md) * *BlobType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BlobType**(): [BlobType](https://mikro-orm.io/api/core/class/BlobType.md) - Inherited from Uint8ArrayType.constructor #### Returns [BlobType](https://mikro-orm.io/api/core/class/BlobType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Uint8ArrayType.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Uint8ArrayType.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Uint8ArrayType.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Uint8ArrayType.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Uint8ArrayType.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BlobType.ts#L21)compareAsType * ****compareAsType**(): string - Overrides Uint8ArrayType.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Uint8ArrayType.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | Uint8Array\ * ##### b: null | Uint8Array\ #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Uint8ArrayType.ts#L7)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value): Buffer\ - Inherited from Uint8ArrayType.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: Uint8Array\ #### Returns Buffer\ ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Uint8ArrayType.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BlobType.ts#L7)convertToJSValue * ****convertToJSValue**(value): null | Buffer\ - Overrides Uint8ArrayType.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: Buffer\ #### Returns null | Buffer\ ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Uint8ArrayType.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BlobType.ts#L25)ensureComparable * ****ensureComparable**(): boolean - Overrides Uint8ArrayType.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BlobType.ts#L29)getColumnType * ****getColumnType**(prop, platform): string - Overrides Uint8ArrayType.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Uint8ArrayType.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): null | Uint8Array\ - Inherited from Uint8ArrayType.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: null | Uint8Array\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns null | Uint8Array\ ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Uint8ArrayType.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Uint8ArrayType.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/BooleanType.md # BooleanType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *BooleanType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new BooleanType**(): [BooleanType](https://mikro-orm.io/api/core/class/BooleanType.md) - Inherited from Type.constructor #### Returns [BooleanType](https://mikro-orm.io/api/core/class/BooleanType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BooleanType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | boolean * ##### b: undefined | null | boolean #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | boolean - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | boolean * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | boolean ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | boolean - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | boolean * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | boolean ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BooleanType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/BooleanType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | boolean - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | boolean * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | boolean ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/CacheAdapter.md # CacheAdapter ### Hierarchy * *CacheAdapter* * [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) ### Implemented by * [GeneratedCacheAdapter](https://mikro-orm.io/api/core/class/GeneratedCacheAdapter.md) * [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md) ## Index[**](#Index) ### Methods * [**clear](#clear) * [**close](#close) * [**get](#get) * [**remove](#remove) * [**set](#set) ## Methods[**](#Methods) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L21)clear * ****clear**(): void | Promise\ - Clears all items stored in the cache. *** #### Returns void | Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L26)optionalclose * ****close**(): void | Promise\ - Called inside `MikroORM.close()` Allows graceful shutdowns (e.g. for redis). *** #### Returns void | Promise\ ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L6)get * ****get**\(name): undefined | T | Promise\ - Gets the items under `name` key from the cache. *** #### Parameters * ##### name: string #### Returns undefined | T | Promise\ ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L16)remove * ****remove**(name): void | Promise\ - Removes the item from cache. *** #### Parameters * ##### name: string #### Returns void | Promise\ ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L11)set * ****set**(name, data, origin, expiration): void | Promise\ - Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. *** #### Parameters * ##### name: string * ##### data: any * ##### origin: string * ##### optionalexpiration: number #### Returns void | Promise\ --- # Source: https://mikro-orm.io/api/core/enum/Cascade.md # Cascade ## Index[**](#Index) ### Enumeration Members * [**ALL](#ALL) * [**MERGE](#MERGE) * [**PERSIST](#PERSIST) * [**REMOVE](#REMOVE) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#ALL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L135)ALL **ALL: all ### [**](#MERGE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L133)MERGE **MERGE: merge ### [**](#PERSIST)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L132)PERSIST **PERSIST: persist ### [**](#REMOVE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L134)REMOVE **REMOVE: remove --- # Source: https://mikro-orm.io/api/core/class/ChangeSet.md # ChangeSet \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**collection](#collection) * [**entity](#entity) * [**meta](#meta) * [**name](#name) * [**originalEntity](#originalEntity) * [**payload](#payload) * [**persisted](#persisted) * [**rootName](#rootName) * [**schema](#schema) * [**type](#type) ### Methods * [**getPrimaryKey](#getPrimaryKey) * [**getSerializedPrimaryKey](#getSerializedPrimaryKey) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L11)constructor * ****new ChangeSet**\(entity, type, payload, meta): [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\ - #### Parameters * ##### entity: T * ##### type: [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md) * ##### payload: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\ ## Properties[**](#Properties) ### [**](#collection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L70)collection **collection: string ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L11)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L73)publicentity **entity: T ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L14)publicmeta **meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L68)name **name: string ### [**](#originalEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L76)optionaloriginalEntity **originalEntity? : [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#payload)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L13)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L74)publicpayload **payload: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ ### [**](#persisted)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L75)persisted **persisted: boolean ### [**](#rootName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L69)rootName **rootName: string ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L71)optionalschema **schema? : string ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L12)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L72)publictype **type: [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md) ## Methods[**](#Methods) ### [**](#getPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L21)getPrimaryKey * ****getPrimaryKey**(object): null | (T extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id? : PK } ? string | ReadonlyPrimary\ : T extends { id? : PK } ? ReadonlyPrimary\ : T extends { uuid? : PK } ? ReadonlyPrimary\ : T) - #### Parameters * ##### object: boolean = false #### Returns null | (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T) ### [**](#getSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L48)getSerializedPrimaryKey * ****getSerializedPrimaryKey**(): null | string - #### Returns null | string --- # Source: https://mikro-orm.io/api/core/class/ChangeSetComputer.md # ChangeSetComputer ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**computeChangeSet](#computeChangeSet) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetComputer.ts#L14)constructor * ****new ChangeSetComputer**(validator, collectionUpdates, metadata, platform, config, em): [ChangeSetComputer](https://mikro-orm.io/api/core/class/ChangeSetComputer.md) - #### Parameters * ##### validator: [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) * ##### collectionUpdates: Set<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, object>> * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [ChangeSetComputer](https://mikro-orm.io/api/core/class/ChangeSetComputer.md) ## Methods[**](#Methods) ### [**](#computeChangeSet)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetComputer.ts#L23)computeChangeSet * ****computeChangeSet**\(entity): null | [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\ - #### Parameters * ##### entity: T #### Returns null | [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\ --- # Source: https://mikro-orm.io/api/core/class/ChangeSetPersister.md # ChangeSetPersister ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**executeDeletes](#executeDeletes) * [**executeInserts](#executeInserts) * [**executeUpdates](#executeUpdates) * [**mapReturnedValues](#mapReturnedValues) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L19)constructor * ****new ChangeSetPersister**(driver, metadata, hydrator, factory, validator, config, em): [ChangeSetPersister](https://mikro-orm.io/api/core/class/ChangeSetPersister.md) - #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ##### hydrator: IHydrator * ##### factory: [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) * ##### validator: [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [ChangeSetPersister](https://mikro-orm.io/api/core/class/ChangeSetPersister.md) ## Methods[**](#Methods) ### [**](#executeDeletes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L65)executeDeletes * ****executeDeletes**\(changeSets, options, withSchema): Promise\ - #### Parameters * ##### changeSets: [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\\[] * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) * ##### optionalwithSchema: boolean #### Returns Promise\ ### [**](#executeInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L31)executeInserts * ****executeInserts**\(changeSets, options, withSchema): Promise\ - #### Parameters * ##### changeSets: [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\\[] * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) * ##### optionalwithSchema: boolean #### Returns Promise\ ### [**](#executeUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L48)executeUpdates * ****executeUpdates**\(changeSets, batched, options, withSchema): Promise\ - #### Parameters * ##### changeSets: [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\\[] * ##### batched: boolean * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) * ##### optionalwithSchema: boolean #### Returns Promise\ ### [**](#mapReturnedValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L455)mapReturnedValues * ****mapReturnedValues**\(entity, payload, row, meta, upsert): void - Maps values returned via `returning` statement (postgres) or the inserted id (other sql drivers). No need to handle composite keys here as they need to be set upfront. We do need to map to the change set payload too, as it will be used in the originalEntityData for new entities. *** #### Parameters * ##### entity: undefined | null | T * ##### payload: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### row: undefined | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### upsert: boolean = false #### Returns void --- # Source: https://mikro-orm.io/api/core/enum/ChangeSetType.md # ChangeSetType ## Index[**](#Index) ### Enumeration Members * [**CREATE](#CREATE) * [**DELETE](#DELETE) * [**DELETE\_EARLY](#DELETE_EARLY) * [**UPDATE](#UPDATE) * [**UPDATE\_EARLY](#UPDATE_EARLY) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#CREATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L80)CREATE **CREATE: create ### [**](#DELETE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L82)DELETE **DELETE: delete ### [**](#DELETE_EARLY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L84)DELETE\_EARLY **DELETE\_EARLY: delete\_early ### [**](#UPDATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L81)UPDATE **UPDATE: update ### [**](#UPDATE_EARLY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L83)UPDATE\_EARLY **UPDATE\_EARLY: update\_early --- # Source: https://mikro-orm.io/api/core/class/CharacterType.md # CharacterType ### Hierarchy * [StringType](https://mikro-orm.io/api/core/class/StringType.md) * *CharacterType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new CharacterType**(): [CharacterType](https://mikro-orm.io/api/core/class/CharacterType.md) - Inherited from StringType.constructor #### Returns [CharacterType](https://mikro-orm.io/api/core/class/CharacterType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from StringType.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from StringType.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from StringType.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from StringType.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from StringType.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/StringType.ts#L11)inheritedcompareAsType * ****compareAsType**(): string - Inherited from StringType.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from StringType.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | string - Inherited from StringType.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from StringType.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | string - Inherited from StringType.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from StringType.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/StringType.ts#L15)inheritedensureComparable * ****ensureComparable**(): boolean - Inherited from StringType.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/CharacterType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides StringType.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/CharacterType.ts#L11)getDefaultLength * ****getDefaultLength**(platform): number - Overrides StringType.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from StringType.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from StringType.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from StringType.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/function/Check.md # Check ### Callable * ****Check**\(options): (target, propertyName) => any *** * #### Parameters * ##### options: [CheckOptions](https://mikro-orm.io/api/core.md#CheckOptions)\ #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: any * ##### optionalpropertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/class/CheckConstraintViolationException.md # CheckConstraintViolationException Exception for a check constraint violation detected in the driver. ### Hierarchy * [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) * *CheckConstraintViolationException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new CheckConstraintViolationException**(previous): [CheckConstraintViolationException](https://mikro-orm.io/api/core/class/CheckConstraintViolationException.md) - Inherited from ConstraintViolationException.constructor #### Parameters * ##### previous: Error #### Returns [CheckConstraintViolationException](https://mikro-orm.io/api/core/class/CheckConstraintViolationException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ConstraintViolationException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ConstraintViolationException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ConstraintViolationException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ConstraintViolationException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ConstraintViolationException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ConstraintViolationException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ConstraintViolationException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ConstraintViolationException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ConstraintViolationException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ConstraintViolationException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ConstraintViolationException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ConstraintViolationException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/knex/interface/CheckDef.md # CheckDef \ ## Index[**](#Index) ### Properties * [**columnName](#columnName) * [**definition](#definition) * [**expression](#expression) * [**name](#name) ## Properties[**](#Properties) ### [**](#columnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L104)optionalcolumnName **columnName? : string ### [**](#definition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L103)optionaldefinition **definition? : string ### [**](#expression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L102)expression **expression: string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L101)name **name: string --- # Source: https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md # ClearDatabaseOptions ### Hierarchy * *ClearDatabaseOptions* * [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) ## Index[**](#Index) ### Properties * [**schema](#schema) * [**truncate](#truncate) ## Properties[**](#Properties) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L875)optionalschema **schema? : string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L876)optionaltruncate **truncate? : boolean --- # Source: https://mikro-orm.io/api/core/class/Collection.md # Collection \ ### Hierarchy * [ArrayCollection](https://mikro-orm.io/api/core/class/ArrayCollection.md)\ * *Collection* * [LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**owner](#owner) ### Accessors * [**length](#length) ### Methods * [**\[iterator\]](#\[iterator]) * [**add](#add) * [**contains](#contains) * [**count](#count) * [**exists](#exists) * [**filter](#filter) * [**find](#find) * [**getIdentifiers](#getIdentifiers) * [**getItems](#getItems) * [**indexBy](#indexBy) * [**init](#init) * [**isDirty](#isDirty) * [**isEmpty](#isEmpty) * [**isInitialized](#isInitialized) * [**isPartial](#isPartial) * [**load](#load) * [**loadCount](#loadCount) * [**loadItems](#loadItems) * [**map](#map) * [**matching](#matching) * [**populated](#populated) * [**reduce](#reduce) * [**remove](#remove) * [**removeAll](#removeAll) * [**set](#set) * [**setDirty](#setDirty) * [**shouldPopulate](#shouldPopulate) * [**slice](#slice) * [**toArray](#toArray) * [**toJSON](#toJSON) * [**create](#create) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L38)constructor * ****new Collection**\(owner, items, initialized): [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ - Overrides ArrayCollection.constructor #### Parameters * ##### owner: O * ##### optionalitems: T\[] * ##### initialized: boolean = true #### Returns [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ ## Properties[**](#Properties) ### [**](#owner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L19)readonlyinheritedowner **owner: O Inherited from ArrayCollection.owner ## Accessors[**](#Accessors) ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L367)inheritedlength * **get length(): number - Inherited from ArrayCollection.length #### Returns number ## Methods[**](#Methods) ### [**](#\[iterator])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L371)inherited\[iterator] * ****\[iterator]**(): IterableIterator\ - Inherited from ArrayCollection.\[iterator] #### Returns IterableIterator\ ### [**](#add)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L162)add * ****add**\(entity, ...entities): void - Overrides ArrayCollection.add #### Parameters * ##### entity: TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> * ##### rest...entities: (TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\)\[] #### Returns void ### [**](#contains)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L196)contains * ****contains**\(item, check): boolean - Overrides ArrayCollection.contains #### Parameters * ##### item: TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ * ##### check: boolean = true #### Returns boolean ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L204)count * ****count**(): number - Overrides ArrayCollection.count #### Returns number ### [**](#exists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L225)exists * ****exists**(cb): boolean - Overrides ArrayCollection.exists Tests for the existence of an element that satisfies the given predicate. *** #### Parameters * ##### cb: (item) => boolean #### Returns boolean ### [**](#filter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L241)filter * ****filter**(cb): T\[] - Overrides ArrayCollection.filter Extracts a subset of the collection items. *** #### Parameters * ##### cb: (item, index) => boolean #### Returns T\[] ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L233)find * ****find**(cb): undefined | T - Overrides ArrayCollection.find Returns the first element of this collection that satisfies the predicate. *** #### Parameters * ##### cb: (item, index) => boolean #### Returns undefined | T ### [**](#getIdentifiers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L51)inheritedgetIdentifiers * ****getIdentifiers**\(field): U\[] - Inherited from ArrayCollection.getIdentifiers #### Parameters * ##### optionalfield: string | string\[] #### Returns U\[] ### [**](#getItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L146)getItems * ****getItems**(check): T\[] - Overrides ArrayCollection.getItems Returns the items (the collection must be initialized) *** #### Parameters * ##### check: boolean = true #### Returns T\[] ### [**](#indexBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L258)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L263)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L268)indexBy * ****indexBy**\(key): Record\ * ****indexBy**\(key, valueKey): Record\ - Overrides ArrayCollection.indexBy Maps the collection items to a dictionary, indexed by the key you specify. If there are more items with the same key, only the first one will be present. *** #### Parameters * ##### key: K1 #### Returns Record\ ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L289)init * ****init**\(options): Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> - #### Parameters * ##### options: [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\ = {} #### Returns Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> ### [**](#isDirty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L351)inheritedisDirty * ****isDirty**(): boolean - Inherited from ArrayCollection.isDirty #### Returns boolean ### [**](#isEmpty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L209)isEmpty * ****isEmpty**(): boolean - Overrides ArrayCollection.isEmpty #### Returns boolean ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L337)inheritedisInitialized * ****isInitialized**(fully): boolean - Inherited from ArrayCollection.isInitialized #### Parameters * ##### fully: boolean = false #### Returns boolean ### [**](#isPartial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L355)inheritedisPartial * ****isPartial**(): boolean - Inherited from ArrayCollection.isPartial #### Returns boolean ### [**](#load)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L62)load * ****load**\(options): Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> - Ensures the collection is loaded first (without reloading it if it already is loaded). Returns the Collection instance (itself), works the same as `Reference.load()`. *** #### Parameters * ##### options: [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\ = {} #### Returns Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> ### [**](#loadCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L95)loadCount * ****loadCount**(options): Promise\ - Overrides ArrayCollection.loadCount Gets the count of collection items from database instead of counting loaded items. The value is cached (unless you use the `where` option), use `refresh: true` to force reload it. *** #### Parameters * ##### options: boolean | [LoadCountOptions](https://mikro-orm.io/api/core/interface/LoadCountOptions.md)\ = {} #### Returns Promise\ ### [**](#loadItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L86)loadItems * ****loadItems**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Initializes the collection and returns the items *** #### Parameters * ##### optionaloptions: [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#map)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L249)map * ****map**\(mapper): R\[] - Overrides ArrayCollection.map Maps the collection items based on your provided mapper function. *** #### Parameters * ##### mapper: (item, index) => R #### Returns R\[] ### [**](#matching)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L119)matching * ****matching**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - #### Parameters * ##### options: [MatchingOptions](https://mikro-orm.io/api/core/interface/MatchingOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L285)populated * ****populated**(populated): void - #### Parameters * ##### populated: undefined | boolean = true #### Returns void ### [**](#reduce)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L300)inheritedreduce * ****reduce**\(cb, initial): R - Inherited from ArrayCollection.reduce Maps the collection items based on your provided mapper function to a single object. *** #### Parameters * ##### cb: (obj, item, index) => R * ##### initial: R = ... #### Returns R ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L173)remove * ****remove**\(entity, ...entities): void - Overrides ArrayCollection.remove Remove specified item(s) from the collection. Note that removing item from collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. *** #### Parameters * ##### entity: TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> | (item) => boolean * ##### rest...entities: (TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\)\[] #### Returns void ### [**](#removeAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L187)inheritedremoveAll * ****removeAll**(): void - Inherited from ArrayCollection.removeAll Remove all items from the collection. Note that removing items from collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. *** #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L105)inheritedset * ****set**(items): void - Inherited from ArrayCollection.set #### Parameters * ##### items: Iterable\, any, any> #### Returns void ### [**](#setDirty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L363)inheritedsetDirty * ****setDirty**(dirty): void - Inherited from ArrayCollection.setDirty #### Parameters * ##### dirty: boolean = true #### Returns void ### [**](#shouldPopulate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L273)shouldPopulate * ****shouldPopulate**(populated): boolean - #### Parameters * ##### optionalpopulated: boolean #### Returns boolean ### [**](#slice)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L217)slice * ****slice**(start, end): T\[] - Overrides ArrayCollection.slice Extracts a slice of the collection items starting at position start to end (exclusive) of the collection. If end is null it returns all elements from start to the end of the collection. *** #### Parameters * ##### optionalstart: number * ##### optionalend: number #### Returns T\[] ### [**](#toArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L36)inheritedtoArray * ****toArray**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] - Inherited from ArrayCollection.toArray #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L154)toJSON * ****toJSON**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] - Overrides ArrayCollection.toJSON #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L46)staticcreate * ****create**\(owner, prop, items, initialized): [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ - Creates new Collection instance, assigns it to the owning entity and sets the items to it (propagating them to their inverse sides) *** #### Parameters * ##### owner: O * ##### prop: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### items: undefined | T\[] * ##### initialized: boolean #### Returns [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ --- # Source: https://mikro-orm.io/api/knex/interface/Column.md # Column ## Index[**](#Index) ### Properties * [**autoincrement](#autoincrement) * [**comment](#comment) * [**default](#default) * [**enumItems](#enumItems) * [**extra](#extra) * [**generated](#generated) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**length](#length) * [**mappedType](#mappedType) * [**name](#name) * [**nativeEnumName](#nativeEnumName) * [**nullable](#nullable) * [**precision](#precision) * [**primary](#primary) * [**scale](#scale) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) ## Properties[**](#Properties) ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L59)optionalautoincrement **autoincrement? : boolean ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L65)optionalcomment **comment? : string ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L64)optionaldefault **default? : null | string ### [**](#enumItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L68)optionalenumItems **enumItems? : string\[] ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L72)optionalextra **extra? : string mysql only ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L66)optionalgenerated **generated? : string ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L73)optionalignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L61)optionallength **length? : number ### [**](#mappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L57)mappedType **mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L55)name **name: string ### [**](#nativeEnumName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L67)optionalnativeEnumName **nativeEnumName? : string ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L60)optionalnullable **nullable? : boolean ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L62)optionalprecision **precision? : number ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L69)optionalprimary **primary? : boolean ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L63)optionalscale **scale? : number ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L56)type **type: string ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L70)optionalunique **unique? : boolean ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L58)optionalunsigned **unsigned? : boolean --- # Source: https://mikro-orm.io/api/knex/interface/ColumnDifference.md # ColumnDifference ## Index[**](#Index) ### Properties * [**changedProperties](#changedProperties) * [**column](#column) * [**fromColumn](#fromColumn) * [**oldColumnName](#oldColumnName) ## Properties[**](#Properties) ### [**](#changedProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L111)changedProperties **changedProperties: Set\ ### [**](#column)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L109)column **column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) ### [**](#fromColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L110)fromColumn **fromColumn: [Column](https://mikro-orm.io/api/knex/interface/Column.md) ### [**](#oldColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L108)oldColumnName **oldColumnName: string --- # Source: https://mikro-orm.io/api/core/class/Configuration.md # Configuration \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**DEFAULTS](#DEFAULTS) ### Methods * [**get](#get) * [**getAll](#getAll) * [**getCachedService](#getCachedService) * [**getClientUrl](#getClientUrl) * [**getComparator](#getComparator) * [**getDriver](#getDriver) * [**getExtension](#getExtension) * [**getHydrator](#getHydrator) * [**getLogger](#getLogger) * [**getMetadataCacheAdapter](#getMetadataCacheAdapter) * [**getMetadataProvider](#getMetadataProvider) * [**getNamingStrategy](#getNamingStrategy) * [**getPlatform](#getPlatform) * [**getRepositoryClass](#getRepositoryClass) * [**getResultCacheAdapter](#getResultCacheAdapter) * [**getSchema](#getSchema) * [**registerExtension](#registerExtension) * [**reset](#reset) * [**resetServiceCache](#resetServiceCache) * [**set](#set) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L183)constructor * ****new Configuration**\(options, validate): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)\ - #### Parameters * ##### options: [Options](https://mikro-orm.io/api/core.md#Options)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### validate: boolean = true #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)\ ## Properties[**](#Properties) ### [**](#DEFAULTS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L48)staticreadonlyDEFAULTS **DEFAULTS: { allowGlobalContext: false; assign: { ignoreUndefined: false; mergeEmbeddedProperties: true; mergeObjectProperties: false; updateByPrimaryKey: true; updateNestedEntities: true }; autoJoinOneToOneOwner: true; autoJoinRefsForFilters: true; baseDir: string; batchSize: number; colors: true; connect: true; context: (name) => undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>; contextName: string; dataloader: NONE; debug: false; discovery: { alwaysAnalyseProperties: true; checkDuplicateEntities: true; checkDuplicateFieldNames: true; checkDuplicateTableNames: true; checkNonPersistentCompositeProps: true; disableDynamicFileAccess: false; inferDefaultValues: true; requireEntitiesArray: false; warnWhenNoEntities: true }; driverOptions: {}; dynamicImportProvider: (id) => Promise\; embeddables: { prefixMode: absolute }; ensureDatabase: true; ensureIndexes: false; entities: never\[]; entitiesTs: never\[]; entityGenerator: { bidirectionalRelations: false; entityDefinition: decorators; enumMode: ts-enum; fileName: (className) => string; forceUndefined: true; identifiedReferences: false; onlyPurePivotTables: false; outputPurePivotTables: false; readOnlyPivotTables: false; scalarPropertiesForRelations: never; scalarTypeInDecorator: false; undefinedDefaults: false; useCoreBaseEntity: false }; extensions: never\[]; filters: {}; filtersOnRelations: true; findExactlyOneOrFailHandler: (entityName, where) => [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\>; findOneOrFailHandler: (entityName, where) => [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\>; flushMode: AUTO; forceEntityConstructor: false; forceUndefined: false; hashAlgorithm: md5; highlighter: [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md); hydrator: typeof [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md); ignoreDeprecations: false; ignoreUndefinedInQuery: false; loadStrategy: JOINED; logger: (message, ...optionalParams) => void; metadataCache: { adapter: typeof [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md); options: { cacheDir: string }; pretty: false }; metadataProvider: typeof [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md); migrations: { allOrNothing: true; disableForeignKeys: false; dropTables: true; emit: ts; fileName: (timestamp, name) => string; glob: string; path: string; safe: false; silent: false; snapshot: true; tableName: string; transactional: true }; onQuery: (sql) => string; persistOnCreate: true; pool: {}; populateAfterFlush: true; populateWhere: ALL; preferReadReplicas: true; processOnCreateHooksEarly: false; propagationOnPrototype: true; resultCache: { adapter: typeof [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md); expiration: number; options: {} }; schemaGenerator: { createForeignKeyConstraints: true; disableForeignKeys: false; ignoreSchema: never\[]; skipColumns: {}; skipTables: never\[] }; seeder: { defaultSeeder: string; emit: ts; fileName: (className) => string; glob: string; path: string }; serialization: { includePrimaryKeys: true }; strict: false; subscribers: never\[]; upsertManaged: true; validate: false; validateRequired: true; verbose: false } = ... #### Type declaration * ##### allowGlobalContext: false * ##### assign: { ignoreUndefined: false; mergeEmbeddedProperties: true; mergeObjectProperties: false; updateByPrimaryKey: true; updateNestedEntities: true } * ##### ignoreUndefined: false * ##### mergeEmbeddedProperties: true * ##### mergeObjectProperties: false * ##### updateByPrimaryKey: true * ##### updateNestedEntities: true * ##### autoJoinOneToOneOwner: true * ##### autoJoinRefsForFilters: true * ##### baseDir: string * ##### batchSize: number * ##### colors: true * ##### connect: true * ##### context: (name) => undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> * * **(name): undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> - #### Parameters * ##### name: string #### Returns undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> * ##### contextName: string * ##### dataloader: NONE * ##### debug: false * ##### discovery: { alwaysAnalyseProperties: true; checkDuplicateEntities: true; checkDuplicateFieldNames: true; checkDuplicateTableNames: true; checkNonPersistentCompositeProps: true; disableDynamicFileAccess: false; inferDefaultValues: true; requireEntitiesArray: false; warnWhenNoEntities: true } * ##### alwaysAnalyseProperties: true * ##### checkDuplicateEntities: true * ##### checkDuplicateFieldNames: true * ##### checkDuplicateTableNames: true * ##### checkNonPersistentCompositeProps: true * ##### disableDynamicFileAccess: false * ##### inferDefaultValues: true * ##### requireEntitiesArray: false * ##### warnWhenNoEntities: true * ##### driverOptions: {} * ##### dynamicImportProvider: (id) => Promise\ * * **(id): Promise\ - #### Parameters * ##### id: string #### Returns Promise\ * ##### embeddables: { prefixMode: absolute } * ##### prefixMode: absolute * ##### ensureDatabase: true * ##### ensureIndexes: false * ##### entities: never\[] * ##### entitiesTs: never\[] * ##### entityGenerator: { bidirectionalRelations: false; entityDefinition: decorators; enumMode: ts-enum; fileName: (className) => string; forceUndefined: true; identifiedReferences: false; onlyPurePivotTables: false; outputPurePivotTables: false; readOnlyPivotTables: false; scalarPropertiesForRelations: never; scalarTypeInDecorator: false; undefinedDefaults: false; useCoreBaseEntity: false } * ##### bidirectionalRelations: false * ##### entityDefinition: decorators * ##### enumMode: ts-enum * ##### fileName: (className) => string * * **(className): string - #### Parameters * ##### className: string #### Returns string * ##### forceUndefined: true * ##### identifiedReferences: false * ##### onlyPurePivotTables: false * ##### outputPurePivotTables: false * ##### readOnlyPivotTables: false * ##### scalarPropertiesForRelations: never * ##### scalarTypeInDecorator: false * ##### undefinedDefaults: false * ##### useCoreBaseEntity: false * ##### extensions: never\[] * ##### filters: {} * ##### filtersOnRelations: true * ##### findExactlyOneOrFailHandler: (entityName, where) => [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> * * **(entityName, where): [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> - #### Parameters * ##### entityName: string * ##### where: IPrimaryKeyValue | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> * ##### findOneOrFailHandler: (entityName, where) => [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> * * **(entityName, where): [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> - #### Parameters * ##### entityName: string * ##### where: IPrimaryKeyValue | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> * ##### flushMode: AUTO * ##### forceEntityConstructor: false * ##### forceUndefined: false * ##### hashAlgorithm: md5 * ##### highlighter: [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md) * ##### hydrator: typeof [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md) * ##### ignoreDeprecations: false * ##### ignoreUndefinedInQuery: false * ##### loadStrategy: JOINED * ##### logger: (message, ...optionalParams) => void * * **(message, ...optionalParams): void - Prints to `stdout` with newline. Multiple arguments can be passed, with the first used as the primary message and all additional used as substitution values similar to [`printf(3)`](http://man7.org/linux/man-pages/man3/printf.3.html) (the arguments are all passed to [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args)). ``` const count = 5; console.log('count: %d', count); // Prints: count: 5, to stdout console.log('count:', count); // Prints: count: 5, to stdout ``` See [`util.format()`](https://nodejs.org/docs/latest-v24.x/api/util.html#utilformatformat-args) for more information. * **@since** v0.1.100 *** #### Parameters * ##### optionalmessage: any * ##### rest...optionalParams: any\[] #### Returns void * ##### metadataCache: { adapter: typeof [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md); options: { cacheDir: string }; pretty: false } * ##### adapter: typeof [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md) * ##### options: { cacheDir: string } * ##### cacheDir: string * ##### pretty: false * ##### metadataProvider: typeof [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md) * ##### migrations: { allOrNothing: true; disableForeignKeys: false; dropTables: true; emit: ts; fileName: (timestamp, name) => string; glob: string; path: string; safe: false; silent: false; snapshot: true; tableName: string; transactional: true } * ##### allOrNothing: true * ##### disableForeignKeys: false * ##### dropTables: true * ##### emit: ts * ##### fileName: (timestamp, name) => string * * **(timestamp, name): string - #### Parameters * ##### timestamp: string * ##### optionalname: string #### Returns string * ##### glob: string * ##### path: string * ##### safe: false * ##### silent: false * ##### snapshot: true * ##### tableName: string * ##### transactional: true * ##### onQuery: (sql) => string * * **(sql): string - #### Parameters * ##### sql: string #### Returns string * ##### persistOnCreate: true * ##### pool: {} * ##### populateAfterFlush: true * ##### populateWhere: ALL * ##### preferReadReplicas: true * ##### processOnCreateHooksEarly: false * ##### propagationOnPrototype: true * ##### resultCache: { adapter: typeof [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md); expiration: number; options: {} } * ##### adapter: typeof [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md) * ##### expiration: number * ##### options: {} * ##### schemaGenerator: { createForeignKeyConstraints: true; disableForeignKeys: false; ignoreSchema: never\[]; skipColumns: {}; skipTables: never\[] } * ##### createForeignKeyConstraints: true * ##### disableForeignKeys: false * ##### ignoreSchema: never\[] * ##### skipColumns: {} * ##### skipTables: never\[] * ##### seeder: { defaultSeeder: string; emit: ts; fileName: (className) => string; glob: string; path: string } * ##### defaultSeeder: string * ##### emit: ts * ##### fileName: (className) => string * * **(className): string - #### Parameters * ##### className: string #### Returns string * ##### glob: string * ##### path: string * ##### serialization: { includePrimaryKeys: true } * ##### includePrimaryKeys: true * ##### strict: false * ##### subscribers: never\[] * ##### upsertManaged: true * ##### validate: false * ##### validateRequired: true * ##### verbose: false ## Methods[**](#Methods) ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L217)get * ****get**\(key, defaultValue): U - Gets specific configuration option. Falls back to specified `defaultValue` if provided. *** #### Parameters * ##### key: T * ##### optionaldefaultValue: U #### Returns U ### [**](#getAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L225)getAll * ****getAll**(): [MikroORMOptions](https://mikro-orm.io/api/core/interface/MikroORMOptions.md)\ - #### Returns [MikroORMOptions](https://mikro-orm.io/api/core/interface/MikroORMOptions.md)\ ### [**](#getCachedService)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L361)getCachedService * ****getCachedService**\(cls, ...args): InstanceType\ - Creates instance of given service and caches it. *** #### Parameters * ##### cls: T * ##### rest...args: ConstructorParameters\ #### Returns InstanceType\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L258)getClientUrl * ****getClientUrl**(hidePassword): string - Gets current client URL (connection string). *** #### Parameters * ##### hidePassword: boolean = false #### Returns string ### [**](#getComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L318)getComparator * ****getComparator**(metadata): [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) - Gets instance of Comparator. (cached) *** #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) ### [**](#getDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L277)getDriver * ****getDriver**(): D - Gets current database driver instance. *** #### Returns D ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L285)getExtension * ****getExtension**\(name): undefined | T - #### Parameters * ##### name: string #### Returns undefined | T ### [**](#getHydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L311)getHydrator * ****getHydrator**(metadata): IHydrator - Gets instance of Hydrator. (cached) *** #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns IHydrator ### [**](#getLogger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L247)getLogger * ****getLogger**(): [Logger](https://mikro-orm.io/api/core/interface/Logger.md) - Gets Logger instance. *** #### Returns [Logger](https://mikro-orm.io/api/core/interface/Logger.md) ### [**](#getMetadataCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L332)getMetadataCacheAdapter * ****getMetadataCacheAdapter**(): [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) - Gets instance of metadata CacheAdapter. (cached) *** #### Returns [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) ### [**](#getMetadataProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L325)getMetadataProvider * ****getMetadataProvider**(): [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) - Gets instance of MetadataProvider. (cached) *** #### Returns [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L304)getNamingStrategy * ****getNamingStrategy**(): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Gets instance of NamingStrategy. (cached) *** #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L251)getPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L346)getRepositoryClass * ****getRepositoryClass**(repository): undefined | [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Gets EntityRepository class to be instantiated. *** #### Parameters * ##### repository: () => [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\>> #### Returns undefined | [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getResultCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L339)getResultCacheAdapter * ****getResultCacheAdapter**(): [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) - Gets instance of CacheAdapter for result cache. (cached) *** #### Returns [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) ### [**](#getSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L266)getSchema * ****getSchema**(skipDefaultSchema): undefined | string - #### Parameters * ##### skipDefaultSchema: boolean = false #### Returns undefined | string ### [**](#registerExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L281)registerExtension * ****registerExtension**(name, cb): void - #### Parameters * ##### name: string * ##### cb: () => unknown #### Returns void ### [**](#reset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L240)reset * ****reset**\(key): void - Resets the configuration to its default value *** #### Parameters * ##### key: T #### Returns void ### [**](#resetServiceCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L370)resetServiceCache * ****resetServiceCache**(): void - #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L232)set * ****set**\(key, value): void - Overrides specified configuration value. *** #### Parameters * ##### key: T * ##### value: U #### Returns void --- # Source: https://mikro-orm.io/api/core/class/Connection.md # abstractConnection ### Hierarchy * *Connection* * [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * [MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L18)constructor * ****new Connection**(config, options, type): [Connection](https://mikro-orm.io/api/core/class/Connection.md) - #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [Connection](https://mikro-orm.io/api/core/class/Connection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L77)begin * ****begin**(options): Promise\ - #### Parameters * ##### optionaloptions: { ctx?: any; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } * ##### optionalctx: any * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L48)abstractcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L53)close * ****close**(force): Promise\ - Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L81)commit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - #### Parameters * ##### ctx: any * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L38)abstractconnect * ****connect**(): void | Promise\ - Establishes connection to database *** #### Returns void | Promise\ ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)ensureConnection * ****ensureConnection**(): Promise\ - Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L89)abstractexecute * ****execute**\(query, params, method, ctx): Promise\ - #### Parameters * ##### query: string * ##### optionalparams: any\[] * ##### optionalmethod: get | all | run * ##### optionalctx: any #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L118)getClientUrl * ****getClientUrl**(): string - #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L91)getConnectionOptions * ****getConnectionOptions**(): [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - #### Returns [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L71)abstractgetDefaultClientUrl * ****getDefaultClientUrl**(): string - Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)getPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L43)abstractisConnected * ****isConnected**(): Promise\ - Are we connected to the database *** #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L85)rollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - #### Parameters * ##### ctx: any * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)setMetadata * ****setMetadata**(metadata): void - #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)setPlatform * ****setPlatform**(platform): void - #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L73)transactional * ****transactional**\(cb, options): Promise\ - #### Parameters * ##### cb: (trx) => Promise\ * ##### optionaloptions: { ctx?: any; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } * ##### optionalctx: any * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/interface/ConnectionConfig.md # ConnectionConfig ## Index[**](#Index) ### Properties * [**database](#database) * [**host](#host) * [**password](#password) * [**port](#port) * [**schema](#schema) * [**user](#user) ## Properties[**](#Properties) ### [**](#database)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L187)optionaldatabase **database? : string ### [**](#host)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L183)optionalhost **host? : string ### [**](#password)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L186)optionalpassword **password? : string | () => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ | [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)<[DynamicPassword](https://mikro-orm.io/api/core/interface/DynamicPassword.md)> ### [**](#port)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L184)optionalport **port? : number ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L188)optionalschema **schema? : string ### [**](#user)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L185)optionaluser **user? : string --- # Source: https://mikro-orm.io/api/core/class/ConnectionException.md # ConnectionException Base class for all connection related errors detected in the driver. ### Hierarchy * [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) * *ConnectionException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new ConnectionException**(previous): [ConnectionException](https://mikro-orm.io/api/core/class/ConnectionException.md) - Inherited from DriverException.constructor #### Parameters * ##### previous: Error #### Returns [ConnectionException](https://mikro-orm.io/api/core/class/ConnectionException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from DriverException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from DriverException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from DriverException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from DriverException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from DriverException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from DriverException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from DriverException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from DriverException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from DriverException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from DriverException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from DriverException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from DriverException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/ConnectionOptions.md # ConnectionOptions ### Hierarchy * *ConnectionOptions* * [MikroORMOptions](https://mikro-orm.io/api/core/interface/MikroORMOptions.md) ## Index[**](#Index) ### Properties * [**charset](#charset) * [**clientUrl](#clientUrl) * [**collate](#collate) * [**dbName](#dbName) * [**driverOptions](#driverOptions) * [**host](#host) * [**multipleStatements](#multipleStatements) * [**name](#name) * [**password](#password) * [**pool](#pool) * [**port](#port) * [**schema](#schema) * [**user](#user) ## Properties[**](#Properties) ### [**](#charset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L522)optionalcharset **charset? : string ### [**](#clientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L517)optionalclientUrl **clientUrl? : string ### [**](#collate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L523)optionalcollate **collate? : string ### [**](#dbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L514)optionaldbName **dbName? : string ### [**](#driverOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L526)optionaldriverOptions **driverOptions? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#host)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L518)optionalhost **host? : string ### [**](#multipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L524)optionalmultipleStatements **multipleStatements? : boolean ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L516)optionalname **name? : string ### [**](#password)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L521)optionalpassword **password? : string | () => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ | [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)<[DynamicPassword](https://mikro-orm.io/api/core/interface/DynamicPassword.md)> ### [**](#pool)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L525)optionalpool **pool? : [PoolConfig](https://mikro-orm.io/api/core/interface/PoolConfig.md) ### [**](#port)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L519)optionalport **port? : number ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L515)optionalschema **schema? : string ### [**](#user)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L520)optionaluser **user? : string --- # Source: https://mikro-orm.io/api/core/class/ConstraintViolationException.md # ConstraintViolationException Base class for all constraint violation related errors detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *ConstraintViolationException* * [ForeignKeyConstraintViolationException](https://mikro-orm.io/api/core/class/ForeignKeyConstraintViolationException.md) * [CheckConstraintViolationException](https://mikro-orm.io/api/core/class/CheckConstraintViolationException.md) * [NotNullConstraintViolationException](https://mikro-orm.io/api/core/class/NotNullConstraintViolationException.md) * [UniqueConstraintViolationException](https://mikro-orm.io/api/core/class/UniqueConstraintViolationException.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new ConstraintViolationException**(previous): [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/CountOptions.md # CountOptions \ ### Hierarchy * *CountOptions* * [LoadCountOptions](https://mikro-orm.io/api/core/interface/LoadCountOptions.md) ## Index[**](#Index) ### Properties * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**ctx](#ctx) * [**filters](#filters) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateWhere](#populateWhere) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L248)optionalcache **cache? : number | boolean | \[string, number] ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L258)optionalcomments **comments? : string | string\[] sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L253)optionalconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L252)optionalctx **ctx? : any ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L244)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L254)optionalflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L246)optionalgroupBy **groupBy? : string | readonly string\[] ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L247)optionalhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L260)optionalhintComments **hintComments? : string | string\[] sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L256)optionalindexHint **indexHint? : string sql only ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L261)optionalloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L262)optionallogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L249)optionalpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L251)optionalpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L250)optionalpopulateWhere **populateWhere? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ | [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L245)optionalschema **schema? : string --- # Source: https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md # CountQueryBuilder \ SQL query builder with fluent interface. ``` const qb = orm.em.createQueryBuilder(Publisher); qb.select('*') .where({ name: 'test 123', type: PublisherType.GLOBAL, }) .orderBy({ name: QueryOrder.DESC, type: QueryOrder.ASC, }) .limit(2, 1); const publisher = await qb.getSingleResult(); ``` ### Hierarchy * [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * *CountQueryBuilder* ## Index[**](#Index) ### Accessors * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResult](#getResult) * [**getResultAndCount](#getResultAndCount) * [**getResultList](#getResultList) * [**getSingleResult](#getSingleResult) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Accessors[**](#Accessors) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias * **get alias(): string - Inherited from QueryBuilder.alias #### Returns string ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper * **get helper(): QueryBuilderHelper - Inherited from QueryBuilder.helper #### Returns QueryBuilderHelper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias * **get mainAlias(): [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ - Inherited from QueryBuilder.mainAlias #### Returns [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from QueryBuilder.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from QueryBuilder.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from QueryBuilder.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from QueryBuilder.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from QueryBuilder.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from QueryBuilder.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from QueryBuilder.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from QueryBuilder.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2032)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2033)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2034)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2035)execute * ****execute**\(method, mapResults): Promise\ * ****execute**\(method, mapResults): Promise\ * ****execute**\(method, mapResults): Promise\ * ****execute**\(method, mapResults): Promise\ - Overrides QueryBuilder.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from QueryBuilder.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from QueryBuilder.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from QueryBuilder.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from QueryBuilder.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from QueryBuilder.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from QueryBuilder.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from QueryBuilder.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1054)inheritedgetResult * ****getResult**(): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Inherited from QueryBuilder.getResult Alias for `qb.getResultList()` *** #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[Entity\[], number]> - Inherited from QueryBuilder.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[Entity\[], number]> ### [**](#getResultList)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1061)inheritedgetResultList * ****getResultList**(limit): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Inherited from QueryBuilder.getResultList Executes the query, returning array of results *** #### Parameters * ##### optionallimit: number #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#getSingleResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1097)inheritedgetSingleResult * ****getSingleResult**(): Promise\ - Inherited from QueryBuilder.getSingleResult Executes the query, returning the first result or null *** #### Returns Promise\ ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from QueryBuilder.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from QueryBuilder.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from QueryBuilder.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from QueryBuilder.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from QueryBuilder.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from QueryBuilder.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from QueryBuilder.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from QueryBuilder.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from QueryBuilder.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from QueryBuilder.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from QueryBuilder.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from QueryBuilder.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from QueryBuilder.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from QueryBuilder.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from QueryBuilder.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from QueryBuilder.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from QueryBuilder.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from QueryBuilder.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2036)then * ****then**\(onfulfilled, onrejected): Promise\ - Overrides QueryBuilder.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise\ ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from QueryBuilder.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from QueryBuilder.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from QueryBuilder.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from QueryBuilder.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L532)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L533)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L534)inheritedwhere * ****where**(cond, operator): this * ****where**(cond, params, operator): this - Inherited from QueryBuilder.where #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from QueryBuilder.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from QueryBuilder.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/interface/CreateContextOptions.md # CreateContextOptions ## Index[**](#Index) ### Properties * [**loggerContext](#loggerContext) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L74)optionalloggerContext **loggerContext? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L73)optionalschema **schema? : string --- # Source: https://mikro-orm.io/api/core/interface/CreateOptions.md # CreateOptions \ ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**managed](#managed) * [**partial](#partial) * [**persist](#persist) * [**processOnCreateHooksEarly](#processOnCreateHooksEarly) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2416)optionalconvertCustomTypes **convertCustomTypes? : Convert convert raw database values based on mapped types (by default, already converted values are expected) ### [**](#managed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2408)optionalmanaged **managed? : boolean creates a managed entity instance instead, bypassing the constructor call ### [**](#partial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2414)optionalpartial **partial? : boolean this option disables the strict typing which requires all mandatory properties to have value, it has no effect on runtime ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2412)optionalpersist **persist? : boolean persist the entity automatically - this is the default behavior and is also configurable globally via `persistOnCreate` option ### [**](#processOnCreateHooksEarly)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2421)optionalprocessOnCreateHooksEarly **processOnCreateHooksEarly? : boolean Property `onCreate` hooks are normally executed during `flush` operation. With this option, they will be processed early inside `em.create()` method. ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2410)optionalschema **schema? : string create entity in a specific schema - alternatively, use `wrap(entity).setSchema()` --- # Source: https://mikro-orm.io/api/core/function/CreateRequestContext.md # CreateRequestContext ### Callable * ****CreateRequestContext**\(context, respectExistingContext): MethodDecorator *** * #### Parameters * ##### optionalcontext: ContextProvider\ * ##### respectExistingContext: boolean = false #### Returns MethodDecorator --- # Source: https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md # CreateSchemaOptions ### Hierarchy * *CreateSchemaOptions* * [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) * [RefreshDatabaseOptions](https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md) * [MongoCreateSchemaOptions](https://mikro-orm.io/api/mongodb/interface/MongoCreateSchemaOptions.md) ## Index[**](#Index) ### Properties * [**schema](#schema) * [**wrap](#wrap) ## Properties[**](#Properties) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L871)optionalschema **schema? : string ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L870)optionalwrap **wrap? : boolean --- # Source: https://mikro-orm.io/api/core/class/Cursor.md # Cursor \ As an alternative to the offset-based pagination with `limit` and `offset`, we can paginate based on a cursor. A cursor is an opaque string that defines a specific place in ordered entity graph. You can use `em.findByCursor()` to access those options. Under the hood, it will call `em.find()` and `em.count()` just like the `em.findAndCount()` method, but will use the cursor options instead. Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option is required. Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. * `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time * `before` and `after` specify the previous cursor value ``` const currentCursor = await em.findByCursor(User, {}, { first: 10, after: previousCursor, // can be either string or `Cursor` instance orderBy: { id: 'desc' }, }); // to fetch next page const nextCursor = await em.findByCursor(User, {}, { first: 10, after: currentCursor.endCursor, // or currentCursor.endCursor orderBy: { id: 'desc' }, }); ``` The `Cursor` object provides the following interface: ``` Cursor { items: [ User { ... }, User { ... }, User { ... }, ... ], totalCount: 50, length: 10, startCursor: 'WzRd', endCursor: 'WzZd', hasPrevPage: true, hasNextPage: true, } ``` ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**hasNextPage](#hasNextPage) * [**hasPrevPage](#hasPrevPage) * [**items](#items) * [**totalCount](#totalCount) ### Accessors * [**endCursor](#endCursor) * [**length](#length) * [**startCursor](#startCursor) ### Methods * [**\[iterator\]](#\[iterator]) * [**from](#from) * [**decode](#decode) * [**encode](#encode) * [**for](#for) * [**getDefinition](#getDefinition) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L71)constructor * ****new Cursor**\(items, totalCount, options, meta): [Cursor](https://mikro-orm.io/api/core/class/Cursor.md)\ - #### Parameters * ##### items: [Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[] * ##### totalCount: IncludeCount extends true ? number : undefined * ##### options: [FindByCursorOptions](https://mikro-orm.io/api/core/interface/FindByCursorOptions.md)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [Cursor](https://mikro-orm.io/api/core/class/Cursor.md)\ ## Properties[**](#Properties) ### [**](#hasNextPage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L67)readonlyhasNextPage **hasNextPage: boolean ### [**](#hasPrevPage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L66)readonlyhasPrevPage **hasPrevPage: boolean ### [**](#items)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L72)readonlyitems **items: [Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[] ### [**](#totalCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L73)readonlytotalCount **totalCount: IncludeCount extends true ? number : undefined ## Accessors[**](#Accessors) ### [**](#endCursor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L103)endCursor * **get endCursor(): null | string - #### Returns null | string ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L153)length * **get length(): number - #### Returns number ### [**](#startCursor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L95)startCursor * **get startCursor(): null | string - #### Returns null | string ## Methods[**](#Methods) ### [**](#\[iterator])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L147)\[iterator] * ****\[iterator]**(): IterableIterator<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, any, any> - #### Returns IterableIterator<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, any, any> ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L114)from * ****from**(entity): string - Computes the cursor value for a given entity. *** #### Parameters * ##### entity: Entity | [Loaded](https://mikro-orm.io/api/core.md#Loaded)\ #### Returns string ### [**](#decode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L169)staticdecode * ****decode**(value): unknown\[] - #### Parameters * ##### value: string #### Returns unknown\[] ### [**](#encode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L165)staticencode * ****encode**(value): string - #### Parameters * ##### value: unknown\[] #### Returns string ### [**](#for)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L160)staticfor * ****for**\(meta, entity, orderBy): string - Computes the cursor value for given entity and order definition. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### entity: [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ * ##### orderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ #### Returns string ### [**](#getDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L179)staticgetDefinition * ****getDefinition**\(meta, orderBy): \[never, [QueryOrder](https://mikro-orm.io/api/core/enum/QueryOrder.md)]\[] - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### orderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ #### Returns \[never, [QueryOrder](https://mikro-orm.io/api/core/enum/QueryOrder.md)]\[] --- # Source: https://mikro-orm.io/api/core/class/CursorError.md # CursorError \ ### Hierarchy * [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\ * *CursorError* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**entity](#entity) * [**message](#message) * [**name](#name) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**getEntity](#getEntity) * [**cannotCommit](#cannotCommit) * [**cannotModifyInverseCollection](#cannotModifyInverseCollection) * [**cannotModifyReadonlyCollection](#cannotModifyReadonlyCollection) * [**cannotRemoveFromCollectionWithoutOrphanRemoval](#cannotRemoveFromCollectionWithoutOrphanRemoval) * [**cannotUseGlobalContext](#cannotUseGlobalContext) * [**cannotUseGroupOperatorsInsideScalars](#cannotUseGroupOperatorsInsideScalars) * [**cannotUseOperatorsInsideEmbeddables](#cannotUseOperatorsInsideEmbeddables) * [**captureStackTrace](#captureStackTrace) * [**entityNotManaged](#entityNotManaged) * [**entityNotPopulated](#entityNotPopulated) * [**fromCollectionNotInitialized](#fromCollectionNotInitialized) * [**fromMergeWithoutPK](#fromMergeWithoutPK) * [**fromWrongPropertyType](#fromWrongPropertyType) * [**fromWrongRepositoryType](#fromWrongRepositoryType) * [**invalidCompositeIdentifier](#invalidCompositeIdentifier) * [**invalidEmbeddableQuery](#invalidEmbeddableQuery) * [**invalidPropertyName](#invalidPropertyName) * [**invalidType](#invalidType) * [**missingValue](#missingValue) * [**notDiscoveredEntity](#notDiscoveredEntity) * [**notEntity](#notEntity) * [**prepareStackTrace](#prepareStackTrace) * [**propertyRequired](#propertyRequired) * [**transactionRequired](#transactionRequired) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)constructor * ****new CursorError**\(message, entity): [CursorError](https://mikro-orm.io/api/core/class/CursorError.md)\ - Inherited from ValidationError.constructor #### Parameters * ##### message: string * ##### optionalentity: T #### Returns [CursorError](https://mikro-orm.io/api/core/class/CursorError.md)\ ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ValidationError.cause ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)optionalreadonlyinheritedentity **entity? : T Inherited from ValidationError.entity ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ValidationError.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ValidationError.name ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ValidationError.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ValidationError.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L17)inheritedgetEntity * ****getEntity**(): undefined | Partial\ - Inherited from ValidationError.getEntity Gets instance of entity that caused this error. *** #### Returns undefined | Partial\ ### [**](#cannotCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L116)staticinheritedcannotCommit * ****cannotCommit**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotCommit #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyInverseCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L90)staticinheritedcannotModifyInverseCollection * ****cannotModifyInverseCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyInverseCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyReadonlyCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L99)staticinheritedcannotModifyReadonlyCollection * ****cannotModifyReadonlyCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyReadonlyCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotRemoveFromCollectionWithoutOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L103)staticinheritedcannotRemoveFromCollectionWithoutOrphanRemoval * ****cannotRemoveFromCollectionWithoutOrphanRemoval**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotRemoveFromCollectionWithoutOrphanRemoval #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L120)staticinheritedcannotUseGlobalContext * ****cannotUseGlobalContext**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGlobalContext #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGroupOperatorsInsideScalars)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L128)staticinheritedcannotUseGroupOperatorsInsideScalars * ****cannotUseGroupOperatorsInsideScalars**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGroupOperatorsInsideScalars #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseOperatorsInsideEmbeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L124)staticinheritedcannotUseOperatorsInsideEmbeddables * ****cannotUseOperatorsInsideEmbeddables**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseOperatorsInsideEmbeddables #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ValidationError.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#entityNotManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L49)staticinheritedentityNotManaged * ****entityNotManaged**(entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.entityNotManaged #### Parameters * ##### entity: Partial\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#entityNotPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L140)staticentityNotPopulated * ****entityNotPopulated**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entity: Partial\ * ##### prop: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromCollectionNotInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L34)staticinheritedfromCollectionNotInitialized * ****fromCollectionNotInitialized**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromCollectionNotInitialized #### Parameters * ##### entity: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromMergeWithoutPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L41)staticinheritedfromMergeWithoutPK * ****fromMergeWithoutPK**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromMergeWithoutPK #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongPropertyType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L21)staticinheritedfromWrongPropertyType * ****fromWrongPropertyType**(entity, property, expectedType, givenType, givenValue): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongPropertyType #### Parameters * ##### entity: Partial\ * ##### property: string * ##### expectedType: string * ##### givenType: string * ##### givenValue: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L28)staticinheritedfromWrongRepositoryType * ****fromWrongRepositoryType**(entityName, repoType, method): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongRepositoryType #### Parameters * ##### entityName: string * ##### repoType: string * ##### method: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidCompositeIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L112)staticinheritedinvalidCompositeIdentifier * ****invalidCompositeIdentifier**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidCompositeIdentifier #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidEmbeddableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L132)staticinheritedinvalidEmbeddableQuery * ****invalidEmbeddableQuery**(className, propName, embeddableType): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidEmbeddableQuery #### Parameters * ##### className: string * ##### propName: string * ##### embeddableType: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidPropertyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L71)staticinheritedinvalidPropertyName * ****invalidPropertyName**(entityName, invalid): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidPropertyName #### Parameters * ##### entityName: string * ##### invalid: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L75)staticinheritedinvalidType * ****invalidType**(type, value, mode): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidType #### Parameters * ##### type: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ * ##### value: any * ##### mode: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#missingValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L144)staticmissingValue * ****missingValue**(entityName, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entityName: string * ##### prop: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notDiscoveredEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L58)staticinheritednotDiscoveredEntity * ****notDiscoveredEntity**(data, meta, action): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notDiscoveredEntity #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### action: string = 'persist' #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L53)staticinheritednotEntity * ****notEntity**(owner, prop, data): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notEntity #### Parameters * ##### owner: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### data: any #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ValidationError.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any ### [**](#propertyRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L85)staticinheritedpropertyRequired * ****propertyRequired**(entity, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.propertyRequired #### Parameters * ##### entity: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#transactionRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L45)staticinheritedtransactionRequired * ****transactionRequired**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.transactionRequired #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> --- # Source: https://mikro-orm.io/api/core/class/DatabaseDriver.md # abstractDatabaseDriver \ ### Hierarchy * *DatabaseDriver* * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md) * [MongoDriver](https://mikro-orm.io/api/mongodb/class/MongoDriver.md) ### Implements * [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)\ ## Index[**](#Index) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L42)\[EntityManagerType] **\[EntityManagerType]: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[DatabaseDriver](https://mikro-orm.io/api/core/class/DatabaseDriver.md)\> Implementation of IDatabaseDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Implementation of IDatabaseDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)aggregate * ****aggregate**(entityName, pipeline): Promise\ - Implementation of IDatabaseDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)close * ****close**(force): Promise\ - Implementation of IDatabaseDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)connect * ****connect**(): Promise\ - Implementation of IDatabaseDriver.connect #### Returns Promise\ ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Implementation of IDatabaseDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L72)abstractcount * ****count**\(entityName, where, options): Promise\ - Implementation of IDatabaseDriver.count #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L85)countVirtual * ****countVirtual**\(entityName, where, options): Promise\ - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L74)createEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Implementation of IDatabaseDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L56)abstractfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Implementation of IDatabaseDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L58)abstractfindOne * ****findOne**\(entityName, where, options): Promise\> - Implementation of IDatabaseDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L80)findVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Implementation of IDatabaseDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)getConnection * ****getConnection**(type): C - Implementation of IDatabaseDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns C ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)getDependencies * ****getDependencies**(): string\[] - Implementation of IDatabaseDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)getMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Implementation of IDatabaseDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L153)getPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Implementation of IDatabaseDriver.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L93)loadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Implementation of IDatabaseDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### optionalwhere: any * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L463)lockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Implementation of IDatabaseDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L116)mapResult * ****mapResult**\(result, meta, populate): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Implementation of IDatabaseDriver.mapResult #### Parameters * ##### result: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L70)abstractnativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Implementation of IDatabaseDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L60)abstractnativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Implementation of IDatabaseDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionaloptions: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L62)abstractnativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Implementation of IDatabaseDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### optionaloptions: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L64)abstractnativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Implementation of IDatabaseDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionaloptions: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L66)nativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Implementation of IDatabaseDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### optionaloptions: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)reconnect * ****reconnect**(): Promise\ - Implementation of IDatabaseDriver.reconnect #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)setMetadata * ****setMetadata**(metadata): void - Implementation of IDatabaseDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L97)syncCollections * ****syncCollections**\(collections, options): Promise\ - Implementation of IDatabaseDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md # DatabaseObjectExistsException Base class for all already existing database object related errors detected in the driver. A database object is considered any asset that can be created in a database such as schemas, tables, views, sequences, triggers, constraints, indexes, functions, stored procedures etc. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *DatabaseObjectExistsException* * [TableExistsException](https://mikro-orm.io/api/core/class/TableExistsException.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new DatabaseObjectExistsException**(previous): [DatabaseObjectExistsException](https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [DatabaseObjectExistsException](https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md # DatabaseObjectNotFoundException Base class for all unknown database object related errors detected in the driver. A database object is considered any asset that can be created in a database such as schemas, tables, views, sequences, triggers, constraints, indexes, functions, stored procedures etc. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *DatabaseObjectNotFoundException* * [TableNotFoundException](https://mikro-orm.io/api/core/class/TableNotFoundException.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new DatabaseObjectNotFoundException**(previous): [DatabaseObjectNotFoundException](https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [DatabaseObjectNotFoundException](https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/enum/DataloaderType.md # DataloaderType ## Index[**](#Index) ### Enumeration Members * [**ALL](#ALL) * [**COLLECTION](#COLLECTION) * [**NONE](#NONE) * [**REFERENCE](#REFERENCE) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#ALL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L153)ALL **ALL: 3 ### [**](#COLLECTION)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L152)COLLECTION **COLLECTION: 2 ### [**](#NONE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L150)NONE **NONE: 0 ### [**](#REFERENCE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L151)REFERENCE **REFERENCE: 1 --- # Source: https://mikro-orm.io/api/core/class/DataloaderUtils.md # DataloaderUtils ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**entitiesAndOptsMapToQueries](#entitiesAndOptsMapToQueries) * [**getColBatchLoadFn](#getColBatchLoadFn) * [**getColFilter](#getColFilter) * [**getDataloaderType](#getDataloaderType) * [**getManyToManyColBatchLoadFn](#getManyToManyColBatchLoadFn) * [**getRefBatchLoadFn](#getRefBatchLoadFn) * [**groupInversedOrMappedKeysByEntityAndOpts](#groupInversedOrMappedKeysByEntityAndOpts) * [**groupPrimaryKeysByEntityAndOpts](#groupPrimaryKeysByEntityAndOpts) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new DataloaderUtils**(): [DataloaderUtils](https://mikro-orm.io/api/core/class/DataloaderUtils.md) - #### Returns [DataloaderUtils](https://mikro-orm.io/api/core/class/DataloaderUtils.md) ## Methods[**](#Methods) ### [**](#entitiesAndOptsMapToQueries)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L112)staticentitiesAndOptsMapToQueries * ****entitiesAndOptsMapToQueries**(entitiesAndOptsMap, em): Promise<\[string, any\[]]>\[] - Turn the entity+options map into actual queries. The keys are the entity names + a stringified version of the options and the values are filter Maps which will be used as the values of an $or operator so we end up with a query per entity+opts. We must populate the inverse side of the relationship in order to be able to later retrieve the PK(s) from its item(s). Together with the query the promises will also return the key which can be used to narrow down the results pertaining to a certain set of options. *** #### Parameters * ##### entitiesAndOptsMap: Map\>> * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns Promise<\[string, any\[]]>\[] ### [**](#getColBatchLoadFn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L183)staticgetColBatchLoadFn * ****getColBatchLoadFn**(em): BatchLoadFn<\[[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, Omit<[InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\, dataloader>?], any> - Returns the 1:M collection dataloader batchLoadFn, which aggregates collections by entity, makes one query per entity and maps each input collection to the corresponding result. *** #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns BatchLoadFn<\[[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, Omit<[InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\, dataloader>?], any> ### [**](#getColFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L157)staticgetColFilter * ****getColFilter**\(collection): (result) => result is S - Creates a filter which returns the results pertaining to a certain collection. First checks if the Entity type matches, then retrieves the inverse side of the relationship where the filtering will be done in order to match the target collection. *** #### Parameters * ##### collection: [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ #### Returns (result) => result is S * * **(result): result is S - #### Parameters * ##### result: T #### Returns result is S ### [**](#getDataloaderType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L248)staticgetDataloaderType * ****getDataloaderType**(dataloaderCfg): [DataloaderType](https://mikro-orm.io/api/core/enum/DataloaderType.md) - #### Parameters * ##### dataloaderCfg: boolean | [DataloaderType](https://mikro-orm.io/api/core/enum/DataloaderType.md) #### Returns [DataloaderType](https://mikro-orm.io/api/core/enum/DataloaderType.md) ### [**](#getManyToManyColBatchLoadFn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L207)staticgetManyToManyColBatchLoadFn * ****getManyToManyColBatchLoadFn**(em): BatchLoadFn<\[[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, Omit<[InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\, dataloader>?], any> - Returns the M:N collection dataloader batchLoadFn, which aggregates collections by entity, makes one query per entity and maps each input collection to the corresponding result. *** #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns BatchLoadFn<\[[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, Omit<[InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\, dataloader>?], any> ### [**](#getRefBatchLoadFn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L49)staticgetRefBatchLoadFn * ****getRefBatchLoadFn**(em): BatchLoadFn<\[[Reference](https://mikro-orm.io/api/core/class/Reference.md)\, Omit<[LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md)\, dataloader>?], any> - Returns the reference dataloader batchLoadFn, which aggregates references by entity, makes one query per entity and maps each input reference to the corresponding result. *** #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns BatchLoadFn<\[[Reference](https://mikro-orm.io/api/core/class/Reference.md)\, Omit<[LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md)\, dataloader>?], any> ### [**](#groupInversedOrMappedKeysByEntityAndOpts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L74)staticgroupInversedOrMappedKeysByEntityAndOpts * ****groupInversedOrMappedKeysByEntityAndOpts**(collsWithOpts): Map\>> - Groups collections by entity and returns a Map whose keys are the entity names and whose values are filter Maps which we can use to narrow down the find query to return just the items of the collections that have been dataloaded. The entries of the filter Map will be used as the values of an $or operator so we end up with a query per entity. *** #### Parameters * ##### collsWithOpts: readonly \[[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, Omit<[InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\, dataloader>?]\[] #### Returns Map\>> ### [**](#groupPrimaryKeysByEntityAndOpts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L16)staticgroupPrimaryKeysByEntityAndOpts * ****groupPrimaryKeysByEntityAndOpts**(refsWithOpts): Map\> - Groups identified references by entity and returns a Map with the class name as the index and the corresponding primary keys as the value. *** #### Parameters * ##### refsWithOpts: readonly \[[Reference](https://mikro-orm.io/api/core/class/Reference.md)\, Omit<[LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md)\, dataloader>?]\[] #### Returns Map\> --- # Source: https://mikro-orm.io/api/core/class/DateTimeType.md # DateTimeType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *DateTimeType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new DateTimeType**(): [DateTimeType](https://mikro-orm.io/api/core/class/DateTimeType.md) - Inherited from Type.constructor #### Returns [DateTimeType](https://mikro-orm.io/api/core/class/DateTimeType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateTimeType.ts#L15)runtimeType * **get runtimeType(): string - Overrides Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateTimeType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: string * ##### b: string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: Date * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): Date - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns Date ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateTimeType.ts#L19)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateTimeType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateTimeType.ts#L23)getDefaultLength * ****getDefaultLength**(platform): number - Overrides Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): string | Date - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: Date * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string | Date ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/DateType.md # DateType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *DateType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new DateType**(): [DateType](https://mikro-orm.io/api/core/class/DateType.md) - Inherited from Type.constructor #### Returns [DateType](https://mikro-orm.io/api/core/class/DateType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateType.ts#L7)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateType.ts#L15)convertToJSValue * ****convertToJSValue**(value, platform): undefined | null | string - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: any * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateType.ts#L11)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateType.ts#L19)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DateType.ts#L23)getDefaultLength * ****getDefaultLength**(platform): number - Overrides Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/DeadlockException.md # DeadlockException Exception for a deadlock error of a transaction detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *DeadlockException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new DeadlockException**(previous): [DeadlockException](https://mikro-orm.io/api/core/class/DeadlockException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [DeadlockException](https://mikro-orm.io/api/core/class/DeadlockException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/DecimalType.md # DecimalType \ Type that maps an SQL DECIMAL to a JS string or number. ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\, string> * *DecimalType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**mode](#mode) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DecimalType.ts#L10)constructor * ****new DecimalType**\(mode): [DecimalType](https://mikro-orm.io/api/core/class/DecimalType.md)\ - Overrides Type.constructor #### Parameters * ##### optionalmode: Mode #### Returns [DecimalType](https://mikro-orm.io/api/core/class/DecimalType.md)\ ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#mode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DecimalType.ts#L10)publicoptionalmode **mode? : Mode ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DecimalType.ts#L40)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DecimalType.ts#L22)compareValues * ****compareValues**(a, b): boolean - Overrides Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: string * ##### b: string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: JSTypeByMode\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DecimalType.ts#L14)convertToJSValue * ****convertToJSValue**(value): JSTypeByMode\ - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: string #### Returns JSTypeByMode\ ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DecimalType.ts#L36)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): string | JSTypeByMode\ - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: JSTypeByMode\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string | JSTypeByMode\ ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/DefaultLogger.md # DefaultLogger ### Hierarchy * *DefaultLogger* * [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) ### Implements * [Logger](https://mikro-orm.io/api/core/interface/Logger.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**debugMode](#debugMode) * [**writer](#writer) ### Methods * [**error](#error) * [**isEnabled](#isEnabled) * [**log](#log) * [**logQuery](#logQuery) * [**setDebugMode](#setDebugMode) * [**warn](#warn) * [**create](#create) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L12)constructor * ****new DefaultLogger**(options): [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) - #### Parameters * ##### options: [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) #### Returns [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) ## Properties[**](#Properties) ### [**](#debugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L7)debugMode **debugMode: boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] ### [**](#writer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L8)readonlywriter **writer: (message) => void #### Type declaration * * **(message): void - #### Parameters * ##### message: string #### Returns void ## Methods[**](#Methods) ### [**](#error)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L50)error * ****error**(namespace, message, context): void - Implementation of Logger.error Logs error message inside given namespace. *** #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#isEnabled)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L68)isEnabled * ****isEnabled**(namespace, context): boolean - Implementation of Logger.isEnabled #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns boolean ### [**](#log)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L22)log * ****log**(namespace, message, context): void - Implementation of Logger.log Logs a message inside given namespace. *** #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#logQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L85)logQuery * ****logQuery**(context): void - Implementation of Logger.logQuery Logs a message inside given namespace. *** #### Parameters * ##### context: { query: string } & [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#setDebugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L64)setDebugMode * ****setDebugMode**(debugMode): void - Implementation of Logger.setDebugMode Sets active namespaces. Pass `true` to enable all logging. *** #### Parameters * ##### debugMode: boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] #### Returns void ### [**](#warn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L57)warn * ****warn**(namespace, message, context): void - Implementation of Logger.warn Logs warning message inside given namespace. *** #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L114)staticcreate * ****create**(options): [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) - #### Parameters * ##### options: [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) #### Returns [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) --- # Source: https://mikro-orm.io/api/core/enum/DeferMode.md # DeferMode ## Index[**](#Index) ### Enumeration Members * [**INITIALLY\_DEFERRED](#INITIALLY_DEFERRED) * [**INITIALLY\_IMMEDIATE](#INITIALLY_IMMEDIATE) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#INITIALLY_DEFERRED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L230)INITIALLY\_DEFERRED **INITIALLY\_DEFERRED: deferred ### [**](#INITIALLY_IMMEDIATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L229)INITIALLY\_IMMEDIATE **INITIALLY\_IMMEDIATE: immediate --- # Source: https://mikro-orm.io/api/core/namespace/DefineConfig.md # DefineConfig ## Index[**](#Index) ### Interfaces * [**Brand](https://mikro-orm.io/api/core/namespace/DefineConfig.md#Brand) ### Variables * [**\_\_config](https://mikro-orm.io/api/core/namespace/DefineConfig.md#__config) ## Interfaces[**](#Interfaces) ### [**](#Brand)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L112)Brand **Brand: ### [**](#\[___config])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L113)optional\[\_\_\_config] **\[\_\_\_config]? : 1 ## Variables[**](#Variables) ### [**](#__config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L111)const\_\_config **\_\_config: unique symbol --- # Source: https://mikro-orm.io/api/core/interface/DefineEntityHooks.md # DefineEntityHooks \ ### Hierarchy * Partial\, keyof typeof [EventType](https://mikro-orm.io/api/core/enum/EventType.md)>>> * *DefineEntityHooks* ## Index[**](#Index) ### Methods * [**afterCreate](#afterCreate) * [**afterDelete](#afterDelete) * [**afterFlush](#afterFlush) * [**afterTransactionCommit](#afterTransactionCommit) * [**afterTransactionRollback](#afterTransactionRollback) * [**afterTransactionStart](#afterTransactionStart) * [**afterUpdate](#afterUpdate) * [**afterUpsert](#afterUpsert) * [**beforeCreate](#beforeCreate) * [**beforeDelete](#beforeDelete) * [**beforeFlush](#beforeFlush) * [**beforeTransactionCommit](#beforeTransactionCommit) * [**beforeTransactionRollback](#beforeTransactionRollback) * [**beforeTransactionStart](#beforeTransactionStart) * [**beforeUpdate](#beforeUpdate) * [**beforeUpsert](#beforeUpsert) * [**onFlush](#onFlush) * [**onInit](#onInit) * [**onLoad](#onLoad) ## Methods[**](#Methods) ### [**](#afterCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L27)optionalinheritedafterCreate **afterCreate? : Inherited from Partial.afterCreate ### [**](#afterDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L33)optionalinheritedafterDelete **afterDelete? : Inherited from Partial.afterDelete ### [**](#afterFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L36)optionalinheritedafterFlush **afterFlush? : Inherited from Partial.afterFlush ### [**](#afterTransactionCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L41)optionalinheritedafterTransactionCommit **afterTransactionCommit? : Inherited from Partial.afterTransactionCommit ### [**](#afterTransactionRollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L43)optionalinheritedafterTransactionRollback **afterTransactionRollback? : Inherited from Partial.afterTransactionRollback ### [**](#afterTransactionStart)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L39)optionalinheritedafterTransactionStart **afterTransactionStart? : Inherited from Partial.afterTransactionStart ### [**](#afterUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L29)optionalinheritedafterUpdate **afterUpdate? : Inherited from Partial.afterUpdate ### [**](#afterUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L31)optionalinheritedafterUpsert **afterUpsert? : Inherited from Partial.afterUpsert ### [**](#beforeCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L26)optionalinheritedbeforeCreate **beforeCreate? : Inherited from Partial.beforeCreate ### [**](#beforeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L32)optionalinheritedbeforeDelete **beforeDelete? : Inherited from Partial.beforeDelete ### [**](#beforeFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L34)optionalinheritedbeforeFlush **beforeFlush? : Inherited from Partial.beforeFlush ### [**](#beforeTransactionCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L40)optionalinheritedbeforeTransactionCommit **beforeTransactionCommit? : Inherited from Partial.beforeTransactionCommit ### [**](#beforeTransactionRollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L42)optionalinheritedbeforeTransactionRollback **beforeTransactionRollback? : Inherited from Partial.beforeTransactionRollback ### [**](#beforeTransactionStart)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L38)optionalinheritedbeforeTransactionStart **beforeTransactionStart? : Inherited from Partial.beforeTransactionStart ### [**](#beforeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L28)optionalinheritedbeforeUpdate **beforeUpdate? : Inherited from Partial.beforeUpdate ### [**](#beforeUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L30)optionalinheritedbeforeUpsert **beforeUpsert? : Inherited from Partial.beforeUpsert ### [**](#onFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L35)optionalinheritedonFlush **onFlush? : Inherited from Partial.onFlush ### [**](#onInit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L24)optionalinheritedonInit **onInit? : Inherited from Partial.onInit ### [**](#onLoad)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L25)optionalinheritedonLoad **onLoad? : Inherited from Partial.onLoad --- # Source: https://mikro-orm.io/api/core/interface/DeleteOptions.md # DeleteOptions \ ### Hierarchy * [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) * *DeleteOptions* ## Index[**](#Index) ### Properties * [**ctx](#ctx) * [**filters](#filters) * [**loggerContext](#loggerContext) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L289)optionalinheritedctx **ctx? : any Inherited from DriverMethodOptions.ctx ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L274)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L291)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from DriverMethodOptions.loggerContext ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L290)optionalinheritedschema **schema? : string Inherited from DriverMethodOptions.schema --- # Source: https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md # DeleteQueryBuilder \ ### Hierarchy * [RunQueryBuilder](https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md)\ * *DeleteQueryBuilder* ## Index[**](#Index) ### Properties * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResultAndCount](#getResultAndCount) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias **alias: string Inherited from RunQueryBuilder.alias ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper **helper: QueryBuilderHelper Inherited from RunQueryBuilder.helper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias **mainAlias: [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ Inherited from RunQueryBuilder.mainAlias ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from RunQueryBuilder.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from RunQueryBuilder.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from RunQueryBuilder.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from RunQueryBuilder.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from RunQueryBuilder.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from RunQueryBuilder.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from RunQueryBuilder.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from RunQueryBuilder.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2014)inheritedexecute * ****execute**\(method, mapResults): Promise\ - Inherited from RunQueryBuilder.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from RunQueryBuilder.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from RunQueryBuilder.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from RunQueryBuilder.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from RunQueryBuilder.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from RunQueryBuilder.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[T\[], number]> - Inherited from RunQueryBuilder.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[T\[], number]> ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from RunQueryBuilder.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from RunQueryBuilder.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from RunQueryBuilder.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from RunQueryBuilder.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from RunQueryBuilder.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from RunQueryBuilder.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from RunQueryBuilder.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from RunQueryBuilder.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from RunQueryBuilder.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from RunQueryBuilder.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from RunQueryBuilder.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2015)inheritedthen * ****then**\(onfulfilled, onrejected): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from RunQueryBuilder.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from RunQueryBuilder.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from RunQueryBuilder.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from RunQueryBuilder.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from RunQueryBuilder.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2013)inheritedwhere * ****where**(cond, params, operator): this - Inherited from RunQueryBuilder.where #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionalparams: any\[] | $and | $or * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from RunQueryBuilder.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from RunQueryBuilder.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/class/DoubleType.md # DoubleType Type that maps an SQL DOUBLE to a JS string or number. ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *DoubleType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new DoubleType**(): [DoubleType](https://mikro-orm.io/api/core/class/DoubleType.md) - Inherited from Type.constructor #### Returns [DoubleType](https://mikro-orm.io/api/core/class/DoubleType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DoubleType.ts#L22)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: string * ##### b: string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: string | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DoubleType.ts#L10)convertToJSValue * ****convertToJSValue**(value): string | number - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: string #### Returns string | number ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/DoubleType.ts#L18)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): string | number - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: string | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string | number ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/DriverException.md # DriverException Base class for all errors detected in the driver. ### Hierarchy * Error * *DriverException* * [ConnectionException](https://mikro-orm.io/api/core/class/ConnectionException.md) * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new DriverException**(previous): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides Error.constructor #### Parameters * ##### previous: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from Error.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalcode **code? : string ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalerrmsg **errmsg? : string ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalerrno **errno? : number ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from Error.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from Error.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalsqlMessage **sqlMessage? : string ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalsqlState **sqlState? : string ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from Error.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from Error.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from Error.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from Error.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/DriverMethodOptions.md # DriverMethodOptions ### Hierarchy * *DriverMethodOptions* * [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md) * [NativeDeleteOptions](https://mikro-orm.io/api/core/interface/NativeDeleteOptions.md) * [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) ## Index[**](#Index) ### Properties * [**ctx](#ctx) * [**loggerContext](#loggerContext) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L289)optionalctx **ctx? : any ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L291)optionalloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L290)optionalschema **schema? : string --- # Source: https://mikro-orm.io/api/core/interface/DropSchemaOptions.md # DropSchemaOptions ## Index[**](#Index) ### Properties * [**dropDb](#dropDb) * [**dropForeignKeys](#dropForeignKeys) * [**dropMigrationsTable](#dropMigrationsTable) * [**schema](#schema) * [**wrap](#wrap) ## Properties[**](#Properties) ### [**](#dropDb)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L889)optionaldropDb **dropDb? : boolean ### [**](#dropForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L888)optionaldropForeignKeys **dropForeignKeys? : boolean ### [**](#dropMigrationsTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L887)optionaldropMigrationsTable **dropMigrationsTable? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L890)optionalschema **schema? : string ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L886)optionalwrap **wrap? : boolean --- # Source: https://mikro-orm.io/api/core/interface/DynamicPassword.md # DynamicPassword ## Index[**](#Index) ### Properties * [**expirationChecker](#expirationChecker) * [**password](#password) ## Properties[**](#Properties) ### [**](#expirationChecker)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L510)optionalexpirationChecker **expirationChecker? : () => boolean #### Type declaration * * **(): boolean - #### Returns boolean ### [**](#password)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L509)password **password: string --- # Source: https://mikro-orm.io/api/core/interface/Edge.md # Edge ## Index[**](#Index) ### Properties * [**from](#from) * [**to](#to) * [**weight](#weight) ## Properties[**](#Properties) ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L17)from **from: string ### [**](#to)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L18)to **to: string ### [**](#weight)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L19)weight **weight: number --- # Source: https://mikro-orm.io/api/core/function/Embeddable.md # Embeddable ### Callable * ****Embeddable**(options): \(target) => T & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) *** * #### Parameters * ##### options: [EmbeddableOptions](https://mikro-orm.io/api/core.md#EmbeddableOptions) = {} #### Returns \(target) => T & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) * * **\(target): T & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - #### Parameters * ##### target: T & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns T & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) --- # Source: https://mikro-orm.io/api/core/function/Embedded.md # Embedded ### Callable * ****Embedded**\(type, options): (target, propertyName) => any *** * #### Parameters * ##### type: [EmbeddedOptions](https://mikro-orm.io/api/core/interface/EmbeddedOptions.md)\ | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ | [EntityName](https://mikro-orm.io/api/core.md#EntityName)\\[] = {} * ##### options: [EmbeddedOptions](https://mikro-orm.io/api/core/interface/EmbeddedOptions.md)\ = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/EmbeddedOptions.md # EmbeddedOptions \ ### Hierarchy * [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ * *EmbeddedOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**array](#array) * [**autoincrement](#autoincrement) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nullable](#nullable) * [**object](#object) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**prefix](#prefix) * [**prefixMode](#prefixMode) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof Owner Inherited from PropertyOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#array)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L31)optionalarray **array? : boolean ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from PropertyOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from PropertyOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from PropertyOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from PropertyOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from PropertyOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from PropertyOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from PropertyOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from PropertyOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from PropertyOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L27)optionalentity **entity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ | [EntityName](https://mikro-orm.io/api/core.md#EntityName)\\[] ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from PropertyOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from PropertyOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from PropertyOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from PropertyOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from PropertyOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from PropertyOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof Owner Inherited from PropertyOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from PropertyOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from PropertyOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from PropertyOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from PropertyOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from PropertyOptions.index Explicitly specify index on a property. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from PropertyOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from PropertyOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from PropertyOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from PropertyOptions.nullable Set column as nullable for Generator. ### [**](#object)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L30)optionalobject **object? : boolean ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from PropertyOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from PropertyOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from PropertyOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from PropertyOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#prefix)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L28)optionalprefix **prefix? : string | boolean ### [**](#prefixMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L29)optionalprefixMode **prefixMode? : [EmbeddedPrefixMode](https://mikro-orm.io/api/core.md#EmbeddedPrefixMode) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from PropertyOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from PropertyOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from PropertyOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from PropertyOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from PropertyOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from PropertyOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from PropertyOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from PropertyOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from PropertyOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from PropertyOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from PropertyOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from PropertyOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from PropertyOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from PropertyOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/core/interface/EmptyOptions.md # EmptyOptions ### Hierarchy * Partial\> * *EmptyOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**array](#array) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**createForeignKeyConstraint](#createForeignKeyConstraint) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**deferMode](#deferMode) * [**deleteRule](#deleteRule) * [**eager](#eager) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**fixedOrder](#fixedOrder) * [**fixedOrderColumn](#fixedOrderColumn) * [**foreignKeyName](#foreignKeyName) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**inversedBy](#inversedBy) * [**inverseJoinColumn](#inverseJoinColumn) * [**inverseJoinColumns](#inverseJoinColumns) * [**items](#items) * [**joinColumn](#joinColumn) * [**joinColumns](#joinColumns) * [**lazy](#lazy) * [**length](#length) * [**mappedBy](#mappedBy) * [**mapToPk](#mapToPk) * [**name](#name) * [**nativeEnumName](#nativeEnumName) * [**nullable](#nullable) * [**object](#object) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**orderBy](#orderBy) * [**orphanRemoval](#orphanRemoval) * [**ownColumns](#ownColumns) * [**owner](#owner) * [**persist](#persist) * [**pivotEntity](#pivotEntity) * [**pivotTable](#pivotTable) * [**precision](#precision) * [**prefix](#prefix) * [**prefixMode](#prefixMode) * [**primary](#primary) * [**ref](#ref) * [**referenceColumnName](#referenceColumnName) * [**referencedColumnNames](#referencedColumnNames) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**updateRule](#updateRule) * [**version](#version) * [**where](#where) ## Properties[**](#Properties) ### [**](#accessor)inheritedaccessor **accessor: unknown Inherited from Partial.accessor ### [**](#array)inheritedarray **array: unknown Inherited from Partial.array ### [**](#autoincrement)inheritedautoincrement **autoincrement: unknown Inherited from Partial.autoincrement ### [**](#cascade)inheritedcascade **cascade: unknown Inherited from Partial.cascade ### [**](#check)inheritedcheck **check: unknown Inherited from Partial.check ### [**](#columnType)inheritedcolumnType **columnType: unknown Inherited from Partial.columnType ### [**](#columnTypes)inheritedcolumnTypes **columnTypes: unknown Inherited from Partial.columnTypes ### [**](#comment)inheritedcomment **comment: unknown Inherited from Partial.comment ### [**](#concurrencyCheck)inheritedconcurrencyCheck **concurrencyCheck: unknown Inherited from Partial.concurrencyCheck ### [**](#createForeignKeyConstraint)inheritedcreateForeignKeyConstraint **createForeignKeyConstraint: unknown Inherited from Partial.createForeignKeyConstraint ### [**](#customOrder)inheritedcustomOrder **customOrder: unknown Inherited from Partial.customOrder ### [**](#default)inheriteddefault **default: unknown Inherited from Partial.default ### [**](#defaultRaw)inheriteddefaultRaw **defaultRaw: unknown Inherited from Partial.defaultRaw ### [**](#deferMode)inheriteddeferMode **deferMode: unknown Inherited from Partial.deferMode ### [**](#deleteRule)inheriteddeleteRule **deleteRule: unknown Inherited from Partial.deleteRule ### [**](#eager)inheritedeager **eager: unknown Inherited from Partial.eager ### [**](#entity)inheritedentity **entity: unknown Inherited from Partial.entity ### [**](#extra)inheritedextra **extra: unknown Inherited from Partial.extra ### [**](#fieldName)inheritedfieldName **fieldName: unknown Inherited from Partial.fieldName ### [**](#fieldNames)inheritedfieldNames **fieldNames: unknown Inherited from Partial.fieldNames ### [**](#filters)inheritedfilters **filters: unknown Inherited from Partial.filters ### [**](#fixedOrder)inheritedfixedOrder **fixedOrder: unknown Inherited from Partial.fixedOrder ### [**](#fixedOrderColumn)inheritedfixedOrderColumn **fixedOrderColumn: unknown Inherited from Partial.fixedOrderColumn ### [**](#foreignKeyName)inheritedforeignKeyName **foreignKeyName: unknown Inherited from Partial.foreignKeyName ### [**](#formula)inheritedformula **formula: unknown Inherited from Partial.formula ### [**](#generated)inheritedgenerated **generated: unknown Inherited from Partial.generated ### [**](#getter)inheritedgetter **getter: unknown Inherited from Partial.getter ### [**](#getterName)inheritedgetterName **getterName: unknown Inherited from Partial.getterName ### [**](#groups)inheritedgroups **groups: unknown Inherited from Partial.groups ### [**](#hidden)inheritedhidden **hidden: unknown Inherited from Partial.hidden ### [**](#hydrate)inheritedhydrate **hydrate: unknown Inherited from Partial.hydrate ### [**](#ignoreSchemaChanges)inheritedignoreSchemaChanges **ignoreSchemaChanges: unknown Inherited from Partial.ignoreSchemaChanges ### [**](#index)inheritedindex **index: unknown Inherited from Partial.index ### [**](#inversedBy)inheritedinversedBy **inversedBy: unknown Inherited from Partial.inversedBy ### [**](#inverseJoinColumn)inheritedinverseJoinColumn **inverseJoinColumn: unknown Inherited from Partial.inverseJoinColumn ### [**](#inverseJoinColumns)inheritedinverseJoinColumns **inverseJoinColumns: unknown Inherited from Partial.inverseJoinColumns ### [**](#items)inheriteditems **items: unknown Inherited from Partial.items ### [**](#joinColumn)inheritedjoinColumn **joinColumn: unknown Inherited from Partial.joinColumn ### [**](#joinColumns)inheritedjoinColumns **joinColumns: unknown Inherited from Partial.joinColumns ### [**](#lazy)inheritedlazy **lazy: unknown Inherited from Partial.lazy ### [**](#length)inheritedlength **length: unknown Inherited from Partial.length ### [**](#mappedBy)inheritedmappedBy **mappedBy: unknown Inherited from Partial.mappedBy ### [**](#mapToPk)inheritedmapToPk **mapToPk: unknown Inherited from Partial.mapToPk ### [**](#name)inheritedname **name: unknown Inherited from Partial.name ### [**](#nativeEnumName)inheritednativeEnumName **nativeEnumName: unknown Inherited from Partial.nativeEnumName ### [**](#nullable)inheritednullable **nullable: unknown Inherited from Partial.nullable ### [**](#object)inheritedobject **object: unknown Inherited from Partial.object ### [**](#onCreate)inheritedonCreate **onCreate: unknown Inherited from Partial.onCreate ### [**](#onUpdate)inheritedonUpdate **onUpdate: unknown Inherited from Partial.onUpdate ### [**](#orderBy)inheritedorderBy **orderBy: unknown Inherited from Partial.orderBy ### [**](#orphanRemoval)inheritedorphanRemoval **orphanRemoval: unknown Inherited from Partial.orphanRemoval ### [**](#ownColumns)inheritedownColumns **ownColumns: unknown Inherited from Partial.ownColumns ### [**](#owner)inheritedowner **owner: unknown Inherited from Partial.owner ### [**](#persist)inheritedpersist **persist: unknown Inherited from Partial.persist ### [**](#pivotEntity)inheritedpivotEntity **pivotEntity: unknown Inherited from Partial.pivotEntity ### [**](#pivotTable)inheritedpivotTable **pivotTable: unknown Inherited from Partial.pivotTable ### [**](#precision)inheritedprecision **precision: unknown Inherited from Partial.precision ### [**](#prefix)inheritedprefix **prefix: unknown Inherited from Partial.prefix ### [**](#prefixMode)inheritedprefixMode **prefixMode: unknown Inherited from Partial.prefixMode ### [**](#primary)inheritedprimary **primary: unknown Inherited from Partial.primary ### [**](#ref)inheritedref **ref: unknown Inherited from Partial.ref ### [**](#referenceColumnName)inheritedreferenceColumnName **referenceColumnName: unknown Inherited from Partial.referenceColumnName ### [**](#referencedColumnNames)inheritedreferencedColumnNames **referencedColumnNames: unknown Inherited from Partial.referencedColumnNames ### [**](#returning)inheritedreturning **returning: unknown Inherited from Partial.returning ### [**](#runtimeType)inheritedruntimeType **runtimeType: unknown Inherited from Partial.runtimeType ### [**](#scale)inheritedscale **scale: unknown Inherited from Partial.scale ### [**](#serializedName)inheritedserializedName **serializedName: unknown Inherited from Partial.serializedName ### [**](#serializedPrimaryKey)inheritedserializedPrimaryKey **serializedPrimaryKey: unknown Inherited from Partial.serializedPrimaryKey ### [**](#serializer)inheritedserializer **serializer: unknown Inherited from Partial.serializer ### [**](#setter)inheritedsetter **setter: unknown Inherited from Partial.setter ### [**](#strategy)inheritedstrategy **strategy: unknown Inherited from Partial.strategy ### [**](#trackChanges)inheritedtrackChanges **trackChanges: unknown Inherited from Partial.trackChanges ### [**](#type)inheritedtype **type: unknown Inherited from Partial.type ### [**](#unique)inheritedunique **unique: unknown Inherited from Partial.unique ### [**](#unsigned)inheritedunsigned **unsigned: unknown Inherited from Partial.unsigned ### [**](#updateRule)inheritedupdateRule **updateRule: unknown Inherited from Partial.updateRule ### [**](#version)inheritedversion **version: unknown Inherited from Partial.version ### [**](#where)inheritedwhere **where: unknown Inherited from Partial.where --- # Source: https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md # EnsureDatabaseOptions ### Hierarchy * [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) * [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) * *EnsureDatabaseOptions* ## Index[**](#Index) ### Properties * [**clear](#clear) * [**create](#create) * [**forceCheck](#forceCheck) * [**schema](#schema) * [**truncate](#truncate) * [**wrap](#wrap) ## Properties[**](#Properties) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L880)optionalclear **clear? : boolean ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L881)optionalcreate **create? : boolean ### [**](#forceCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L882)optionalforceCheck **forceCheck? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L871)optionalinheritedschema **schema? : string Inherited from ClearDatabaseOptions.schema ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L876)optionalinheritedtruncate **truncate? : boolean Inherited from ClearDatabaseOptions.truncate ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L870)optionalinheritedwrap **wrap? : boolean Inherited from CreateSchemaOptions.wrap --- # Source: https://mikro-orm.io/api/mongodb/interface/EnsureIndexesOptions.md # EnsureIndexesOptions ## Index[**](#Index) ### Properties * [**ensureCollections](#ensureCollections) * [**retry](#retry) * [**retryLimit](#retryLimit) ## Properties[**](#Properties) ### [**](#ensureCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L269)optionalensureCollections **ensureCollections? : boolean ### [**](#retry)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L270)optionalretry **retry? : boolean | string\[] ### [**](#retryLimit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L271)optionalretryLimit **retryLimit? : number --- # Source: https://mikro-orm.io/api/core/function/EnsureRequestContext.md # EnsureRequestContext ### Callable * ****EnsureRequestContext**\(context): MethodDecorator *** * #### Parameters * ##### optionalcontext: ContextProvider\ #### Returns MethodDecorator --- # Source: https://mikro-orm.io/api/core/function/Entity.md # Entity ### Callable * ****Entity**\(options): (target) => void *** * #### Parameters * ##### options: [EntityOptions](https://mikro-orm.io/api/core.md#EntityOptions)\ ? P : T> = {} #### Returns (target) => void * * **(target): void - #### Parameters * ##### target: T #### Returns void --- # Source: https://mikro-orm.io/api/core/class/EntityAssigner.md # EntityAssigner ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**assign](#assign) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new EntityAssigner**(): [EntityAssigner](https://mikro-orm.io/api/core/class/EntityAssigner.md) - #### Returns [EntityAssigner](https://mikro-orm.io/api/core/class/EntityAssigner.md) ## Methods[**](#Methods) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L30)staticassign * ****assign**\(entity, data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> - #### Parameters * ##### entity: Entity * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### options: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ = {} #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> --- # Source: https://mikro-orm.io/api/core/class/EntityCaseNamingStrategy.md # EntityCaseNamingStrategy This strategy keeps original entity/property names for table/column. ### Hierarchy * [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) * *EntityCaseNamingStrategy* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**aliasName](#aliasName) * [**classToMigrationName](#classToMigrationName) * [**classToTableName](#classToTableName) * [**columnNameToProperty](#columnNameToProperty) * [**enumValueToEnumProperty](#enumValueToEnumProperty) * [**getClassName](#getClassName) * [**getEntityName](#getEntityName) * [**getEnumClassName](#getEnumClassName) * [**getEnumTypeName](#getEnumTypeName) * [**indexName](#indexName) * [**inverseSideName](#inverseSideName) * [**joinColumnName](#joinColumnName) * [**joinKeyColumnName](#joinKeyColumnName) * [**joinTableName](#joinTableName) * [**propertyToColumnName](#propertyToColumnName) * [**referenceColumnName](#referenceColumnName) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new EntityCaseNamingStrategy**(): [EntityCaseNamingStrategy](https://mikro-orm.io/api/core/class/EntityCaseNamingStrategy.md) - Inherited from AbstractNamingStrategy.constructor #### Returns [EntityCaseNamingStrategy](https://mikro-orm.io/api/core/class/EntityCaseNamingStrategy.md) ## Methods[**](#Methods) ### [**](#aliasName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L85)inheritedaliasName * ****aliasName**(entityName, index): string - Inherited from AbstractNamingStrategy.aliasName Returns alias name for given entity. The alias needs to be unique across the query, which is by default ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique. *** #### Parameters * ##### entityName: string * ##### index: number #### Returns string ### [**](#classToMigrationName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L15)inheritedclassToMigrationName * ****classToMigrationName**(timestamp, customMigrationName): string - Inherited from AbstractNamingStrategy.classToMigrationName Return a migration name. This name should allow ordering. *** #### Parameters * ##### timestamp: string * ##### optionalcustomMigrationName: string #### Returns string ### [**](#classToTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L8)classToTableName * ****classToTableName**(entityName): string - Overrides AbstractNamingStrategy.classToTableName Return a table name for an entity class *** #### Parameters * ##### entityName: string #### Returns string ### [**](#columnNameToProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L56)inheritedcolumnNameToProperty * ****columnNameToProperty**(columnName): string - Inherited from AbstractNamingStrategy.columnNameToProperty Return a property for a column name (used in `EntityGenerator`). *** #### Parameters * ##### columnName: string #### Returns string ### [**](#enumValueToEnumProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L81)inheritedenumValueToEnumProperty * ****enumValueToEnumProperty**(enumValue, columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.enumValueToEnumProperty Get an enum option name for a given enum value. *** #### Parameters * ##### enumValue: string The enum value to generate a name for. * ##### columnName: string The column name which has the enum. * ##### tableName: string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string The name of the enum property that will hold the value. ### [**](#getClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L8)inheritedgetClassName * ****getClassName**(file, separator): string - Inherited from AbstractNamingStrategy.getClassName Return a name of the class based on its file name *** #### Parameters * ##### file: string * ##### separator: string = '-' #### Returns string ### [**](#getEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L51)inheritedgetEntityName * ****getEntityName**(tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEntityName Return a name of the entity class based on database table name (used in `EntityGenerator`). Default implementation ignores the schema name. *** #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getEnumClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L67)inheritedgetEnumClassName * ****getEnumClassName**(columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEnumClassName Get an enum class name. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new class name that will be used for the enum. ### [**](#getEnumTypeName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L74)inheritedgetEnumTypeName * ****getEnumTypeName**(columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEnumTypeName Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new type name that will be used for the enum. ### [**](#indexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L25)inheritedindexName * ****indexName**(tableName, columns, type): string - Inherited from AbstractNamingStrategy.indexName Returns key/constraint name for the given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name). *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | check | foreign | sequence #### Returns string ### [**](#inverseSideName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L93)inheritedinverseSideName * ****inverseSideName**(entityName, propertyName, kind): string - Inherited from AbstractNamingStrategy.inverseSideName Returns the name of the inverse side property. Used in the `EntityGenerator` with `bidirectionalRelations` option. *** #### Parameters * ##### entityName: string * ##### propertyName: string * ##### kind: [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) #### Returns string ### [**](#joinColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L12)joinColumnName * ****joinColumnName**(propertyName): string - Overrides AbstractNamingStrategy.joinColumnName Return a join column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#joinKeyColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L16)joinKeyColumnName * ****joinKeyColumnName**(entityName, referencedColumnName, composite): string - Overrides AbstractNamingStrategy.joinKeyColumnName Return the foreign key column name for the given parameters *** #### Parameters * ##### entityName: string * ##### optionalreferencedColumnName: string * ##### composite: boolean = false #### Returns string ### [**](#joinTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L26)joinTableName * ****joinTableName**(sourceEntity, targetEntity, propertyName): string - Overrides AbstractNamingStrategy.joinTableName Return a join table name *** #### Parameters * ##### sourceEntity: string * ##### targetEntity: string * ##### propertyName: string #### Returns string ### [**](#propertyToColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L30)propertyToColumnName * ****propertyToColumnName**(propertyName): string - Overrides AbstractNamingStrategy.propertyToColumnName Return a column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L34)referenceColumnName * ****referenceColumnName**(): string - Overrides AbstractNamingStrategy.referenceColumnName Return the default reference column name *** #### Returns string --- # Source: https://mikro-orm.io/api/core/class/EntityComparator.md # EntityComparator ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**diffEntities](#diffEntities) * [**mapResult](#mapResult) * [**matching](#matching) * [**prepareEntity](#prepareEntity) * [**isComparable](#isComparable) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L35)constructor * ****new EntityComparator**(metadata, platform): [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) - #### Parameters * ##### metadata: IMetadataStorage * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) ## Methods[**](#Methods) ### [**](#diffEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L41)diffEntities * ****diffEntities**\(entityName, a, b, options): [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Computes difference between two entities. *** #### Parameters * ##### entityName: string * ##### a: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### b: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### optionaloptions: { includeInverseSides?: boolean } * ##### optionalincludeInverseSides: boolean #### Returns [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L63)mapResult * ****mapResult**\(entityName, result): [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Maps database columns to properties. *** #### Parameters * ##### entityName: string * ##### result: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ #### Returns [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#matching)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L46)matching * ****matching**\(entityName, a, b): boolean - #### Parameters * ##### entityName: string * ##### a: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### b: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns boolean ### [**](#prepareEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L55)prepareEntity * ****prepareEntity**\(entity): [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Removes ORM specific code from entities and prepares it for serializing. Used before change set computation. References will be mapped to primary keys, collections to arrays of primary keys. *** #### Parameters * ##### entity: T #### Returns [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#isComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L783)staticisComparable * ****isComparable**\(prop, root): boolean - perf: used to generate list of comparable properties during discovery, so we speed up the runtime comparison *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### root: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns boolean --- # Source: https://mikro-orm.io/api/core/class/EntityFactory.md # EntityFactory ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**create](#create) * [**createEmbeddable](#createEmbeddable) * [**createReference](#createReference) * [**getComparator](#getComparator) * [**mergeData](#mergeData) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L57)constructor * ****new EntityFactory**(em): [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) ## Methods[**](#Methods) ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L67)create * ****create**\(entityName, data, options): [New](https://mikro-orm.io/api/core.md#New)\ - #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### options: [FactoryOptions](https://mikro-orm.io/api/core/interface/FactoryOptions.md) = {} #### Returns [New](https://mikro-orm.io/api/core.md#New)\ ### [**](#createEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L277)createEmbeddable * ****createEmbeddable**\(entityName, data, options): T - #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### options: Pick<[FactoryOptions](https://mikro-orm.io/api/core/interface/FactoryOptions.md), convertCustomTypes | newEntity> = {} #### Returns T ### [**](#createReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L242)createReference * ****createReference**\(entityName, id, options): T - #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### id: (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T) | (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T)\[] | Record\: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T> * ##### options: Pick<[FactoryOptions](https://mikro-orm.io/api/core/interface/FactoryOptions.md), schema | convertCustomTypes | merge> = {} #### Returns T ### [**](#getComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L286)getComparator * ****getComparator**(): [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) - #### Returns [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) ### [**](#mergeData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L169)mergeData * ****mergeData**\(meta, entity, data, options): void - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### entity: T * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### options: [FactoryOptions](https://mikro-orm.io/api/core/interface/FactoryOptions.md) = {} #### Returns void --- # Source: https://mikro-orm.io/api/entity-generator/class/EntityGenerator.md # EntityGenerator ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**generate](#generate) * [**register](#register) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/entity-generator/src/EntityGenerator.ts#L38)constructor * ****new EntityGenerator**(em): [EntityGenerator](https://mikro-orm.io/api/entity-generator/class/EntityGenerator.md) - #### Parameters * ##### em: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)>> #### Returns [EntityGenerator](https://mikro-orm.io/api/entity-generator/class/EntityGenerator.md) ## Methods[**](#Methods) ### [**](#generate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/entity-generator/src/EntityGenerator.ts#L51)generate * ****generate**(options): Promise\ - #### Parameters * ##### options: [GenerateOptions](https://mikro-orm.io/api/core/interface/GenerateOptions.md) = {} #### Returns Promise\ ### [**](#register)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/entity-generator/src/EntityGenerator.ts#L47)staticregister * ****register**(orm): void - #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void --- # Source: https://mikro-orm.io/api/core/class/EntityLoader.md # EntityLoader ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**normalizePopulate](#normalizePopulate) * [**populate](#populate) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L60)constructor * ****new EntityLoader**(em): [EntityLoader](https://mikro-orm.io/api/core/class/EntityLoader.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [EntityLoader](https://mikro-orm.io/api/core/class/EntityLoader.md) ## Methods[**](#Methods) ### [**](#normalizePopulate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L117)normalizePopulate * ****normalizePopulate**\(entityName, populate, strategy, lookup): [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] - #### Parameters * ##### entityName: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\ | (boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\)\[] * ##### optionalstrategy: [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) * ##### lookup: boolean = true #### Returns [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L69)populate * ****populate**\(entityName, entities, populate, options): Promise\ - Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. *** #### Parameters * ##### entityName: string * ##### entities: Entity\[] * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### options: [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ #### Returns Promise\ --- # Source: https://mikro-orm.io/api/mongodb/class/EntityManager.md # Source: https://mikro-orm.io/api/knex/class/EntityManager.md # Source: https://mikro-orm.io/api/core/class/EntityManager.md # EntityManager \ The EntityManager is the central access point to ORM functionality. It is a facade to all different ORM subsystems such as UnitOfWork, Query Language, and Repository API. ### Hierarchy * *EntityManager* * [EntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md) * [EntityManager](https://mikro-orm.io/api/mongodb/class/EntityManager.md) ## Index[**](#Index) ### Properties * [**\_id](#_id) * [**config](#config) * [**global](#global) * [**name](#name) ### Accessors * [**id](#id) * [**schema](#schema) ### Methods * [**addFilter](#addFilter) * [**assign](#assign) * [**begin](#begin) * [**canPopulate](#canPopulate) * [**clear](#clear) * [**clearCache](#clearCache) * [**commit](#commit) * [**count](#count) * [**create](#create) * [**find](#find) * [**findAll](#findAll) * [**findAndCount](#findAndCount) * [**findByCursor](#findByCursor) * [**findOne](#findOne) * [**findOneOrFail](#findOneOrFail) * [**flush](#flush) * [**fork](#fork) * [**getComparator](#getComparator) * [**getConnection](#getConnection) * [**getDriver](#getDriver) * [**getEntityFactory](#getEntityFactory) * [**getEventManager](#getEventManager) * [**getFilterParams](#getFilterParams) * [**getHydrator](#getHydrator) * [**getLoggerContext](#getLoggerContext) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**getReference](#getReference) * [**getRepository](#getRepository) * [**getTransactionContext](#getTransactionContext) * [**getUnitOfWork](#getUnitOfWork) * [**getValidator](#getValidator) * [**insert](#insert) * [**insertMany](#insertMany) * [**isInTransaction](#isInTransaction) * [**lock](#lock) * [**map](#map) * [**merge](#merge) * [**nativeDelete](#nativeDelete) * [**nativeUpdate](#nativeUpdate) * [**persist](#persist) * [**persistAndFlush](#persistAndFlush) * [**populate](#populate) * [**refresh](#refresh) * [**refreshOrFail](#refreshOrFail) * [**remove](#remove) * [**removeAndFlush](#removeAndFlush) * [**repo](#repo) * [**resetTransactionContext](#resetTransactionContext) * [**rollback](#rollback) * [**setFilterParams](#setFilterParams) * [**setFlushMode](#setFlushMode) * [**setLoggerContext](#setLoggerContext) * [**setTransactionContext](#setTransactionContext) * [**transactional](#transactional) * [**upsert](#upsert) * [**upsertMany](#upsertMany) ## Properties[**](#Properties) ### [**](#_id)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L105)readonly\_id **\_id: number = ... ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L129)readonlyconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#global)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L106)readonlyglobal **global: false = false ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L107)readonlyname **name: string ## Accessors[**](#Accessors) ### [**](#id)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2395)id * **get id(): number - Returns the ID of this EntityManager. Respects the context, so global EM will give you the contextual ID if executed inside request context handler. *** #### Returns number ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2379)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2387)schema * **get schema(): undefined | string * **set schema(schema): void - Returns the default schema of this EntityManager. Respects the context, so global EM will give you the contextual schema if executed inside request context handler. *** #### Returns undefined | string - Sets the default schema of this EntityManager. Respects the context, so global EM will set the contextual schema if executed inside request context handler. *** #### Parameters * ##### schema: undefined | null | string #### Returns void ## Methods[**](#Methods) ### [**](#addFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L321)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L326)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L331)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L336)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L341)addFilter * ****addFilter**\(name, cond, entityName, options): void * ****addFilter**\(name, cond, entityName, options): void * ****addFilter**\(name, cond, entityName, options): void * ****addFilter**(name, cond, entityName, options): void - Registers global filter to this entity manager. Global filters are enabled by default (unless disabled via last parameter). *** #### Parameters * ##### name: string * ##### cond: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ | (args) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)<[FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\> * ##### optionalentityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ | \[[EntityName](https://mikro-orm.io/api/core.md#EntityName)\] * ##### optionaloptions: boolean | Partial\ #### Returns void ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1673)assign * ****assign**\(entity, data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> - Shortcut for `wrap(entity).assign(data, { em })` *** #### Parameters * ##### entity: Entity | Partial\ * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### options: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ = {} #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1334)begin * ****begin**(options): Promise\ - Starts new transaction bound to this EntityManager. Use `ctx` parameter to provide the parent when nesting transactions. *** #### Parameters * ##### options: Omit<[TransactionOptions](https://mikro-orm.io/api/core/interface/TransactionOptions.md), ignoreNestedTransactions> = {} #### Returns Promise\ ### [**](#canPopulate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1876)canPopulate * ****canPopulate**\(entityName, property): boolean - Checks whether given property can be populated on the entity. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### property: string #### Returns boolean ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1869)clear * ****clear**(): void - Clears the EntityManager. All entities that are currently managed by this EntityManager become detached. *** #### Returns void ### [**](#clearCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2371)clearCache * ****clearCache**(cacheKey): Promise\ - Clears result cache for given cache key. If we want to be able to call this method, we need to set the cache key explicitly when storing the cache. ``` // set the cache key to 'book-cache-key', with expiration of 60s const res = await em.find(Book, { ... }, { cache: ['book-cache-key', 60_000] }); // clear the cache key by name await em.clearCache('book-cache-key'); ``` *** #### Parameters * ##### cacheKey: string #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1349)commit * ****commit**(): Promise\ - Commits the transaction bound to this EntityManager. Flushes before doing the actual commit query. *** #### Returns Promise\ ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1730)count * ****count**\(entityName, where, options): Promise\ - Returns total number of entities matching your `where` query. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> = ... * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1618)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1635)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1652)create * ****create**\(entityName, data, options): Entity * ****create**\(entityName, data, options): Entity - Creates new instance of given entity and populates it with given data. The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. The constructor will be given parameters based on the defined constructor of the entity. If the constructor parameter matches a property name, its value will be extracted from `data`. If no matching property exists, the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and `em.create()` will pass the data into it (unless we have a property named `data` too). The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` in the options to disable the strict checks for required properties. This option has no effect on runtime. The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ * ##### optionaloptions: [CreateOptions](https://mikro-orm.io/api/core/interface/CreateOptions.md)\ #### Returns Entity ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L204)find * ****find**\(entityName, where, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Finds all entities matching your `where` query. You can pass additional options via the `options` parameter. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#findAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L289)findAll * ****findAll**\(entityName, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Finds all entities of given type, optionally matching the `where` condition provided in the `options` parameter. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### optionaloptions: [FindAllOptions](https://mikro-orm.io/api/core/interface/FindAllOptions.md)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\, Hint, Fields, Excludes> #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#findAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L619)findAndCount * ****findAndCount**\(entityName, where, options): Promise<\[[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[], number]> - Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as tuple where the first element is the array of entities, and the second is the count. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<\[[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[], number]> ### [**](#findByCursor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L693)findByCursor * ****findByCursor**\(entityName, where, options): Promise<[Cursor](https://mikro-orm.io/api/core/class/Cursor.md)\> - Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as [Cursor](https://mikro-orm.io/api/core/class/Cursor.md) object. Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option is required. Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. * `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time * `before` and `after` specify the previous cursor value, it can be one of the: * `Cursor` instance * opaque string provided by `startCursor/endCursor` properties * POJO/entity instance ``` const currentCursor = await em.findByCursor(User, {}, { first: 10, after: previousCursor, // cursor instance orderBy: { id: 'desc' }, }); // to fetch next page const nextCursor = await em.findByCursor(User, {}, { first: 10, after: currentCursor.endCursor, // opaque string orderBy: { id: 'desc' }, }); // to fetch next page const nextCursor2 = await em.findByCursor(User, {}, { first: 10, after: { id: lastSeenId }, // entity-like POJO orderBy: { id: 'desc' }, }); ``` The options also support an `includeCount` (true by default) option. If set to false, the `totalCount` is not returned as part of the cursor. This is useful for performance reason, when you don't care about the total number of pages. The `Cursor` object provides the following interface: ``` Cursor { items: [ User { ... }, User { ... }, User { ... }, ], totalCount: 50, // not included if `includeCount: false` startCursor: 'WzRd', endCursor: 'WzZd', hasPrevPage: true, hasNextPage: true, } ``` *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### options: [FindByCursorOptions](https://mikro-orm.io/api/core/interface/FindByCursorOptions.md)\ #### Returns Promise<[Cursor](https://mikro-orm.io/api/core/class/Cursor.md)\> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L793)findOne * ****findOne**\(entityName, where, options): Promise\> - Finds first entity matching your `where` query. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### options: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ = {} #### Returns Promise\> ### [**](#findOneOrFail)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L885)findOneOrFail * ****findOneOrFail**\(entityName, where, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - Finds first entity matching your `where` query. If nothing found, it will throw an error. If the `strict` option is specified and nothing is found or more than one matching entity is found, it will throw an error. You can override the factory for creating this method via `options.failHandler` locally or via `Configuration.findOneOrFailHandler` (`findExactlyOneOrFailHandler` when specifying `strict`) globally. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### options: [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md)\ = {} #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#flush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1844)flush * ****flush**(): Promise\ - Flushes all changes to objects that have been queued up to now to the database. This effectively synchronizes the in-memory state of managed objects with the database. *** #### Returns Promise\ ### [**](#fork)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1931)fork * ****fork**(options): this - Returns new EntityManager instance with its own identity map *** #### Parameters * ##### options: [ForkOptions](https://mikro-orm.io/api/core/interface/ForkOptions.md) = {} #### Returns this ### [**](#getComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2088)getComparator * ****getComparator**(): [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) - Gets the EntityComparator. *** #### Returns [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L155)getConnection * ****getConnection**(type): ReturnType\ - Gets the Connection instance, by default returns write connection *** #### Parameters * ##### optionaltype: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) #### Returns ReturnType\ ### [**](#getDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L148)getDriver * ****getDriver**(): Driver - Gets the Driver instance used by this EntityManager. Driver is singleton, for one MikroORM instance, only one driver is created. *** #### Returns Driver ### [**](#getEntityFactory)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1988)getEntityFactory * ****getEntityFactory**(): [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) - Gets the EntityFactory used by the EntityManager. *** #### Returns [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) ### [**](#getEventManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2031)getEventManager * ****getEventManager**(): [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) - #### Returns [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) ### [**](#getFilterParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L362)getFilterParams * ****getFilterParams**\(name): T - Returns filter parameters for given filter set in this context. *** #### Parameters * ##### name: string #### Returns T ### [**](#getHydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2002)getHydrator * ****getHydrator**(): IHydrator - Gets the Hydrator used by the EntityManager. *** #### Returns IHydrator ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L376)getLoggerContext * ****getLoggerContext**\(options): T - Gets logger context for this entity manager. *** #### Parameters * ##### optionaloptions: { disableContextResolution?: boolean } * ##### optionaldisableContextResolution: boolean #### Returns T ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2066)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2071)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2076)getMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ****getMetadata**\(entityName): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - Gets the `MetadataStorage`. *** #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L162)getPlatform * ****getPlatform**(): ReturnType\ - Gets the platform instance. Just like the driver, platform is singleton, one for a MikroORM instance. *** #### Returns ReturnType\ ### [**](#getReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1685)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1690)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1695)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1700)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1705)getReference * ****getReference**\(entityName, id, options): [Ref](https://mikro-orm.io/api/core.md#Ref)\ * ****getReference**\(entityName, id): Entity * ****getReference**\(entityName, id, options): Entity * ****getReference**\(entityName, id, options): Entity | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ - Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### id: Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity * ##### options: Omit<[GetReferenceOptions](https://mikro-orm.io/api/core/interface/GetReferenceOptions.md), wrapped> & { wrapped: true } #### Returns [Ref](https://mikro-orm.io/api/core.md#Ref)\ ### [**](#getRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L169)getRepository * ****getRepository**\(entityName): [GetRepository](https://mikro-orm.io/api/core.md#GetRepository)\ - Gets repository for given entity. You can pass either string name or entity class reference. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns [GetRepository](https://mikro-orm.io/api/core.md#GetRepository)\ ### [**](#getTransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2045)getTransactionContext * ****getTransactionContext**\(): undefined | T - Gets the transaction context (driver dependent object used to make sure queries are executed on same connection). *** #### Returns undefined | T ### [**](#getUnitOfWork)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1977)getUnitOfWork * ****getUnitOfWork**(useContext): [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) - Gets the UnitOfWork used by the EntityManager to coordinate operations. *** #### Parameters * ##### useContext: boolean = true #### Returns [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) ### [**](#getValidator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L197)getValidator * ****getValidator**(): [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) - Gets EntityValidator instance *** #### Returns [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1396)insert * ****insert**\(entityNameOrEntity, data, options): Promise\ : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity> - Fires native insert query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### entityNameOrEntity: Entity | [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### optionaldata: Entity | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise\: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity> ### [**](#insertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1439)insertMany * ****insertMany**\(entityNameOrEntities, data, options): Promise<(Entity extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity)\[]> - Fires native multi-insert query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### entityNameOrEntities: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ | Entity\[] * ##### optionaldata: Entity\[] | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<(Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity)\[]> ### [**](#isInTransaction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2038)isInTransaction * ****isInTransaction**(): boolean - Checks whether this EntityManager is currently operating inside a database transaction. *** #### Returns boolean ### [**](#lock)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1388)lock * ****lock**\(entity, lockMode, options): Promise\ - Runs your callback wrapped inside a database transaction. *** #### Parameters * ##### entity: T * ##### lockMode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### options: number | Date | [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) = {} #### Returns Promise\ ### [**](#map)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1525)map * ****map**\(entityName, result, options): Entity - Maps raw database result to an entity and merges it to this EntityManager. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### result: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: { schema?: string } = {} * ##### optionalschema: string #### Returns Entity ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1548)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1554)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1560)merge * ****merge**\(entity, options): Entity * ****merge**\(entityName, data, options): Entity - Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities via second parameter. By default, it will return already loaded entities without modifying them. *** #### Parameters * ##### entity: Entity * ##### optionaloptions: [MergeOptions](https://mikro-orm.io/api/core/interface/MergeOptions.md) #### Returns Entity ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1510)nativeDelete * ****nativeDelete**\(entityName, where, options): Promise\ - Fires native delete query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise\ ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1493)nativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise\ - Fires native update query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)<[NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\> * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### options: [UpdateOptions](https://mikro-orm.io/api/core/interface/UpdateOptions.md)\ = {} #### Returns Promise\ ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1770)persist * ****persist**\(entity): this - Tells the EntityManager to make an instance managed and persistent. The entity will be entered into the database at or before transaction commit or as a result of the flush operation. *** #### Parameters * ##### entity: Entity | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> #### Returns this ### [**](#persistAndFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1799)persistAndFlush * ****persistAndFlush**(entity): Promise\ - Persists your entity immediately, flushing all not yet persisted changes to the database too. Equivalent to `em.persist(e).flush()`. *** #### Parameters * ##### entity: Partial\ | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\> | Iterable\ | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\>, any, any> #### Returns Promise\ ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1906)populate * ****populate**\(entities, populate, options): Promise\>, Naked, Hint, Fields, Excludes>\[] : [MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded)\> - Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. *** #### Parameters * ##### entities: Entity * ##### populate: false | readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] * ##### options: [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ = {} #### Returns Promise\>, Naked, Hint, Fields, Excludes>\[] : [MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded)\> ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L748)refresh * ****refresh**\(entity, options): Promise\> - Refreshes the persistent state of an entity from the database, overriding any local changes that have not yet been persisted. Returns the same entity instance (same object reference), but re-hydrated. If the entity is no longer in database, the method returns `null`. *** #### Parameters * ##### entity: Entity * ##### options: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ = {} #### Returns Promise\> ### [**](#refreshOrFail)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L724)refreshOrFail * ****refreshOrFail**\(entity, options): Promise<[MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded)\> - Refreshes the persistent state of an entity from the database, overriding any local changes that have not yet been persisted. Returns the same entity instance (same object reference), but re-hydrated. If the entity is no longer in database, the method throws an error just like `em.findOneOrFail()` (and respects the same config options). *** #### Parameters * ##### entity: Entity * ##### options: [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md)\ = {} #### Returns Promise<[MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded)\> ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1809)remove * ****remove**\(entity): this - Marks entity for removal. A removed entity will be removed from the database at or before transaction commit or as a result of the flush operation. To remove entities by condition, use `em.nativeDelete()`. *** #### Parameters * ##### entity: Entity | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> #### Returns this ### [**](#removeAndFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1836)removeAndFlush * ****removeAndFlush**(entity): Promise\ - Removes an entity instance immediately, flushing all not yet persisted changes to the database too. Equivalent to `em.remove(e).flush()` *** #### Parameters * ##### entity: Partial\ | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\> | Iterable\ | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\>, any, any> #### Returns Promise\ ### [**](#repo)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L187)repo * ****repo**\(entityName): [GetRepository](https://mikro-orm.io/api/core.md#GetRepository)\ - Shortcut for `em.getRepository()`. *** #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns [GetRepository](https://mikro-orm.io/api/core.md#GetRepository)\ ### [**](#resetTransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2059)resetTransactionContext * ****resetTransactionContext**(): void - Resets the transaction context. *** #### Returns void ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1369)rollback * ****rollback**(): Promise\ - Rollbacks the transaction bound to this EntityManager. *** #### Returns Promise\ ### [**](#setFilterParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L355)setFilterParams * ****setFilterParams**(name, args): void - Sets filter parameter values globally inside context defined by this entity manager. If you want to set shared value for all contexts, be sure to use the root entity manager. *** #### Parameters * ##### name: string * ##### args: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L383)setFlushMode * ****setFlushMode**(flushMode): void - #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns void ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L369)setLoggerContext * ****setLoggerContext**(context): void - Sets logger context for this entity manager. *** #### Parameters * ##### context: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#setTransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2052)setTransactionContext * ****setTransactionContext**(ctx): void - Sets the transaction context. *** #### Parameters * ##### ctx: any #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1320)transactional * ****transactional**\(cb, options): Promise\ - Runs your callback wrapped inside a database transaction. If a transaction is already active, a new savepoint (nested transaction) will be created by default. This behavior can be controlled via the `propagation` option. Use the provided EntityManager instance for all operations that should be part of the transaction. You can safely use a global EntityManager instance from a DI container, as this method automatically creates an async context for the transaction. **Concurrency note:** When running multiple transactions concurrently (e.g. in parallel requests or jobs), use the `clear: true` option. This ensures the callback runs in a clear fork of the EntityManager, providing full isolation between concurrent transactional handlers. Using `clear: true` is an alternative to forking explicitly and calling the method on the new fork – it already provides the necessary isolation for safe concurrent usage. **Propagation note:** Changes made within a transaction (whether top-level or nested) are always propagated to the parent context, unless the parent context is a global one. If you want to avoid that, fork the EntityManager first and then call this method on the fork. **Example:** ``` await em.transactional(async (em) => { const author = new Author('Jon'); em.persist(author); // flush is called automatically at the end of the callback }); ``` *** #### Parameters * ##### cb: (em) => T | Promise\ * ##### options: [TransactionOptions](https://mikro-orm.io/api/core/interface/TransactionOptions.md) = {} #### Returns Promise\ ### [**](#upsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L936)upsert * ****upsert**\(entityNameOrEntity, data, options): Promise\ - Creates or updates the entity, based on whether it is already present in the database. This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 const author = await em.upsert(Author, { email: 'foo@bar.com', age: 33 }); ``` The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 // select "id" from "author" where "email" = 'foo@bar.com' const author = await em.upsert(Author, { email: 'foo@bar.com', age: 33 }); ``` Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. *** #### Parameters * ##### entityNameOrEntity: Entity | [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### optionaldata: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ | [NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\ * ##### options: [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise\ ### [**](#upsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1071)upsertMany * ****upsertMany**\(entityNameOrEntity, data, options): Promise\ - Creates or updates the entity, based on whether it is already present in the database. This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 const authors = await em.upsertMany(Author, [{ email: 'foo@bar.com', age: 33 }, ...]); ``` The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com'), (666, 'lol@lol.lol') on conflict ("email") do update set "age" = excluded."age" // select "id" from "author" where "email" = 'foo@bar.com' const author = await em.upsertMany(Author, [ { email: 'foo@bar.com', age: 33 }, { email: 'lol@lol.lol', age: 666 }, ]); ``` Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. *** #### Parameters * ##### entityNameOrEntity: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ | Entity\[] * ##### optionaldata: ([EntityData](https://mikro-orm.io/api/core.md#EntityData)\ | [NoInfer](https://mikro-orm.io/api/core.md#NoInfer)\)\[] * ##### options: [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/class/EntityMetadata.md # EntityMetadata \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**abstract](#abstract) * [**bidirectionalRelations](#bidirectionalRelations) * [**checks](#checks) * [**class](#class) * [**className](#className) * [**collection](#collection) * [**comment](#comment) * [**comparableProps](#comparableProps) * [**compositePK](#compositePK) * [**concurrencyCheckKeys](#concurrencyCheckKeys) * [**constructorParams](#constructorParams) * [**definedProperties](#definedProperties) * [**discriminatorColumn](#discriminatorColumn) * [**discriminatorMap](#discriminatorMap) * [**discriminatorValue](#discriminatorValue) * [**embeddable](#embeddable) * [**expression](#expression) * [**extends](#extends) * [**filters](#filters) * [**forceConstructor](#forceConstructor) * [**getterProps](#getterProps) * [**hasTriggers](#hasTriggers) * [**hasUniqueProps](#hasUniqueProps) * [**hooks](#hooks) * [**hydrateProps](#hydrateProps) * [**indexes](#indexes) * [**name](#name) * [**path](#path) * [**pivotTable](#pivotTable) * [**polymorphs](#polymorphs) * [**primaryKeys](#primaryKeys) * [**properties](#properties) * [**propertyOrder](#propertyOrder) * [**props](#props) * [**prototype](#prototype) * [**readonly](#readonly) * [**referencingProperties](#referencingProperties) * [**relations](#relations) * [**repository](#repository) * [**repositoryClass](#repositoryClass) * [**root](#root) * [**schema](#schema) * [**selfReferencing](#selfReferencing) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**simplePK](#simplePK) * [**tableName](#tableName) * [**toJsonParams](#toJsonParams) * [**trackingProps](#trackingProps) * [**uniqueProps](#uniqueProps) * [**uniques](#uniques) * [**useCache](#useCache) * [**versionProperty](#versionProperty) * [**virtual](#virtual) ### Accessors * [**tableName](#tableName) ### Methods * [**addProperty](#addProperty) * [**createColumnMappingObject](#createColumnMappingObject) * [**getPrimaryProp](#getPrimaryProp) * [**getPrimaryProps](#getPrimaryProps) * [**removeProperty](#removeProperty) * [**sync](#sync) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L592)constructor * ****new EntityMetadata**\(meta): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### meta: Partial<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> = {} #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ## Properties[**](#Properties) ### [**](#abstract)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L853)abstract **abstract: boolean ### [**](#bidirectionalRelations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L838)bidirectionalRelations **bidirectionalRelations: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#checks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L847)checks **checks: CheckConstraint\\[] ### [**](#class)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L852)class **class: [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ ### [**](#className)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L811)className **className: string ### [**](#collection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L827)collection **collection: string ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L856)optionalcomment **comment? : string ### [**](#comparableProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L840)comparableProps **comparableProps: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#compositePK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L831)compositePK **compositePK: boolean ### [**](#concurrencyCheckKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L833)concurrencyCheckKeys **concurrencyCheckKeys: Set<[EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\> ### [**](#constructorParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L823)constructorParams **constructorParams: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] ### [**](#definedProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L862)definedProperties **definedProperties: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ ### [**](#discriminatorColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L819)optionaldiscriminatorColumn **discriminatorColumn? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#discriminatorMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L821)optionaldiscriminatorMap **discriminatorMap? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ ### [**](#discriminatorValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L820)optionaldiscriminatorValue **discriminatorValue? : string | number ### [**](#embeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L822)embeddable **embeddable: boolean ### [**](#expression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L818)optionalexpression **expression? : string | (em, where, options) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ ### [**](#extends)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L826)extends **extends: string ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L855)filters **filters: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ ### [**](#forceConstructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L824)forceConstructor **forceConstructor: boolean ### [**](#getterProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L844)getterProps **getterProps: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#hasTriggers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L864)optionalhasTriggers **hasTriggers? : boolean ### [**](#hasUniqueProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L858)optionalhasUniqueProps **hasUniqueProps? : boolean ### [**](#hooks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L850)hooks **hooks: { afterCreate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterDelete: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterFlush: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterTransactionCommit: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterTransactionRollback: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterTransactionStart: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterUpdate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; afterUpsert: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeCreate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeDelete: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeFlush: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeTransactionCommit: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeTransactionRollback: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeTransactionStart: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeUpdate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; beforeUpsert: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; onFlush: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; onInit: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[]; onLoad: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] } #### Type declaration * ##### afterCreate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterDelete: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterFlush: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterTransactionCommit: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterTransactionRollback: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterTransactionStart: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterUpdate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### afterUpsert: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeCreate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeDelete: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeFlush: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeTransactionCommit: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeTransactionRollback: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeTransactionStart: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeUpdate: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### beforeUpsert: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### onFlush: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### onInit: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] * ##### onLoad: undefined | (undefined | keyof T | (args) => void | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\ | (args) => void | Promise\)\[] ### [**](#hydrateProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L842)hydrateProps **hydrateProps: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#indexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L845)indexes **indexes: { expression? : string | [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback)\; name? : string; options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\; properties? : [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ | [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[]; type? : string }\[] ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L810)optionalname **name? : string ### [**](#path)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L828)path **path: string ### [**](#pivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L814)optionalpivotTable **pivotTable? : boolean ### [**](#polymorphs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L860)optionalpolymorphs **polymorphs? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\\[] ### [**](#primaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L829)primaryKeys **primaryKeys: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] ### [**](#properties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L835)properties **properties: { \[ K in string ]: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ } ### [**](#propertyOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L590)readonlypropertyOrder **propertyOrder: Map\ = ... ### [**](#props)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L836)props **props: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#prototype)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L851)prototype **prototype: T ### [**](#readonly)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L859)optionalreadonly **readonly? : boolean ### [**](#referencingProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L839)referencingProperties **referencingProperties: { meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\; prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ }\[] ### [**](#relations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L837)relations **relations: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#repository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L849)repository **repository: () => [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> #### Type declaration * * **(): [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - #### Returns [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#repositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L848)optionalrepositoryClass **repositoryClass? : string ### [**](#root)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L861)root **root: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L813)optionalschema **schema? : string ### [**](#selfReferencing)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L857)optionalselfReferencing **selfReferencing? : boolean ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L834)serializedPrimaryKey **serializedPrimaryKey: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#simplePK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L830)simplePK **simplePK: boolean ### [**](#tableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L660)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L664)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L812)tableName **tableName: string ### [**](#toJsonParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L825)toJsonParams **toJsonParams: string\[] ### [**](#trackingProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L841)trackingProps **trackingProps: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#uniqueProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L843)uniqueProps **uniqueProps: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#uniques)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L846)uniques **uniques: { deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) | immediate | deferred; expression? : string | [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback)\; name? : string; options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\; properties? : [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ | [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] }\[] ### [**](#useCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L854)useCache **useCache: boolean ### [**](#versionProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L832)versionProperty **versionProperty: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#virtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L815)optionalvirtual **virtual? : boolean ## Accessors[**](#Accessors) ### [**](#tableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L660)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L664)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L812)tableName * **get tableName(): string * **set tableName(name): void - #### Returns string - #### Parameters * ##### name: string #### Returns void ## Methods[**](#Methods) ### [**](#addProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L606)addProperty * ****addProperty**(prop, sync): void - #### Parameters * ##### prop: Partial<[EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\> * ##### sync: boolean = true #### Returns void ### [**](#createColumnMappingObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L650)createColumnMappingObject * ****createColumnMappingObject**(): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ - #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ ### [**](#getPrimaryProp)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L646)getPrimaryProp * ****getPrimaryProp**(): [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ - #### Returns [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ ### [**](#getPrimaryProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L630)getPrimaryProps * ****getPrimaryProps**(flatten): [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] - #### Parameters * ##### flatten: boolean = false #### Returns [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] ### [**](#removeProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L620)removeProperty * ****removeProperty**(name, sync): void - #### Parameters * ##### name: string * ##### sync: boolean = true #### Returns void ### [**](#sync)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L668)sync * ****sync**(initIndexes): void - #### Parameters * ##### initIndexes: boolean = false #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/EntityProperty.md # EntityProperty \ ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**array](#array) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**createForeignKeyConstraint](#createForeignKeyConstraint) * [**customOrder](#customOrder) * [**customType](#customType) * [**customTypes](#customTypes) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**deferMode](#deferMode) * [**deleteRule](#deleteRule) * [**discriminatorColumn](#discriminatorColumn) * [**eager](#eager) * [**embeddable](#embeddable) * [**embedded](#embedded) * [**embeddedPath](#embeddedPath) * [**embeddedProps](#embeddedProps) * [**entity](#entity) * [**enum](#enum) * [**extra](#extra) * [**fieldNameRaw](#fieldNameRaw) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**fixedOrder](#fixedOrder) * [**fixedOrderColumn](#fixedOrderColumn) * [**foreignKeyName](#foreignKeyName) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hasConvertToDatabaseValueSQL](#hasConvertToDatabaseValueSQL) * [**hasConvertToJSValueSQL](#hasConvertToJSValueSQL) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**inherited](#inherited) * [**inversedBy](#inversedBy) * [**inverseJoinColumns](#inverseJoinColumns) * [**items](#items) * [**joinColumns](#joinColumns) * [**kind](#kind) * [**lazy](#lazy) * [**length](#length) * [**mappedBy](#mappedBy) * [**mapToPk](#mapToPk) * [**name](#name) * [**nativeEnumName](#nativeEnumName) * [**nullable](#nullable) * [**object](#object) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**optional](#optional) * [**orderBy](#orderBy) * [**orphanRemoval](#orphanRemoval) * [**ownColumns](#ownColumns) * [**owner](#owner) * [**persist](#persist) * [**pivotEntity](#pivotEntity) * [**pivotTable](#pivotTable) * [**precision](#precision) * [**prefix](#prefix) * [**prefixMode](#prefixMode) * [**primary](#primary) * [**ref](#ref) * [**referencedColumnNames](#referencedColumnNames) * [**referencedPKs](#referencedPKs) * [**referencedTableName](#referencedTableName) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**targetMeta](#targetMeta) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**updateRule](#updateRule) * [**userDefined](#userDefined) * [**version](#version) * [**where](#where) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L549)optionalaccessor **accessor? : [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#array)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L510)optionalarray **array? : boolean ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L504)optionalautoincrement **autoincrement? : boolean ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L550)cascade **cascade: [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md)\[] ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L498)columnTypes **columnTypes: string\[] ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L575)optionalcomment **comment? : string ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L544)optionalconcurrencyCheck **concurrencyCheck? : boolean ### [**](#createForeignKeyConstraint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L582)createForeignKeyConstraint **createForeignKeyConstraint: boolean ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L562)optionalcustomOrder **customOrder? : string\[] | number\[] | boolean\[] ### [**](#customType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L500)optionalcustomType **customType? : [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#customTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L501)customTypes **customTypes: (undefined | [Type](https://mikro-orm.io/api/core/class/Type.md)\)\[] ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L518)optionaldefault **default? : null | string | number | boolean ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L519)optionaldefaultRaw **defaultRaw? : string ### [**](#deferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L581)optionaldeferMode **deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) ### [**](#deleteRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L554)optionaldeleteRule **deleteRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default ### [**](#discriminatorColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L528)optionaldiscriminatorColumn **discriminatorColumn? : string ### [**](#eager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L545)optionaleager **eager? : boolean ### [**](#embeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L526)embeddable **embeddable: [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ ### [**](#embedded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L524)optionalembedded **embedded? : \[[EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\, [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\] ### [**](#embeddedPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L525)optionalembeddedPath **embeddedPath? : string\[] ### [**](#embeddedProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L527)embeddedProps **embeddedProps: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\> ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L494)entity **entity: () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Type declaration * * **(): [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ - #### Returns [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ ### [**](#enum)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L540)optionalenum **enum? : boolean ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L577)optionalextra **extra? : string mysql only ### [**](#fieldNameRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L517)optionalfieldNameRaw **fieldNameRaw? : string ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L516)fieldNames **fieldNames: string\[] ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L521)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#fixedOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L563)optionalfixedOrder **fixedOrder? : boolean ### [**](#fixedOrderColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L564)optionalfixedOrderColumn **fixedOrderColumn? : string ### [**](#foreignKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L583)optionalforeignKeyName **foreignKeyName? : string ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L520)optionalformula **formula? : (alias) => string #### Type declaration * * **(alias): string - #### Parameters * ##### alias: string #### Returns string ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L499)optionalgenerated **generated? : string | GeneratedColumnCallback\ ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L547)optionalgetter **getter? : boolean ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L548)optionalgetterName **getterName? : keyof Owner ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L508)optionalgroups **groups? : string\[] ### [**](#hasConvertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L503)hasConvertToDatabaseValueSQL **hasConvertToDatabaseValueSQL: boolean ### [**](#hasConvertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L502)hasConvertToJSValueSQL **hasConvertToJSValueSQL: boolean ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L539)optionalhidden **hidden? : boolean ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L537)optionalhydrate **hydrate? : boolean ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L580)optionalignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L530)optionalindex **index? : string | boolean ### [**](#inherited)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L533)optionalinherited **inherited? : boolean ### [**](#inversedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L558)inversedBy **inversedBy: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#inverseJoinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L569)inverseJoinColumns **inverseJoinColumns: string\[] ### [**](#items)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L541)optionalitems **items? : (string | number)\[] ### [**](#joinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L567)joinColumns **joinColumns: string\[] ### [**](#kind)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L514)kind **kind: [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L509)optionallazy **lazy? : boolean ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L511)optionallength **length? : number ### [**](#mappedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L559)mappedBy **mappedBy: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#mapToPk)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L535)optionalmapToPk **mapToPk? : boolean ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L493)name **name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ ### [**](#nativeEnumName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L542)optionalnativeEnumName **nativeEnumName? : string ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L532)optionalnullable **nullable? : boolean ### [**](#object)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L529)optionalobject **object? : boolean ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L552)optionalonCreate **onCreate? : (entity, em) => any #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L553)optionalonUpdate **onUpdate? : (entity, em) => any #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#optional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L579)optionaloptional **optional? : boolean ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L561)optionalorderBy **orderBy? : [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\ | [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\\[] ### [**](#orphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L551)optionalorphanRemoval **orphanRemoval? : boolean ### [**](#ownColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L568)ownColumns **ownColumns: string\[] ### [**](#owner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L557)owner **owner: boolean ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L536)optionalpersist **persist? : boolean ### [**](#pivotEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L566)pivotEntity **pivotEntity: string ### [**](#pivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L565)pivotTable **pivotTable: string ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L512)optionalprecision **precision? : number ### [**](#prefix)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L522)optionalprefix **prefix? : string | boolean ### [**](#prefixMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L523)optionalprefixMode **prefixMode? : [EmbeddedPrefixMode](https://mikro-orm.io/api/core.md#EmbeddedPrefixMode) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L506)optionalprimary **primary? : boolean ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L515)optionalref **ref? : boolean ### [**](#referencedColumnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L570)referencedColumnNames **referencedColumnNames: string\[] ### [**](#referencedPKs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L572)referencedPKs **referencedPKs: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] ### [**](#referencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L571)referencedTableName **referencedTableName: string ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L505)optionalreturning **returning? : boolean ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L496)runtimeType **runtimeType: string | number | bigint | boolean | object | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | Buffer | Date | any ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L513)optionalscale **scale? : number ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L574)optionalserializedName **serializedName? : string ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L507)serializedPrimaryKey **serializedPrimaryKey: boolean ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L573)optionalserializer **serializer? : (value, options) => any #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L546)optionalsetter **setter? : boolean ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L556)optionalstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) ### [**](#targetMeta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L497)optionaltargetMeta **targetMeta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L538)optionaltrackChanges **trackChanges? : boolean ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L495)type **type: string | bigint | boolean | uuid | date | time | datetime | blob | uint8array | array | enumArray | enum | json | integer | smallint | tinyint | mediumint | float | double | decimal | character | text | interval | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L531)optionalunique **unique? : string | boolean ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L534)optionalunsigned **unsigned? : boolean ### [**](#updateRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L555)optionalupdateRule **updateRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default ### [**](#userDefined)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L578)optionaluserDefined **userDefined? : boolean ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L543)optionalversion **version? : boolean ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L560)optionalwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ --- # Source: https://mikro-orm.io/api/mongodb/class/EntityRepository.md # Source: https://mikro-orm.io/api/knex/class/EntityRepository.md # Source: https://mikro-orm.io/api/core/class/EntityRepository.md # EntityRepository \ ### Hierarchy * *EntityRepository* * [EntityRepository](https://mikro-orm.io/api/knex/class/EntityRepository.md) * [EntityRepository](https://mikro-orm.io/api/mongodb/class/EntityRepository.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**assign](#assign) * [**canPopulate](#canPopulate) * [**count](#count) * [**create](#create) * [**find](#find) * [**findAll](#findAll) * [**findAndCount](#findAndCount) * [**findByCursor](#findByCursor) * [**findOne](#findOne) * [**findOneOrFail](#findOneOrFail) * [**getEntityManager](#getEntityManager) * [**getEntityName](#getEntityName) * [**getReference](#getReference) * [**insert](#insert) * [**insertMany](#insertMany) * [**map](#map) * [**merge](#merge) * [**nativeDelete](#nativeDelete) * [**nativeUpdate](#nativeUpdate) * [**populate](#populate) * [**upsert](#upsert) * [**upsertMany](#upsertMany) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L44)constructor * ****new EntityRepository**\(em, entityName): [EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\ - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns [EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\ ## Methods[**](#Methods) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L307)assign * ****assign**\(entity, data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> - Shortcut for `wrap(entity).assign(data, { em })` *** #### Parameters * ##### entity: Ent | Partial\ * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### optionaloptions: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> ### [**](#canPopulate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L232)canPopulate * ****canPopulate**(property): boolean - Checks whether given property can be populated on the entity. *** #### Parameters * ##### property: string #### Returns boolean ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L328)count * ****count**\(where, options): Promise\ - Returns total number of entities matching your `where` query. *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ = ... * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L266)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L283)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L300)create * ****create**\(data, options): Entity * ****create**\(data, options): Entity - Creates new instance of given entity and populates it with given data. The entity constructor will be used unless you provide `{ managed: true }` in the `options` parameter. The constructor will be given parameters based on the defined constructor of the entity. If the constructor parameter matches a property name, its value will be extracted from `data`. If no matching property exists, the whole `data` parameter will be passed. This means we can also define `constructor(data: Partial)` and `em.create()` will pass the data into it (unless we have a property named `data` too). The parameters are strictly checked, you need to provide all required properties. You can use `OptionalProps` symbol to omit some properties from this check without making them optional. Alternatively, use `partial: true` in the options to disable the strict checks for required properties. This option has no effect on runtime. The newly created entity will be automatically marked for persistence via `em.persist` unless you disable this behavior, either locally via `persist: false` option, or globally via `persistOnCreate` ORM config option. *** #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ * ##### optionaloptions: [CreateOptions](https://mikro-orm.io/api/core/interface/CreateOptions.md)\ #### Returns Entity ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L129)find * ****find**\(where, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Finds all entities matching your `where` query. You can pass additional options via the `options` parameter. *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#findAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L164)findAll * ****findAll**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Finds all entities of given type. You can pass additional options via the `options` parameter. *** #### Parameters * ##### optionaloptions: [FindAllOptions](https://mikro-orm.io/api/core/interface/FindAllOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#findAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L141)findAndCount * ****findAndCount**\(where, options): Promise<\[[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[], number]> - Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as tuple where first element is the array of entities, and the second is the count. *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<\[[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[], number]> ### [**](#findByCursor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L152)findByCursor * ****findByCursor**\(where, options): Promise<[Cursor](https://mikro-orm.io/api/core/class/Cursor.md)\> - Calls `em.find()` and `em.count()` with the same arguments (where applicable) and returns the results as [Cursor](https://mikro-orm.io/api/core/class/Cursor.md) object. Supports `before`, `after`, `first` and `last` options while disallowing `limit` and `offset`. Explicit `orderBy` option is required. Use `first` and `after` for forward pagination, or `last` and `before` for backward pagination. * `first` and `last` are numbers and serve as an alternative to `offset`, those options are mutually exclusive, use only one at a time * `before` and `after` specify the previous cursor value, it can be one of the: * `Cursor` instance * opaque string provided by `startCursor/endCursor` properties * POJO/entity instance ``` const currentCursor = await em.findByCursor(User, {}, { first: 10, after: previousCursor, // cursor instance orderBy: { id: 'desc' }, }); // to fetch next page const nextCursor = await em.findByCursor(User, {}, { first: 10, after: currentCursor.endCursor, // opaque string orderBy: { id: 'desc' }, }); // to fetch next page const nextCursor2 = await em.findByCursor(User, {}, { first: 10, after: { id: lastSeenId }, // entity-like POJO orderBy: { id: 'desc' }, }); ``` The options also support an `includeCount` (true by default) option. If set to false, the `totalCount` is not returned as part of the cursor. This is useful for performance reason, when you don't care about the total number of pages. The `Cursor` object provides the following interface: ``` Cursor { items: [ User { ... }, User { ... }, User { ... }, ], totalCount: 50, // not included if `includeCount: false` startCursor: 'WzRd', endCursor: 'WzZd', hasPrevPage: true, hasNextPage: true, } ``` *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [FindByCursorOptions](https://mikro-orm.io/api/core/interface/FindByCursorOptions.md)\ #### Returns Promise<[Cursor](https://mikro-orm.io/api/core/class/Cursor.md)\> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L50)findOne * ****findOne**\(where, options): Promise\> - Finds first entity matching your `where` query. *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findOneOrFail)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L63)findOneOrFail * ****findOneOrFail**\(where, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - Finds first entity matching your `where` query. If nothing is found, it will throw an error. You can override the factory for creating this method via `options.failHandler` locally or via `Configuration.findOneOrFailHandler` globally. *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#getEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L339)getEntityManager * ****getEntityManager**(): [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> - Returns the underlying EntityManager instance *** #### Returns [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> ### [**](#getEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L332)getEntityName * ****getEntityName**(): string - #### Returns string ### [**](#getReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L210)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L215)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L220)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L225)getReference * ****getReference**(id, options): [Ref](https://mikro-orm.io/api/core.md#Ref)\ * ****getReference**(id): Entity * ****getReference**(id, options): Entity - Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded *** #### Parameters * ##### id: Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity * ##### options: Omit<[GetReferenceOptions](https://mikro-orm.io/api/core/interface/GetReferenceOptions.md), wrapped> & { wrapped: true } #### Returns [Ref](https://mikro-orm.io/api/core.md#Ref)\ ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L175)insert * ****insert**(data, options): Promise\ : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity> - Fires native insert query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### data: Entity | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ * ##### optionaloptions: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ #### Returns Promise\: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity> ### [**](#insertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L182)insertMany * ****insertMany**(data, options): Promise<(Entity extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity)\[]> - Fires native insert query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### data: Entity\[] | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] * ##### optionaloptions: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ #### Returns Promise<(Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity)\[]> ### [**](#map)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L203)map * ****map**(result, options): Entity - Maps raw database result to an entity and merges it to this EntityManager. *** #### Parameters * ##### result: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionaloptions: { schema?: string } * ##### optionalschema: string #### Returns Entity ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L321)merge * ****merge**(data, options): Entity - Merges given entity to this EntityManager so it becomes managed. You can force refreshing of existing entities via second parameter. By default it will return already loaded entities without modifying them. *** #### Parameters * ##### data: Entity | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### optionaloptions: [MergeOptions](https://mikro-orm.io/api/core/interface/MergeOptions.md) #### Returns Entity ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L196)nativeDelete * ****nativeDelete**(where, options): Promise\ - Fires native delete query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ #### Returns Promise\ ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L189)nativeUpdate * ****nativeUpdate**(where, data, options): Promise\ - Fires native update query. Calling this has no side effects on the context (identity map). *** #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### optionaloptions: [UpdateOptions](https://mikro-orm.io/api/core/interface/UpdateOptions.md)\ #### Returns Promise\ ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L239)populate * ****populate**\(entities, populate, options): Promise\>, Naked, Hint, Fields, Excludes>\[] : [MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded)\> - Loads specified relations in batch. This will execute one query for each relation, that will populate it on all the specified entities. *** #### Parameters * ##### entities: Ent * ##### populate: false | [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] * ##### optionaloptions: [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ #### Returns Promise\>, Naked, Hint, Fields, Excludes>\[] : [MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded)\> ### [**](#upsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L93)upsert * ****upsert**\(entityOrData, options): Promise\ - Creates or updates the entity, based on whether it is already present in the database. This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed entity instance. The method accepts either `entityName` together with the entity `data`, or just entity instance. ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 const author = await em.getRepository(Author).upsert({ email: 'foo@bar.com', age: 33 }); ``` The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 // select "id" from "author" where "email" = 'foo@bar.com' const author = await em.getRepository(Author).upsert({ email: 'foo@bar.com', age: 33 }); ``` Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. *** #### Parameters * ##### optionalentityOrData: Entity | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### optionaloptions: [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ #### Returns Promise\ ### [**](#upsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityRepository.ts#L122)upsertMany * ****upsertMany**\(entitiesOrData, options): Promise\ - Creates or updates the entity, based on whether it is already present in the database. This method performs an `insert on conflict merge` query ensuring the database is in sync, returning a managed entity instance. ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com') on conflict ("email") do update set "age" = 41 const authors = await em.getRepository(Author).upsertMany([{ email: 'foo@bar.com', age: 33 }, ...]); ``` The entity data needs to contain either the primary key, or any other unique property. Let's consider the following example, where `Author.email` is a unique property: ``` // insert into "author" ("age", "email") values (33, 'foo@bar.com'), (666, 'lol@lol.lol') on conflict ("email") do update set "age" = excluded."age" // select "id" from "author" where "email" = 'foo@bar.com' const author = await em.getRepository(Author).upsertMany([ { email: 'foo@bar.com', age: 33 }, { email: 'lol@lol.lol', age: 666 }, ]); ``` Depending on the driver support, this will either use a returning query, or a separate select query, to fetch the primary key if it's missing from the `data`. If the entity is already present in current context, there won't be any queries - instead, the entity data will be assigned and an explicit `flush` will be required for those changes to be persisted. *** #### Parameters * ##### optionalentitiesOrData: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[] | Entity\[] * ##### optionaloptions: [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/class/EntitySchema.md # EntitySchema \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**REGISTRY](#REGISTRY) ### Accessors * [**meta](#meta) * [**name](#name) ### Methods * [**addEmbedded](#addEmbedded) * [**addEnum](#addEnum) * [**addIndex](#addIndex) * [**addManyToMany](#addManyToMany) * [**addManyToOne](#addManyToOne) * [**addOneToMany](#addOneToMany) * [**addOneToOne](#addOneToOne) * [**addPrimaryKey](#addPrimaryKey) * [**addProperty](#addProperty) * [**addSerializedPrimaryKey](#addSerializedPrimaryKey) * [**addUnique](#addUnique) * [**addVersion](#addVersion) * [**setClass](#setClass) * [**setCustomRepository](#setCustomRepository) * [**setExtends](#setExtends) * [**fromMetadata](#fromMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L65)constructor * ****new EntitySchema**\(meta): [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\ - #### Parameters * ##### meta: [EntitySchemaMetadata](https://mikro-orm.io/api/core.md#EntitySchemaMetadata)\ #### Returns [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\ ## Properties[**](#Properties) ### [**](#REGISTRY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L59)staticREGISTRY **REGISTRY: Map\, [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\> = ... When schema links the entity class via `class` option, this registry allows the lookup from opposite side, so we can use the class in `entities` option just like the EntitySchema instance. ## Accessors[**](#Accessors) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L269)meta * **get meta(): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L273)name * **get name(): [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ - #### Returns [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ ## Methods[**](#Methods) ### [**](#addEmbedded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L150)addEmbedded * ****addEmbedded**\(name, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### options: [EmbeddedOptions](https://mikro-orm.io/api/core/interface/EmbeddedOptions.md)\ #### Returns void ### [**](#addEnum)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L112)addEnum * ****addEnum**(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### optionaltype: TypeType * ##### options: [EnumOptions](https://mikro-orm.io/api/core/interface/EnumOptions.md)\ = {} #### Returns void ### [**](#addIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L232)addIndex * ****addIndex**\(options): void - #### Parameters * ##### options: [IndexOptions](https://mikro-orm.io/api/core/interface/IndexOptions.md)\ #### Returns void ### [**](#addManyToMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L184)addManyToMany * ****addManyToMany**\(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [ManyToManyOptions](https://mikro-orm.io/api/core/interface/ManyToManyOptions.md)\ #### Returns void ### [**](#addManyToOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L166)addManyToOne * ****addManyToOne**\(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [ManyToOneOptions](https://mikro-orm.io/api/core/interface/ManyToOneOptions.md)\ #### Returns void ### [**](#addOneToMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L202)addOneToMany * ****addOneToMany**\(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [OneToManyOptions](https://mikro-orm.io/api/core/interface/OneToManyOptions.md)\ #### Returns void ### [**](#addOneToOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L207)addOneToOne * ****addOneToOne**\(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [OneToOneOptions](https://mikro-orm.io/api/core/interface/OneToOneOptions.md)\ #### Returns void ### [**](#addPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L141)addPrimaryKey * ****addPrimaryKey**(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [PrimaryKeyOptions](https://mikro-orm.io/api/core/interface/PrimaryKeyOptions.md)\ = {} #### Returns void ### [**](#addProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L92)addProperty * ****addProperty**(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### optionaltype: TypeType * ##### options: [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ | [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ = {} #### Returns void ### [**](#addSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L145)addSerializedPrimaryKey * ****addSerializedPrimaryKey**(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [SerializedPrimaryKeyOptions](https://mikro-orm.io/api/core/interface/SerializedPrimaryKeyOptions.md)\ = {} #### Returns void ### [**](#addUnique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L236)addUnique * ****addUnique**\(options): void - #### Parameters * ##### options: [UniqueOptions](https://mikro-orm.io/api/core/interface/UniqueOptions.md)\ #### Returns void ### [**](#addVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L137)addVersion * ****addVersion**(name, type, options): void - #### Parameters * ##### name: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ * ##### type: TypeType * ##### options: [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ = {} #### Returns void ### [**](#setClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L248)setClass * ****setClass**(proto): void - #### Parameters * ##### proto: [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ #### Returns void ### [**](#setCustomRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L240)setCustomRepository * ****setCustomRepository**(repository): void - #### Parameters * ##### repository: () => [Constructor](https://mikro-orm.io/api/core.md#Constructor) #### Returns void ### [**](#setExtends)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L244)setExtends * ****setExtends**(base): void - #### Parameters * ##### base: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns void ### [**](#fromMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L85)staticfromMetadata * ****fromMetadata**\(meta): [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\ - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ | [DeepPartial](https://mikro-orm.io/api/core.md#DeepPartial)<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> #### Returns [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\ --- # Source: https://mikro-orm.io/api/core/class/EntitySerializer.md # EntitySerializer ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**serialize](#serialize) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new EntitySerializer**(): [EntitySerializer](https://mikro-orm.io/api/core/class/EntitySerializer.md) - #### Returns [EntitySerializer](https://mikro-orm.io/api/core/class/EntitySerializer.md) ## Methods[**](#Methods) ### [**](#serialize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L61)staticserialize * ****serialize**\(entity, options): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - #### Parameters * ##### entity: T * ##### options: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ = {} #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> --- # Source: https://mikro-orm.io/api/core/class/EntityTransformer.md # EntityTransformer ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**toObject](#toObject) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new EntityTransformer**(): [EntityTransformer](https://mikro-orm.io/api/core/class/EntityTransformer.md) - #### Returns [EntityTransformer](https://mikro-orm.io/api/core/class/EntityTransformer.md) ## Methods[**](#Methods) ### [**](#toObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntityTransformer.ts#L29)statictoObject * ****toObject**\(entity, ignoreFields, raw): Omit<[EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\, Ignored> - #### Parameters * ##### entity: Entity * ##### ignoreFields: Ignored\[] = \[] * ##### raw: boolean = false #### Returns Omit<[EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\, Ignored> --- # Source: https://mikro-orm.io/api/core/class/EntityValidator.md # EntityValidator ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**KNOWN\_TYPES](#KNOWN_TYPES) ### Methods * [**validate](#validate) * [**validateEmptyWhere](#validateEmptyWhere) * [**validateParams](#validateParams) * [**validatePrimaryKey](#validatePrimaryKey) * [**validateProperty](#validateProperty) * [**validateRequired](#validateRequired) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L12)constructor * ****new EntityValidator**(strict): [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) - #### Parameters * ##### strict: boolean #### Returns [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) ## Properties[**](#Properties) ### [**](#KNOWN_TYPES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L10)KNOWN\_TYPES **KNOWN\_TYPES: Set\ = ... ## Methods[**](#Methods) ### [**](#validate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L14)validate * ****validate**\(entity, payload, meta): void - #### Parameters * ##### entity: T * ##### payload: any * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void ### [**](#validateEmptyWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L120)validateEmptyWhere * ****validateEmptyWhere**\(where): void - #### Parameters * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ #### Returns void ### [**](#validateParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L96)validateParams * ****validateParams**(params, type, field): void - #### Parameters * ##### params: any * ##### type: string = 'search condition' * ##### optionalfield: string #### Returns void ### [**](#validatePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L112)validatePrimaryKey * ****validatePrimaryKey**\(entity, meta): void - #### Parameters * ##### entity: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void ### [**](#validateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L68)validateProperty * ****validateProperty**\(prop, givenValue, entity): any - #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### givenValue: any * ##### entity: T #### Returns any ### [**](#validateRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L45)validateRequired * ****validateRequired**\(entity): void - #### Parameters * ##### entity: T #### Returns void --- # Source: https://mikro-orm.io/api/core/function/Enum.md # Enum ### Callable * ****Enum**\(options): (target, propertyName) => any *** * #### Parameters * ##### options: [EnumOptions](https://mikro-orm.io/api/core/interface/EnumOptions.md)\> | () => [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/class/EnumArrayType.md # EnumArrayType \ ### Hierarchy * [ArrayType](https://mikro-orm.io/api/core/class/ArrayType.md)\ * *EnumArrayType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/EnumArrayType.ts#L18)constructor * ****new EnumArrayType**\(owner, items, hydrate): [EnumArrayType](https://mikro-orm.io/api/core/class/EnumArrayType.md)\ - Overrides ArrayType.constructor #### Parameters * ##### owner: string * ##### optionalitems: T\[] * ##### hydrate: (i) => T = ... #### Returns [EnumArrayType](https://mikro-orm.io/api/core/class/EnumArrayType.md)\ ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from ArrayType.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from ArrayType.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from ArrayType.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from ArrayType.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from ArrayType.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L45)inheritedcompareAsType * ****compareAsType**(): string - Inherited from ArrayType.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from ArrayType.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | string * ##### b: null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/EnumArrayType.ts#L24)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): null | string - Overrides ArrayType.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: null | T\[] * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from ArrayType.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L33)inheritedconvertToJSValue * ****convertToJSValue**(value, platform): null | T\[] - Inherited from ArrayType.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: null | string | T\[] * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns null | T\[] ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from ArrayType.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from ArrayType.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/EnumArrayType.ts#L37)getColumnType * ****getColumnType**(prop, platform): string - Overrides ArrayType.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from ArrayType.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/ArrayType.ts#L49)inheritedtoJSON * ****toJSON**(value): T\[] - Inherited from ArrayType.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: T\[] #### Returns T\[] ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from ArrayType.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from ArrayType.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/EnumOptions.md # EnumOptions \ ### Hierarchy * [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ * *EnumOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**array](#array) * [**autoincrement](#autoincrement) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**items](#items) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nativeEnumName](#nativeEnumName) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof T Inherited from PropertyOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#array)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L24)optionalarray **array? : boolean ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from PropertyOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from PropertyOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from PropertyOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from PropertyOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from PropertyOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from PropertyOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from PropertyOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from PropertyOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from PropertyOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from PropertyOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from PropertyOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from PropertyOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from PropertyOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from PropertyOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from PropertyOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof T Inherited from PropertyOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from PropertyOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from PropertyOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from PropertyOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from PropertyOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from PropertyOptions.index Explicitly specify index on a property. ### [**](#items)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L23)optionalitems **items? : (string | number)\[] | () => [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from PropertyOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from PropertyOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from PropertyOptions.name Alias for `fieldName`. ### [**](#nativeEnumName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L26)optionalnativeEnumName **nativeEnumName? : string for postgres, by default it uses text column with check constraint ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from PropertyOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from PropertyOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from PropertyOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from PropertyOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from PropertyOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from PropertyOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from PropertyOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from PropertyOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from PropertyOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from PropertyOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from PropertyOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from PropertyOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from PropertyOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from PropertyOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from PropertyOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from PropertyOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from PropertyOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from PropertyOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from PropertyOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/core/class/EnumType.md # EnumType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *EnumType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new EnumType**(): [EnumType](https://mikro-orm.io/api/core/class/EnumType.md) - Inherited from Type.constructor #### Returns [EnumType](https://mikro-orm.io/api/core/class/EnumType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/EnumType.ts#L15)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/EnumType.ts#L19)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/EnumType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/EventArgs.md # EventArgs \ ## Index[**](#Index) ### Properties * [**changeSet](#changeSet) * [**em](#em) * [**entity](#entity) * [**meta](#meta) ## Properties[**](#Properties) ### [**](#changeSet)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L10)optionalchangeSet **changeSet? : [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\ ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L8)em **em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L7)entity **entity: T ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L9)meta **meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ --- # Source: https://mikro-orm.io/api/core/class/EventManager.md # EventManager ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clone](#clone) * [**dispatchEvent](#dispatchEvent) * [**hasListeners](#hasListeners) * [**registerSubscriber](#registerSubscriber) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L13)constructor * ****new EventManager**(subscribers): [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) - #### Parameters * ##### subscribers: [EventSubscriber](https://mikro-orm.io/api/core/interface/EventSubscriber.md)\\[] #### Returns [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) ## Methods[**](#Methods) ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L87)clone * ****clone**(): [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) - #### Returns [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) ### [**](#dispatchEvent)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L29)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L30)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L31)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L32)dispatchEvent * ****dispatchEvent**\(event, args, meta): unknown * ****dispatchEvent**\(event, args, meta): unknown * ****dispatchEvent**\(event, args, meta): Promise\ - #### Parameters * ##### event: [TransactionEventType](https://mikro-orm.io/api/core.md#TransactionEventType) * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns unknown ### [**](#hasListeners)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L60)hasListeners * ****hasListeners**\(event, meta): boolean - #### Parameters * ##### event: [EventType](https://mikro-orm.io/api/core/enum/EventType.md) * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns boolean ### [**](#registerSubscriber)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L17)registerSubscriber * ****registerSubscriber**(subscriber): void - #### Parameters * ##### subscriber: [EventSubscriber](https://mikro-orm.io/api/core/interface/EventSubscriber.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/EventSubscriber.md # EventSubscriber \ ## Index[**](#Index) ### Methods * [**afterCreate](#afterCreate) * [**afterDelete](#afterDelete) * [**afterFlush](#afterFlush) * [**afterTransactionCommit](#afterTransactionCommit) * [**afterTransactionRollback](#afterTransactionRollback) * [**afterTransactionStart](#afterTransactionStart) * [**afterUpdate](#afterUpdate) * [**afterUpsert](#afterUpsert) * [**beforeCreate](#beforeCreate) * [**beforeDelete](#beforeDelete) * [**beforeFlush](#beforeFlush) * [**beforeTransactionCommit](#beforeTransactionCommit) * [**beforeTransactionRollback](#beforeTransactionRollback) * [**beforeTransactionStart](#beforeTransactionStart) * [**beforeUpdate](#beforeUpdate) * [**beforeUpsert](#beforeUpsert) * [**getSubscribedEntities](#getSubscribedEntities) * [**onFlush](#onFlush) * [**onInit](#onInit) * [**onLoad](#onLoad) ## Methods[**](#Methods) ### [**](#afterCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L27)optionalafterCreate * ****afterCreate**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#afterDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L33)optionalafterDelete * ****afterDelete**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#afterFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L36)optionalafterFlush * ****afterFlush**(args): void | Promise\ - #### Parameters * ##### args: [FlushEventArgs](https://mikro-orm.io/api/core/interface/FlushEventArgs.md) #### Returns void | Promise\ ### [**](#afterTransactionCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L41)optionalafterTransactionCommit * ****afterTransactionCommit**(args): void | Promise\ - #### Parameters * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) #### Returns void | Promise\ ### [**](#afterTransactionRollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L43)optionalafterTransactionRollback * ****afterTransactionRollback**(args): void | Promise\ - #### Parameters * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) #### Returns void | Promise\ ### [**](#afterTransactionStart)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L39)optionalafterTransactionStart * ****afterTransactionStart**(args): void | Promise\ - #### Parameters * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) #### Returns void | Promise\ ### [**](#afterUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L29)optionalafterUpdate * ****afterUpdate**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#afterUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L31)optionalafterUpsert * ****afterUpsert**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#beforeCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L26)optionalbeforeCreate * ****beforeCreate**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#beforeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L32)optionalbeforeDelete * ****beforeDelete**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#beforeFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L34)optionalbeforeFlush * ****beforeFlush**(args): void | Promise\ - #### Parameters * ##### args: [FlushEventArgs](https://mikro-orm.io/api/core/interface/FlushEventArgs.md) #### Returns void | Promise\ ### [**](#beforeTransactionCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L40)optionalbeforeTransactionCommit * ****beforeTransactionCommit**(args): void | Promise\ - #### Parameters * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) #### Returns void | Promise\ ### [**](#beforeTransactionRollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L42)optionalbeforeTransactionRollback * ****beforeTransactionRollback**(args): void | Promise\ - #### Parameters * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) #### Returns void | Promise\ ### [**](#beforeTransactionStart)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L38)optionalbeforeTransactionStart * ****beforeTransactionStart**(args): void | Promise\ - #### Parameters * ##### args: [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) #### Returns void | Promise\ ### [**](#beforeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L28)optionalbeforeUpdate * ****beforeUpdate**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#beforeUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L30)optionalbeforeUpsert * ****beforeUpsert**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ ### [**](#getSubscribedEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L23)optionalgetSubscribedEntities * ****getSubscribedEntities**(): [EntityName](https://mikro-orm.io/api/core.md#EntityName)\\[] - #### Returns [EntityName](https://mikro-orm.io/api/core.md#EntityName)\\[] ### [**](#onFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L35)optionalonFlush * ****onFlush**(args): void | Promise\ - #### Parameters * ##### args: [FlushEventArgs](https://mikro-orm.io/api/core/interface/FlushEventArgs.md) #### Returns void | Promise\ ### [**](#onInit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L24)optionalonInit * ****onInit**(args): void - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void ### [**](#onLoad)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L25)optionalonLoad * ****onLoad**(args): void | Promise\ - #### Parameters * ##### args: [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\ #### Returns void | Promise\ --- # Source: https://mikro-orm.io/api/core/enum/EventType.md # EventType ## Index[**](#Index) ### Enumeration Members * [**afterCreate](#afterCreate) * [**afterDelete](#afterDelete) * [**afterFlush](#afterFlush) * [**afterTransactionCommit](#afterTransactionCommit) * [**afterTransactionRollback](#afterTransactionRollback) * [**afterTransactionStart](#afterTransactionStart) * [**afterUpdate](#afterUpdate) * [**afterUpsert](#afterUpsert) * [**beforeCreate](#beforeCreate) * [**beforeDelete](#beforeDelete) * [**beforeFlush](#beforeFlush) * [**beforeTransactionCommit](#beforeTransactionCommit) * [**beforeTransactionRollback](#beforeTransactionRollback) * [**beforeTransactionStart](#beforeTransactionStart) * [**beforeUpdate](#beforeUpdate) * [**beforeUpsert](#beforeUpsert) * [**onFlush](#onFlush) * [**onInit](#onInit) * [**onLoad](#onLoad) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#afterCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L179)afterCreate **afterCreate: afterCreate ### [**](#afterDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L185)afterDelete **afterDelete: afterDelete ### [**](#afterFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L188)afterFlush **afterFlush: afterFlush ### [**](#afterTransactionCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L192)afterTransactionCommit **afterTransactionCommit: afterTransactionCommit ### [**](#afterTransactionRollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L194)afterTransactionRollback **afterTransactionRollback: afterTransactionRollback ### [**](#afterTransactionStart)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L190)afterTransactionStart **afterTransactionStart: afterTransactionStart ### [**](#afterUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L181)afterUpdate **afterUpdate: afterUpdate ### [**](#afterUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L183)afterUpsert **afterUpsert: afterUpsert ### [**](#beforeCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L178)beforeCreate **beforeCreate: beforeCreate ### [**](#beforeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L184)beforeDelete **beforeDelete: beforeDelete ### [**](#beforeFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L186)beforeFlush **beforeFlush: beforeFlush ### [**](#beforeTransactionCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L191)beforeTransactionCommit **beforeTransactionCommit: beforeTransactionCommit ### [**](#beforeTransactionRollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L193)beforeTransactionRollback **beforeTransactionRollback: beforeTransactionRollback ### [**](#beforeTransactionStart)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L189)beforeTransactionStart **beforeTransactionStart: beforeTransactionStart ### [**](#beforeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L180)beforeUpdate **beforeUpdate: beforeUpdate ### [**](#beforeUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L182)beforeUpsert **beforeUpsert: beforeUpsert ### [**](#onFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L187)onFlush **onFlush: onFlush ### [**](#onInit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L176)onInit **onInit: onInit ### [**](#onLoad)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L177)onLoad **onLoad: onLoad --- # Source: https://mikro-orm.io/api/core/class/ExceptionConverter.md # ExceptionConverter ### Hierarchy * *ExceptionConverter* * [MySqlExceptionConverter](https://mikro-orm.io/api/knex/class/MySqlExceptionConverter.md) * [PostgreSqlExceptionConverter](https://mikro-orm.io/api/postgresql/class/PostgreSqlExceptionConverter.md) * [MariaDbExceptionConverter](https://mikro-orm.io/api/mariadb/class/MariaDbExceptionConverter.md) * [SqliteExceptionConverter](https://mikro-orm.io/api/sqlite/class/SqliteExceptionConverter.md) * [BetterSqliteExceptionConverter](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteExceptionConverter.md) * [LibSqlExceptionConverter](https://mikro-orm.io/api/libsql/class/LibSqlExceptionConverter.md) * [MsSqlExceptionConverter](https://mikro-orm.io/api/mssql/class/MsSqlExceptionConverter.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new ExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/ExceptionConverter.ts#L7)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/interface/ExecuteOptions.md # ExecuteOptions ## Index[**](#Index) ### Properties * [**mapResults](#mapResults) * [**mergeResults](#mergeResults) ## Properties[**](#Properties) ### [**](#mapResults)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L52)optionalmapResults **mapResults? : boolean ### [**](#mergeResults)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L53)optionalmergeResults **mergeResults? : boolean --- # Source: https://mikro-orm.io/api/seeder/class/Factory.md # abstractFactory \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**model](#model) ### Methods * [**create](#create) * [**createOne](#createOne) * [**each](#each) * [**make](#make) * [**makeEntity](#makeEntity) * [**makeOne](#makeOne) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L13)constructor * ****new Factory**\(em): [Factory](https://mikro-orm.io/api/seeder/class/Factory.md)\ - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [Factory](https://mikro-orm.io/api/seeder/class/Factory.md)\ ## Properties[**](#Properties) ### [**](#model)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L10)abstractreadonlymodel **model: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ ## Methods[**](#Methods) ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L78)create * ****create**(amount, input): Promise\ - Create (and flush) multiple entities *** #### Parameters * ##### amount: number Number of entities that should be generated * ##### optionalinput: TInput Object specifying what default attributes of the entity factory should be overridden #### Returns Promise\ ### [**](#createOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L67)createOne * ****createOne**(input): Promise\ - Create (and flush) a single entity *** #### Parameters * ##### optionalinput: TInput Object specifying what default attributes of the entity factory should be overridden #### Returns Promise\ ### [**](#each)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L89)each * ****each**(eachFunction): [Factory](https://mikro-orm.io/api/seeder/class/Factory.md)\ - Set a function that is applied to each entity before it is returned In case of `createOne` or `create` it is applied before the entity is persisted *** #### Parameters * ##### eachFunction: (entity, index) => void The function that is applied on every entity #### Returns [Factory](https://mikro-orm.io/api/seeder/class/Factory.md)\ ### [**](#make)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L55)make * ****make**(amount, input): TEntity\[] - Make multiple entities and then persist them (not flush) *** #### Parameters * ##### amount: number Number of entities that should be generated * ##### optionalinput: TInput Object specifying what default attributes of the entity factory should be overridden #### Returns TEntity\[] ### [**](#makeEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L21)makeEntity * ****makeEntity**(input, index): TEntity - Make a single entity instance, without persisting it. *** #### Parameters * ##### optionalinput: TInput Object specifying what default attributes of the entity factory should be overridden * ##### index: number = 0 #### Returns TEntity ### [**](#makeOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Factory.ts#L44)makeOne * ****makeOne**(input): TEntity - Make a single entity and persist (not flush) *** #### Parameters * ##### optionalinput: TInput Object specifying what default attributes of the entity factory should be overridden #### Returns TEntity --- # Source: https://mikro-orm.io/api/core/interface/FactoryOptions.md # FactoryOptions ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**initialized](#initialized) * [**merge](#merge) * [**newEntity](#newEntity) * [**normalizeAccessors](#normalizeAccessors) * [**parentSchema](#parentSchema) * [**processOnCreateHooksEarly](#processOnCreateHooksEarly) * [**recomputeSnapshot](#recomputeSnapshot) * [**refresh](#refresh) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L40)optionalconvertCustomTypes **convertCustomTypes? : boolean ### [**](#initialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L31)optionalinitialized **initialized? : boolean ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L38)optionalmerge **merge? : boolean ### [**](#newEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L32)optionalnewEntity **newEntity? : boolean ### [**](#normalizeAccessors)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L44)optionalnormalizeAccessors **normalizeAccessors? : boolean ### [**](#parentSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L43)optionalparentSchema **parentSchema? : string ### [**](#processOnCreateHooksEarly)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L37)optionalprocessOnCreateHooksEarly **processOnCreateHooksEarly? : boolean Property `onCreate` hooks are normally executed during `flush` operation. With this option, they will be processed early inside `em.create()` method. ### [**](#recomputeSnapshot)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L41)optionalrecomputeSnapshot **recomputeSnapshot? : boolean ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L39)optionalrefresh **refresh? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L42)optionalschema **schema? : string --- # Source: https://mikro-orm.io/api/core/class/FileCacheAdapter.md # FileCacheAdapter ### Implements * [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clear](#clear) * [**combine](#combine) * [**get](#get) * [**remove](#remove) * [**set](#set) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L13)constructor * ****new FileCacheAdapter**(options, baseDir, pretty, hashAlgorithm): [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md) - #### Parameters * ##### options: { cacheDir: string; combined?: string | boolean } * * ##### cacheDir: string * ##### optionalcombined: string | boolean ##### baseDir: string * ##### pretty: boolean = false * ##### hashAlgorithm: md5 | sha256 = 'md5' #### Returns [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md) ## Methods[**](#Methods) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L64)clear * ****clear**(): void - Implementation of SyncCacheAdapter.clear Clears all items stored in the cache. *** #### Returns void ### [**](#combine)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L71)combine * ****combine**(): string | void - Implementation of SyncCacheAdapter.combine Generates a combined cache from all existing entries. *** #### Returns string | void ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L21)get * ****get**(name): any - Implementation of SyncCacheAdapter.get Gets the items under `name` key from the cache. *** #### Parameters * ##### name: string #### Returns any ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L56)remove * ****remove**(name): void - Implementation of SyncCacheAdapter.remove Removes the item from cache. *** #### Parameters * ##### name: string #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L41)set * ****set**(name, data, origin): void - Implementation of SyncCacheAdapter.set Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. *** #### Parameters * ##### name: string * ##### data: any * ##### origin: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/Filter.md # Filter ### Callable * ****Filter**\(options): \(target) => U & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) *** * #### Parameters * ##### options: FilterDef #### Returns \(target) => U & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) * * **\(target): U & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - #### Parameters * ##### target: U & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns U & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) --- # Source: https://mikro-orm.io/api/core/interface/FindAllOptions.md # FindAllOptions \ ### Hierarchy * [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * *FindAllOptions* ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**limit](#limit) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) * [**where](#where) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | { endCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOptions.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | { startCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOptions.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from FindOptions.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from FindOptions.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from FindOptions.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from FindOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalinheritedctx **ctx? : any Inherited from FindOptions.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from FindOptions.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOptions.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOptions.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from FindOptions.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from FindOptions.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from FindOptions.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from FindOptions.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from FindOptions.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from FindOptions.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from FindOptions.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from FindOptions.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from FindOptions.last Fetch `last` N items. ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L150)optionalinheritedlimit **limit? : number Inherited from FindOptions.limit Limit the number of returned results. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L187)optionalinheritedlockMode **lockMode? : NONE | PESSIMISTIC\_READ | PESSIMISTIC\_WRITE | PESSIMISTIC\_PARTIAL\_WRITE | PESSIMISTIC\_WRITE\_OR\_FAIL | PESSIMISTIC\_PARTIAL\_READ | PESSIMISTIC\_READ\_OR\_FAIL Inherited from FindOptions.lockMode sql only ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from FindOptions.lockTableAliases sql only ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from FindOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from FindOptions.logging ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionalinheritedoffset **offset? : number Inherited from FindOptions.offset Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOptions.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from FindOptions.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from FindOptions.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOptions.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOptions.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOptions.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from FindOptions.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from FindOptions.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from FindOptions.strategy sql only ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L99)optionalwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ --- # Source: https://mikro-orm.io/api/core/interface/FindByCursorOptions.md # FindByCursorOptions \ ### Hierarchy * Omit<[FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\, limit | offset> * *FindByCursorOptions* ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**includeCount](#includeCount) * [**indexHint](#indexHint) * [**last](#last) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | { endCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from Omit.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | { startCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from Omit.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from Omit.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from Omit.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from Omit.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from Omit.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalinheritedctx **ctx? : any Inherited from Omit.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from Omit.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from Omit.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from Omit.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from Omit.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from Omit.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from Omit.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from Omit.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from Omit.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from Omit.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from Omit.hintComments sql only ### [**](#includeCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L205)optionalincludeCount **includeCount? : I ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from Omit.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from Omit.last Fetch `last` N items. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L187)optionalinheritedlockMode **lockMode? : NONE | PESSIMISTIC\_READ | PESSIMISTIC\_WRITE | PESSIMISTIC\_PARTIAL\_WRITE | PESSIMISTIC\_WRITE\_OR\_FAIL | PESSIMISTIC\_PARTIAL\_READ | PESSIMISTIC\_READ\_OR\_FAIL Inherited from Omit.lockMode sql only ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from Omit.lockTableAliases sql only ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from Omit.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from Omit.logging ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from Omit.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from Omit.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from Omit.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from Omit.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from Omit.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from Omit.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from Omit.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from Omit.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from Omit.strategy sql only --- # Source: https://mikro-orm.io/api/core/interface/FindOneOptions.md # FindOneOptions \ ### Hierarchy * Omit<[FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\, limit | lockMode> * *FindOneOptions* * [LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md) * [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md) ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**lockVersion](#lockVersion) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | { endCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from Omit.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | { startCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from Omit.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from Omit.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from Omit.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from Omit.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from Omit.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalinheritedctx **ctx? : any Inherited from Omit.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from Omit.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from Omit.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from Omit.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from Omit.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from Omit.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from Omit.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from Omit.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from Omit.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from Omit.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from Omit.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from Omit.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from Omit.last Fetch `last` N items. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L209)optionallockMode **lockMode? : [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from Omit.lockTableAliases sql only ### [**](#lockVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L210)optionallockVersion **lockVersion? : number | Date ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from Omit.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from Omit.logging ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionalinheritedoffset **offset? : number Inherited from Omit.offset Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from Omit.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from Omit.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from Omit.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from Omit.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from Omit.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from Omit.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from Omit.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from Omit.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from Omit.strategy sql only --- # Source: https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md # FindOneOrFailOptions \ ### Hierarchy * [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ * *FindOneOrFailOptions* * [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md) ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**failHandler](#failHandler) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**lockVersion](#lockVersion) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) * [**strict](#strict) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | { endCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOneOptions.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | { startCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOneOptions.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from FindOneOptions.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from FindOneOptions.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from FindOneOptions.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from FindOneOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalinheritedctx **ctx? : any Inherited from FindOneOptions.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from FindOneOptions.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOneOptions.exclude ### [**](#failHandler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L214)optionalfailHandler **failHandler? : (entityName, where) => Error #### Type declaration * * **(entityName, where): Error - #### Parameters * ##### entityName: string * ##### where: any #### Returns Error ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOneOptions.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from FindOneOptions.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from FindOneOptions.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from FindOneOptions.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from FindOneOptions.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from FindOneOptions.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from FindOneOptions.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from FindOneOptions.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from FindOneOptions.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from FindOneOptions.last Fetch `last` N items. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L209)optionalinheritedlockMode **lockMode? : [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) Inherited from FindOneOptions.lockMode ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from FindOneOptions.lockTableAliases sql only ### [**](#lockVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L210)optionalinheritedlockVersion **lockVersion? : number | Date Inherited from FindOneOptions.lockVersion ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from FindOneOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from FindOneOptions.logging ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionalinheritedoffset **offset? : number Inherited from FindOneOptions.offset Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOneOptions.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from FindOneOptions.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from FindOneOptions.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOneOptions.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOneOptions.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOneOptions.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from FindOneOptions.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from FindOneOptions.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from FindOneOptions.strategy sql only ### [**](#strict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L215)optionalstrict **strict? : boolean --- # Source: https://mikro-orm.io/api/core/interface/FindOptions.md # FindOptions \ ### Hierarchy * [LoadHint](https://mikro-orm.io/api/core/interface/LoadHint.md)\ * *FindOptions* * [MatchingOptions](https://mikro-orm.io/api/core/interface/MatchingOptions.md) * [FindAllOptions](https://mikro-orm.io/api/core/interface/FindAllOptions.md) ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**limit](#limit) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalafter **after? : string | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ | { endCursor: null | string } Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalbefore **before? : string | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ | { startCursor: null | string } Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalcache **cache? : number | boolean | \[string, number] Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalcomments **comments? : string | string\[] sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalconvertCustomTypes **convertCustomTypes? : boolean ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalctx **ctx? : any ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionaldisableIdentityMap **disableIdentityMap? : boolean ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from LoadHint.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from LoadHint.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalfirst **first? : number Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalgroupBy **groupBy? : string | string\[] sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalhintComments **hintComments? : string | string\[] sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalindexHint **indexHint? : string sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionallast **last? : number Fetch `last` N items. ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L150)optionallimit **limit? : number Limit the number of returned results. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L187)optionallockMode **lockMode? : NONE | PESSIMISTIC\_READ | PESSIMISTIC\_WRITE | PESSIMISTIC\_PARTIAL\_WRITE | PESSIMISTIC\_WRITE\_OR\_FAIL | PESSIMISTIC\_PARTIAL\_READ | PESSIMISTIC\_READ\_OR\_FAIL sql only ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionallockTableAliases **lockTableAliases? : string\[] sql only ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionallogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionaloffset **offset? : number Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionaloverfetch **overfetch? : boolean Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from LoadHint.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalrefresh **refresh? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalschema **schema? : string ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced sql only --- # Source: https://mikro-orm.io/api/core/interface/FlatQueryOrderMap.md # FlatQueryOrderMap --- # Source: https://mikro-orm.io/api/core/class/FloatType.md # FloatType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *FloatType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new FloatType**(): [FloatType](https://mikro-orm.io/api/core/class/FloatType.md) - Inherited from Type.constructor #### Returns [FloatType](https://mikro-orm.io/api/core/class/FloatType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/FloatType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | number * ##### b: undefined | null | number #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/FloatType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/FloatType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | number - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | number ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/FlushEventArgs.md # FlushEventArgs ### Hierarchy * Omit<[EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\, entity | changeSet | meta> * *FlushEventArgs* ## Index[**](#Index) ### Properties * [**em](#em) * [**uow](#uow) ## Properties[**](#Properties) ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L8)inheritedem **em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> Inherited from Omit.em ### [**](#uow)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L14)uow **uow: [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) --- # Source: https://mikro-orm.io/api/core/enum/FlushMode.md # FlushMode ## Index[**](#Index) ### Enumeration Members * [**ALWAYS](#ALWAYS) * [**AUTO](#AUTO) * [**COMMIT](#COMMIT) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#ALWAYS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L11)ALWAYS **ALWAYS: always Flushes the `EntityManager` before every query. ### [**](#AUTO)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L9)AUTO **AUTO: auto This is the default mode, and it flushes the `EntityManager` only if necessary. ### [**](#COMMIT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L7)COMMIT **COMMIT: commit The `EntityManager` delays the flush until the current Transaction is committed. --- # Source: https://mikro-orm.io/api/knex/interface/ForeignKey.md # ForeignKey ## Index[**](#Index) ### Properties * [**columnNames](#columnNames) * [**constraintName](#constraintName) * [**deferMode](#deferMode) * [**deleteRule](#deleteRule) * [**localTableName](#localTableName) * [**referencedColumnNames](#referencedColumnNames) * [**referencedTableName](#referencedTableName) * [**updateRule](#updateRule) ## Properties[**](#Properties) ### [**](#columnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L77)columnNames **columnNames: string\[] ### [**](#constraintName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L78)constraintName **constraintName: string ### [**](#deferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L84)optionaldeferMode **deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) ### [**](#deleteRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L83)optionaldeleteRule **deleteRule? : string ### [**](#localTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L79)localTableName **localTableName: string ### [**](#referencedColumnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L81)referencedColumnNames **referencedColumnNames: string\[] ### [**](#referencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L80)referencedTableName **referencedTableName: string ### [**](#updateRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L82)optionalupdateRule **updateRule? : string --- # Source: https://mikro-orm.io/api/core/class/ForeignKeyConstraintViolationException.md # ForeignKeyConstraintViolationException Exception for a foreign key constraint violation detected in the driver. ### Hierarchy * [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) * *ForeignKeyConstraintViolationException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new ForeignKeyConstraintViolationException**(previous): [ForeignKeyConstraintViolationException](https://mikro-orm.io/api/core/class/ForeignKeyConstraintViolationException.md) - Inherited from ConstraintViolationException.constructor #### Parameters * ##### previous: Error #### Returns [ForeignKeyConstraintViolationException](https://mikro-orm.io/api/core/class/ForeignKeyConstraintViolationException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ConstraintViolationException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ConstraintViolationException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ConstraintViolationException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ConstraintViolationException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ConstraintViolationException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ConstraintViolationException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ConstraintViolationException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ConstraintViolationException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ConstraintViolationException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ConstraintViolationException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ConstraintViolationException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ConstraintViolationException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/ForkOptions.md # ForkOptions ## Index[**](#Index) ### Properties * [**clear](#clear) * [**cloneEventManager](#cloneEventManager) * [**disableContextResolution](#disableContextResolution) * [**disableTransactions](#disableTransactions) * [**flushMode](#flushMode) * [**freshEventManager](#freshEventManager) * [**keepTransactionContext](#keepTransactionContext) * [**loggerContext](#loggerContext) * [**schema](#schema) * [**useContext](#useContext) ## Properties[**](#Properties) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2436)optionalclear **clear? : boolean do we want a clear identity map? defaults to true ### [**](#cloneEventManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2442)optionalcloneEventManager **cloneEventManager? : boolean do we want to clone current EventManager instance? defaults to false (global instance) ### [**](#disableContextResolution)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2444)optionaldisableContextResolution **disableContextResolution? : boolean use this flag to ignore the current async context - this is required if we want to call `em.fork()` inside the `getContext` handler ### [**](#disableTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2448)optionaldisableTransactions **disableTransactions? : boolean disable transactions for this fork ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2446)optionalflushMode **flushMode? : [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) set flush mode for this fork, overrides the global option can be overridden locally via FindOptions ### [**](#freshEventManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2440)optionalfreshEventManager **freshEventManager? : boolean do we want to use fresh EventManager instance? defaults to false (global instance) ### [**](#keepTransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2450)optionalkeepTransactionContext **keepTransactionContext? : boolean should we keep the transaction context of the parent EM? ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2454)optionalloggerContext **loggerContext? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) default logger context, can be overridden via [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2452)optionalschema **schema? : string default schema to use for this fork ### [**](#useContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2438)optionaluseContext **useContext? : boolean use request context? should be used only for top level request scope EM, defaults to false --- # Source: https://mikro-orm.io/api/core/function/Formula.md # Formula ### Callable * ****Formula**\(formula, options): (target, propertyName) => any *** * #### Parameters * ##### formula: string | (alias) => string * ##### options: [FormulaOptions](https://mikro-orm.io/api/core/interface/FormulaOptions.md)\ = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/FormulaOptions.md # FormulaOptions \ ### Hierarchy * [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ * *FormulaOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof T Inherited from PropertyOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from PropertyOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from PropertyOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from PropertyOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from PropertyOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from PropertyOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from PropertyOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from PropertyOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from PropertyOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from PropertyOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from PropertyOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from PropertyOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from PropertyOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from PropertyOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from PropertyOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from PropertyOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof T Inherited from PropertyOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from PropertyOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from PropertyOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from PropertyOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from PropertyOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from PropertyOptions.index Explicitly specify index on a property. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from PropertyOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from PropertyOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from PropertyOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from PropertyOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from PropertyOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from PropertyOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from PropertyOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from PropertyOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from PropertyOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from PropertyOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from PropertyOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from PropertyOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from PropertyOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from PropertyOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from PropertyOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from PropertyOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from PropertyOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from PropertyOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from PropertyOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from PropertyOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from PropertyOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from PropertyOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/postgresql/class/FullTextType.md # FullTextType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *FullTextType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) * [**regconfig](#regconfig) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/types/FullTextType.ts#L15)constructor * ****new FullTextType**(regconfig): [FullTextType](https://mikro-orm.io/api/postgresql/class/FullTextType.md) - Overrides Type.constructor #### Parameters * ##### regconfig: string = 'simple' #### Returns [FullTextType](https://mikro-orm.io/api/postgresql/class/FullTextType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ### [**](#regconfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/types/FullTextType.ts#L15)publicregconfig **regconfig: string = 'simple' ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/types/FullTextType.ts#L19)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) * ##### b: null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/types/FullTextType.ts#L30)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: string | [WeightedFullTextValue](https://mikro-orm.io/api/postgresql.md#WeightedFullTextValue) * ##### platform: [PostgreSqlPlatform](https://mikro-orm.io/api/postgresql/class/PostgreSqlPlatform.md) * ##### optionalcontext: boolean | [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): string | [WeightedFullTextValue](https://mikro-orm.io/api/postgresql.md#WeightedFullTextValue) - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns string | [WeightedFullTextValue](https://mikro-orm.io/api/postgresql.md#WeightedFullTextValue) ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/types/FullTextType.ts#L23)getColumnType * ****getColumnType**(): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) | [WeightedFullTextValue](https://mikro-orm.io/api/postgresql.md#WeightedFullTextValue) - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: string | [WeightedFullTextValue](https://mikro-orm.io/api/postgresql.md#WeightedFullTextValue) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns null | string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) | [WeightedFullTextValue](https://mikro-orm.io/api/postgresql.md#WeightedFullTextValue) ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/GenerateOptions.md # GenerateOptions ## Index[**](#Index) ### Properties * [**bidirectionalRelations](#bidirectionalRelations) * [**coreImportsPrefix](#coreImportsPrefix) * [**customBaseEntityName](#customBaseEntityName) * [**entityDefinition](#entityDefinition) * [**entitySchema](#entitySchema) * [**enumMode](#enumMode) * [**esmImport](#esmImport) * [**extraImports](#extraImports) * [**fileName](#fileName) * [**forceUndefined](#forceUndefined) * [**identifiedReferences](#identifiedReferences) * [**inferEntityType](#inferEntityType) * [**onImport](#onImport) * [**onInitialMetadata](#onInitialMetadata) * [**onlyPurePivotTables](#onlyPurePivotTables) * [**onProcessedMetadata](#onProcessedMetadata) * [**outputPurePivotTables](#outputPurePivotTables) * [**path](#path) * [**readOnlyPivotTables](#readOnlyPivotTables) * [**save](#save) * [**scalarPropertiesForRelations](#scalarPropertiesForRelations) * [**scalarTypeInDecorator](#scalarTypeInDecorator) * [**schema](#schema) * [**skipColumns](#skipColumns) * [**skipTables](#skipTables) * [**takeTables](#takeTables) * [**undefinedDefaults](#undefinedDefaults) * [**useCoreBaseEntity](#useCoreBaseEntity) ## Properties[**](#Properties) ### [**](#bidirectionalRelations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L935)optionalbidirectionalRelations **bidirectionalRelations? : boolean ### [**](#coreImportsPrefix)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L951)optionalcoreImportsPrefix **coreImportsPrefix? : string ### [**](#customBaseEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L949)optionalcustomBaseEntityName **customBaseEntityName? : string ### [**](#entityDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L937)optionalentityDefinition **entityDefinition? : decorators | defineEntity | entitySchema ### [**](#entitySchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L955)optionalentitySchema **entitySchema? : boolean * **@deprecated** use `entityDefinition: 'entitySchema'` instead ### [**](#enumMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L939)optionalenumMode **enumMode? : ts-enum | union-type | dictionary ### [**](#esmImport)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L940)optionalesmImport **esmImport? : boolean ### [**](#extraImports)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L945)optionalextraImports **extraImports? : (basePath, originFileName) => undefined | string\[] #### Type declaration * * **(basePath, originFileName): undefined | string\[] - #### Parameters * ##### basePath: string * ##### originFileName: string #### Returns undefined | string\[] ### [**](#fileName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L943)optionalfileName **fileName? : (className) => string #### Type declaration * * **(className): string - #### Parameters * ##### className: string #### Returns string ### [**](#forceUndefined)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L933)optionalforceUndefined **forceUndefined? : boolean ### [**](#identifiedReferences)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L936)optionalidentifiedReferences **identifiedReferences? : boolean ### [**](#inferEntityType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L938)optionalinferEntityType **inferEntityType? : boolean ### [**](#onImport)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L944)optionalonImport **onImport? : [ImportsResolver](https://mikro-orm.io/api/core.md#ImportsResolver) ### [**](#onInitialMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L952)optionalonInitialMetadata **onInitialMetadata? : [MetadataProcessor](https://mikro-orm.io/api/core.md#MetadataProcessor) ### [**](#onlyPurePivotTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L946)optionalonlyPurePivotTables **onlyPurePivotTables? : boolean ### [**](#onProcessedMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L953)optionalonProcessedMetadata **onProcessedMetadata? : [MetadataProcessor](https://mikro-orm.io/api/core.md#MetadataProcessor) ### [**](#outputPurePivotTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L947)optionaloutputPurePivotTables **outputPurePivotTables? : boolean ### [**](#path)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L927)optionalpath **path? : string ### [**](#readOnlyPivotTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L948)optionalreadOnlyPivotTables **readOnlyPivotTables? : boolean ### [**](#save)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L928)optionalsave **save? : boolean ### [**](#scalarPropertiesForRelations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L942)optionalscalarPropertiesForRelations **scalarPropertiesForRelations? : always | never | smart ### [**](#scalarTypeInDecorator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L941)optionalscalarTypeInDecorator **scalarTypeInDecorator? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L929)optionalschema **schema? : string ### [**](#skipColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L932)optionalskipColumns **skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> ### [**](#skipTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L931)optionalskipTables **skipTables? : (string | RegExp)\[] ### [**](#takeTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L930)optionaltakeTables **takeTables? : (string | RegExp)\[] ### [**](#undefinedDefaults)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L934)optionalundefinedDefaults **undefinedDefaults? : boolean ### [**](#useCoreBaseEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L950)optionaluseCoreBaseEntity **useCoreBaseEntity? : boolean --- # Source: https://mikro-orm.io/api/core/class/GeneratedCacheAdapter.md # GeneratedCacheAdapter ### Implements * [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clear](#clear) * [**get](#get) * [**remove](#remove) * [**set](#set) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L8)constructor * ****new GeneratedCacheAdapter**(options): [GeneratedCacheAdapter](https://mikro-orm.io/api/core/class/GeneratedCacheAdapter.md) - #### Parameters * ##### options: { data: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) } * ##### data: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [GeneratedCacheAdapter](https://mikro-orm.io/api/core/class/GeneratedCacheAdapter.md) ## Methods[**](#Methods) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L39)clear * ****clear**(): void - Implementation of CacheAdapter.clear Clears all items stored in the cache. *** #### Returns void ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L15)get * ****get**\(name): undefined | T - Implementation of CacheAdapter.get Gets the items under `name` key from the cache. *** #### Parameters * ##### name: string #### Returns undefined | T ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L32)remove * ****remove**(name): void - Implementation of CacheAdapter.remove Removes the item from cache. *** #### Parameters * ##### name: string #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L25)set * ****set**(name, data, origin): void - Implementation of CacheAdapter.set Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. *** #### Parameters * ##### name: string * ##### data: any * ##### origin: string #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/GetReferenceOptions.md # GetReferenceOptions ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**schema](#schema) * [**wrapped](#wrapped) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L296)optionalconvertCustomTypes **convertCustomTypes? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L297)optionalschema **schema? : string ### [**](#wrapped)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L295)optionalwrapped **wrapped? : boolean --- # Source: https://mikro-orm.io/api/core/enum/GroupOperator.md # GroupOperator ## Index[**](#Index) ### Enumeration Members * [**$and](#$and) * [**$or](#$or) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#$and)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L25)$and **$and: and ### [**](#$or)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L26)$or **$or: or --- # Source: https://mikro-orm.io/api/core/namespace/Hidden.md # Hidden ## Index[**](#Index) ### Interfaces * [**Brand](https://mikro-orm.io/api/core/namespace/Hidden.md#Brand) ### Variables * [**\_\_hidden](https://mikro-orm.io/api/core/namespace/Hidden.md#__hidden) ## Interfaces[**](#Interfaces) ### [**](#Brand)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L102)Brand **Brand: ### [**](#\[___hidden])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L103)optional\[\_\_\_hidden] **\[\_\_\_hidden]? : 1 ## Variables[**](#Variables) ### [**](#__hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L101)const\_\_hidden **\_\_hidden: unique symbol --- # Source: https://mikro-orm.io/api/core/interface/Highlighter.md # Highlighter ### Implemented by * [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md) ## Index[**](#Index) ### Methods * [**highlight](#highlight) ## Methods[**](#Methods) ### [**](#highlight)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1282)highlight * ****highlight**(text): string - #### Parameters * ##### text: string #### Returns string --- # Source: https://mikro-orm.io/api/core/class/Hydrator.md # abstractHydrator ### Hierarchy * *Hydrator* * [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md) ### Implements * IHydrator ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**hydrate](#hydrate) * [**hydrateReference](#hydrateReference) * [**isRunning](#isRunning) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L12)constructor * ****new Hydrator**(metadata, platform, config): [Hydrator](https://mikro-orm.io/api/core/class/Hydrator.md) - #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [Hydrator](https://mikro-orm.io/api/core/class/Hydrator.md) ## Methods[**](#Methods) ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L19)hydrate * ****hydrate**\(entity, meta, data, factory, type, newEntity, convertCustomTypes, schema, parentSchema): void - Implementation of IHydrator.hydrate * **@inheritDoc** *** #### Parameters * ##### entity: T * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### factory: [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) * ##### type: full | reference * ##### newEntity: boolean = false * ##### convertCustomTypes: boolean = false * ##### optionalschema: string * ##### optionalparentSchema: string #### Returns void ### [**](#hydrateReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L34)hydrateReference * ****hydrateReference**\(entity, meta, data, factory, convertCustomTypes, schema, parentSchema): void - Implementation of IHydrator.hydrateReference * **@inheritDoc** *** #### Parameters * ##### entity: T * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### factory: [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) * ##### optionalconvertCustomTypes: boolean * ##### optionalschema: string * ##### optionalparentSchema: string #### Returns void ### [**](#isRunning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L42)isRunning * ****isRunning**(): boolean - Implementation of IHydrator.isRunning #### Returns boolean --- # Source: https://mikro-orm.io/api/core/interface/IConfiguration.md # IConfiguration ## Index[**](#Index) ### Methods * [**get](#get) * [**getLogger](#getLogger) ## Methods[**](#Methods) ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L7)get * ****get**(key, defaultValue): any - #### Parameters * ##### key: string * ##### optionaldefaultValue: any #### Returns any ### [**](#getLogger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L8)getLogger * ****getLogger**(): [Logger](https://mikro-orm.io/api/core/interface/Logger.md) - #### Returns [Logger](https://mikro-orm.io/api/core/interface/Logger.md) --- # Source: https://mikro-orm.io/api/knex/interface/ICriteriaNode.md # ICriteriaNode \ ## Index[**](#Index) ### Properties * [**entityName](#entityName) * [**index](#index) * [**key](#key) * [**parent](#parent) * [**payload](#payload) * [**prop](#prop) * [**strict](#strict) ### Methods * [**getPath](#getPath) * [**getPivotPath](#getPivotPath) * [**process](#process) * [**renameFieldToPK](#renameFieldToPK) * [**shouldInline](#shouldInline) * [**shouldRename](#shouldRename) * [**willAutoJoin](#willAutoJoin) ## Properties[**](#Properties) ### [**](#entityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L197)readonlyentityName **entityName: string ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L203)optionalindex **index? : number ### [**](#key)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L199)optionalreadonlykey **key? : string ### [**](#parent)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L198)optionalreadonlyparent **parent? : [ICriteriaNode](https://mikro-orm.io/api/knex/interface/ICriteriaNode.md)\ ### [**](#payload)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L201)payload **payload: any ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L202)optionalprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ ### [**](#strict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L200)optionalreadonlystrict **strict? : boolean ## Methods[**](#Methods) ### [**](#getPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L209)getPath * ****getPath**(addIndex): string - #### Parameters * ##### optionaladdIndex: boolean #### Returns string ### [**](#getPivotPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L210)getPivotPath * ****getPivotPath**(path): string - #### Parameters * ##### path: string #### Returns string ### [**](#process)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L204)process * ****process**(qb, options): any - #### Parameters * ##### qb: [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ * ##### optionaloptions: [ICriteriaNodeProcessOptions](https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md) #### Returns any ### [**](#renameFieldToPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L208)renameFieldToPK * ****renameFieldToPK**\(qb, ownerAlias): string - #### Parameters * ##### qb: [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ * ##### optionalownerAlias: string #### Returns string ### [**](#shouldInline)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L205)shouldInline * ****shouldInline**(payload): boolean - #### Parameters * ##### payload: any #### Returns boolean ### [**](#shouldRename)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L207)shouldRename * ****shouldRename**(payload): boolean - #### Parameters * ##### payload: any #### Returns boolean ### [**](#willAutoJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L206)willAutoJoin * ****willAutoJoin**(qb, alias, options): boolean - #### Parameters * ##### qb: [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ * ##### optionalalias: string * ##### optionaloptions: [ICriteriaNodeProcessOptions](https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md) #### Returns boolean --- # Source: https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md # ICriteriaNodeProcessOptions ## Index[**](#Index) ### Properties * [**alias](#alias) * [**filter](#filter) * [**ignoreBranching](#ignoreBranching) * [**matchPopulateJoins](#matchPopulateJoins) * [**preferNoBranch](#preferNoBranch) * [**type](#type) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L188)optionalalias **alias? : string ### [**](#filter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L193)optionalfilter **filter? : boolean ### [**](#ignoreBranching)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L190)optionalignoreBranching **ignoreBranching? : boolean ### [**](#matchPopulateJoins)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L189)optionalmatchPopulateJoins **matchPopulateJoins? : boolean ### [**](#preferNoBranch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L191)optionalpreferNoBranch **preferNoBranch? : boolean ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L192)optionaltype **type? : orderBy --- # Source: https://mikro-orm.io/api/core/interface/IDatabaseDriver.md # IDatabaseDriver \ ### Implemented by * [DatabaseDriver](https://mikro-orm.io/api/core/class/DatabaseDriver.md) ## Index[**](#Index) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**createEntityManager](#createEntityManager) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L20)\[EntityManagerType] **\[EntityManagerType]: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)\> ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L21)readonlyconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L59)aggregate * ****aggregate**(entityName, pipeline): Promise\ - #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L27)close * ****close**(force): Promise\ - #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L25)connect * ****connect**(): Promise\ - #### Returns Promise\ ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L85)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L57)count * ****count**\(entityName, where, options): Promise\ - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L23)createEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L36)find * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L41)findOne * ****findOne**\(entityName, where, options): Promise\> - Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L43)findVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L31)getConnection * ****getConnection**(type): C - #### Parameters * ##### optionaltype: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) #### Returns C ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L78)getDependencies * ****getDependencies**(): string\[] - Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L72)getMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L68)getPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L66)loadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### optionalwhere: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L80)lockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L61)mapResult * ****mapResult**\(result, meta, populate): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - #### Parameters * ##### result: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### optionalpopulate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L53)nativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionaloptions: [NativeDeleteOptions](https://mikro-orm.io/api/core/interface/NativeDeleteOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L45)nativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionaloptions: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L47)nativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### optionaloptions: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L49)nativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionaloptions: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L51)nativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### optionaloptions: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L29)reconnect * ****reconnect**(): Promise\ - #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L70)setMetadata * ****setMetadata**(metadata): void - #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L55)syncCollections * ****syncCollections**\(collections, options): Promise\ - #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/interface/IEntityGenerator.md # IEntityGenerator ## Index[**](#Index) ### Methods * [**generate](#generate) ## Methods[**](#Methods) ### [**](#generate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L959)generate * ****generate**(options): Promise\ - #### Parameters * ##### optionaloptions: [GenerateOptions](https://mikro-orm.io/api/core/interface/GenerateOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/interface/IMigrationGenerator.md # IMigrationGenerator ### Implemented by * [MigrationGenerator](https://mikro-orm.io/api/migrations/class/MigrationGenerator.md) ## Index[**](#Index) ### Methods * [**createStatement](#createStatement) * [**generate](#generate) * [**generateMigrationFile](#generateMigrationFile) ## Methods[**](#Methods) ### [**](#createStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1053)createStatement * ****createStatement**(sql, padLeft): string - Creates single migration statement. By default adds `this.addSql(sql);` to the code. *** #### Parameters * ##### sql: string * ##### padLeft: number #### Returns string ### [**](#generate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1048)generate * ****generate**(diff, path, name): Promise<\[string, string]> - Generates the full contents of migration file. Uses `generateMigrationFile` to get the file contents. *** #### Parameters * ##### diff: [MigrationDiff](https://mikro-orm.io/api/core/interface/MigrationDiff.md) * ##### optionalpath: string * ##### optionalname: string #### Returns Promise<\[string, string]> ### [**](#generateMigrationFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1058)generateMigrationFile * ****generateMigrationFile**(className, diff): [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ - Returns the file contents of given migration. *** #### Parameters * ##### className: string * ##### diff: [MigrationDiff](https://mikro-orm.io/api/core/interface/MigrationDiff.md) #### Returns [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ --- # Source: https://mikro-orm.io/api/core/interface/IMigrator.md # IMigrator ### Implemented by * [Migrator](https://mikro-orm.io/api/migrations/class/Migrator.md) ## Index[**](#Index) ### Methods * [**checkMigrationNeeded](#checkMigrationNeeded) * [**createInitialMigration](#createInitialMigration) * [**createMigration](#createMigration) * [**down](#down) * [**getExecutedMigrations](#getExecutedMigrations) * [**getPendingMigrations](#getPendingMigrations) * [**off](#off) * [**on](#on) * [**up](#up) ## Methods[**](#Methods) ### [**](#checkMigrationNeeded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L991)checkMigrationNeeded * ****checkMigrationNeeded**(): Promise\ - Checks current schema for changes. *** #### Returns Promise\ ### [**](#createInitialMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L999)createInitialMigration * ****createInitialMigration**(path): Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> - Creates initial migration. This generates the schema based on metadata, and checks whether all the tables are already present. If yes, it will also automatically log the migration as executed. Initial migration can be created only if the schema is already aligned with the metadata, or when no schema is present - in such case regular migration would have the same effect. *** #### Parameters * ##### optionalpath: string #### Returns Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> ### [**](#createMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L986)createMigration * ****createMigration**(path, blank, initial, name): Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> - Checks current schema for changes, generates new migration if there are any. *** #### Parameters * ##### optionalpath: string * ##### optionalblank: boolean * ##### optionalinitial: boolean * ##### optionalname: string #### Returns Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> ### [**](#down)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1019)down * ****down**(options): Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> - Executes down migrations to the given point. Without parameter it will migrate one version down. *** #### Parameters * ##### optionaloptions: string | string\[] | [MigrateOptions](https://mikro-orm.io/api/core.md#MigrateOptions) #### Returns Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> ### [**](#getExecutedMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1004)getExecutedMigrations * ****getExecutedMigrations**(): Promise<[MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow)\[]> - Returns list of already executed migrations. *** #### Returns Promise<[MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow)\[]> ### [**](#getPendingMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1009)getPendingMigrations * ****getPendingMigrations**(): Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> - Returns list of pending (not yet executed) migrations found in the migration directory. *** #### Returns Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> ### [**](#off)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1029)off * ****off**(event, listener): [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) - Removes event handler. *** #### Parameters * ##### event: [MigratorEvent](https://mikro-orm.io/api/core.md#MigratorEvent) * ##### listener: (event) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ #### Returns [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) ### [**](#on)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1024)on * ****on**(event, listener): [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) - Registers event handler. *** #### Parameters * ##### event: [MigratorEvent](https://mikro-orm.io/api/core.md#MigratorEvent) * ##### listener: (event) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ #### Returns [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) ### [**](#up)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1014)up * ****up**(options): Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> - Executes specified migrations. Without parameter it will migrate up to the latest version. *** #### Parameters * ##### optionaloptions: string | string\[] | [MigrateOptions](https://mikro-orm.io/api/core.md#MigrateOptions) #### Returns Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> --- # Source: https://mikro-orm.io/api/knex/interface/IQueryBuilder.md # IQueryBuilder \ ## Index[**](#Index) ### Properties * [**\_fields](#_fields) * [**alias](#alias) * [**type](#type) ### Methods * [**addSelect](#addSelect) * [**andWhere](#andWhere) * [**clone](#clone) * [**count](#count) * [**delete](#delete) * [**from](#from) * [**getAliasForJoinPath](#getAliasForJoinPath) * [**getJoinForPath](#getJoinForPath) * [**getNextAlias](#getNextAlias) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**orderBy](#orderBy) * [**orWhere](#orWhere) * [**scheduleFilterCheck](#scheduleFilterCheck) * [**select](#select) * [**setFlag](#setFlag) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSubQuery](#withSubQuery) ## Properties[**](#Properties) ### [**](#_fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L150)optional\_fields **\_fields? : [Field](https://mikro-orm.io/api/knex.md#Field)\\[] ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L148)readonlyalias **alias: string ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L149)optionalreadonlytype **type? : [QueryType](https://mikro-orm.io/api/knex/enum/QueryType.md) ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L154)addSelect * ****addSelect**(fields): this - #### Parameters * ##### fields: string | string\[] #### Returns this ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L170)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L171)andWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L180)clone * ****clone**(reset): [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ - #### Parameters * ##### optionalreset: boolean #### Returns [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L160)count * ****count**(field, distinct): this - #### Parameters * ##### optionalfield: string | string\[] * ##### optionaldistinct: boolean #### Returns this ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L158)delete * ****delete**(cond): this - #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns this ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L155)from * ****from**\(target, aliasName): [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ - #### Parameters * ##### target: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ | [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md)\ ### [**](#getAliasForJoinPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L177)getAliasForJoinPath * ****getAliasForJoinPath**(path, options): undefined | string - #### Parameters * ##### path: string * ##### optionaloptions: [ICriteriaNodeProcessOptions](https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md) #### Returns undefined | string ### [**](#getJoinForPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L178)getJoinForPath * ****getJoinForPath**(path, options): undefined | [JoinOptions](https://mikro-orm.io/api/knex/interface/JoinOptions.md) - #### Parameters * ##### optionalpath: string * ##### optionaloptions: [ICriteriaNodeProcessOptions](https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md) #### Returns undefined | [JoinOptions](https://mikro-orm.io/api/knex/interface/JoinOptions.md) ### [**](#getNextAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L179)getNextAlias * ****getNextAlias**(entityName): string - #### Parameters * ##### optionalentityName: string #### Returns string ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L175)groupBy * ****groupBy**(fields): this - #### Parameters * ##### fields: string | keyof T | (string | keyof T)\[] #### Returns this ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L183)hasFlag * ****hasFlag**(flag): boolean - #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L176)having * ****having**(cond, params): this - #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L162)innerJoin * ****innerJoin**(field, alias, cond): this - #### Parameters * ##### field: string * ##### alias: string * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns this ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L166)innerJoinAndSelect * ****innerJoinAndSelect**(field, alias, cond, fields): this - #### Parameters * ##### field: string * ##### alias: string * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalfields: string\[] #### Returns this ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L156)insert * ****insert**(data): this - #### Parameters * ##### data: any #### Returns this ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L161)join * ****join**(field, alias, cond, type, path): this - #### Parameters * ##### field: string * ##### alias: string * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionaltype: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) * ##### optionalpath: string #### Returns this ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L164)joinAndSelect * ****joinAndSelect**(field, alias, cond): this - #### Parameters * ##### field: string * ##### alias: string * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns this ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L163)leftJoin * ****leftJoin**(field, alias, cond): this - #### Parameters * ##### field: string * ##### alias: string * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns this ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L165)leftJoinAndSelect * ****leftJoinAndSelect**(field, alias, cond, fields): this - #### Parameters * ##### field: string * ##### alias: string * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalfields: string\[] #### Returns this ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L174)orderBy * ****orderBy**(orderBy): this - #### Parameters * ##### orderBy: [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\ #### Returns this ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L172)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L173)orWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#scheduleFilterCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L184)scheduleFilterCheck * ****scheduleFilterCheck**(path): void - #### Parameters * ##### path: string #### Returns void ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L153)select * ****select**(fields, distinct): this - #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### optionaldistinct: boolean #### Returns this ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L181)setFlag * ****setFlag**(flag): this - #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L159)truncate * ****truncate**(): this - #### Returns this ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L182)unsetFlag * ****unsetFlag**(flag): this - #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L157)update * ****update**(data): this - #### Parameters * ##### data: any #### Returns this ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L168)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L169)where * ****where**(cond, operator): this * ****where**(cond, params, operator): this - #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L167)withSubQuery * ****withSubQuery**(subQuery, alias): this - #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/interface/ISchemaGenerator.md # ISchemaGenerator ### Implemented by * [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md) * [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ## Index[**](#Index) ### Methods * [**clearDatabase](#clearDatabase) * [**createDatabase](#createDatabase) * [**createSchema](#createSchema) * [**dropDatabase](#dropDatabase) * [**dropSchema](#dropSchema) * [**ensureDatabase](#ensureDatabase) * [**ensureIndexes](#ensureIndexes) * [**execute](#execute) * [**getCreateSchemaSQL](#getCreateSchemaSQL) * [**getDropSchemaSQL](#getDropSchemaSQL) * [**getUpdateSchemaMigrationSQL](#getUpdateSchemaMigrationSQL) * [**getUpdateSchemaSQL](#getUpdateSchemaSQL) * [**refreshDatabase](#refreshDatabase) * [**updateSchema](#updateSchema) ## Methods[**](#Methods) ### [**](#clearDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L921)clearDatabase * ****clearDatabase**(options): Promise\ - #### Parameters * ##### optionaloptions: [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) #### Returns Promise\ ### [**](#createDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L916)createDatabase * ****createDatabase**(name): Promise\ - #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#createSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L908)createSchema * ****createSchema**(options): Promise\ - #### Parameters * ##### optionaloptions: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) #### Returns Promise\ ### [**](#dropDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L917)dropDatabase * ****dropDatabase**(name): Promise\ - #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#dropSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L911)dropSchema * ****dropSchema**(options): Promise\ - #### Parameters * ##### optionaloptions: [DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md) #### Returns Promise\ ### [**](#ensureDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L909)ensureDatabase * ****ensureDatabase**(options): Promise\ - #### Parameters * ##### optionaloptions: [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) #### Returns Promise\ ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L919)ensureIndexes * ****ensureIndexes**(): Promise\ - #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L918)execute * ****execute**(sql, options): Promise\ - #### Parameters * ##### sql: string * ##### optionaloptions: { wrap?: boolean } * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getCreateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L910)getCreateSchemaSQL * ****getCreateSchemaSQL**(options): Promise\ - #### Parameters * ##### optionaloptions: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) #### Returns Promise\ ### [**](#getDropSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L912)getDropSchemaSQL * ****getDropSchemaSQL**(options): Promise\ - #### Parameters * ##### optionaloptions: Omit<[DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md), dropDb> #### Returns Promise\ ### [**](#getUpdateSchemaMigrationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L915)getUpdateSchemaMigrationSQL * ****getUpdateSchemaMigrationSQL**(options): Promise<{ down: string; up: string }> - #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise<{ down: string; up: string }> ### [**](#getUpdateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L914)getUpdateSchemaSQL * ****getUpdateSchemaSQL**(options): Promise\ - #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise\ ### [**](#refreshDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L920)refreshDatabase * ****refreshDatabase**(options): Promise\ - #### Parameters * ##### optionaloptions: [RefreshDatabaseOptions](https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md) #### Returns Promise\ ### [**](#updateSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L913)updateSchema * ****updateSchema**(options): Promise\ - #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/interface/ISeedManager.md # ISeedManager ### Implemented by * [SeedManager](https://mikro-orm.io/api/seeder/class/SeedManager.md) ## Index[**](#Index) ### Methods * [**createSeeder](#createSeeder) * [**seed](#seed) ## Methods[**](#Methods) ### [**](#createSeeder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1330)createSeeder * ****createSeeder**(className): Promise\ - #### Parameters * ##### className: string #### Returns Promise\ ### [**](#seed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1327)seed * ****seed**(...classNames): Promise\ - #### Parameters * ##### rest...classNames: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\>>\[] #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/interface/IWrappedEntity.md # IWrappedEntity \ ## Index[**](#Index) ### Methods * [**assign](#assign) * [**getSchema](#getSchema) * [**init](#init) * [**isInitialized](#isInitialized) * [**isManaged](#isManaged) * [**isTouched](#isTouched) * [**populate](#populate) * [**populated](#populated) * [**serialize](#serialize) * [**setSchema](#setSchema) * [**setSerializationContext](#setSerializationContext) * [**toJSON](#toJSON) * [**toObject](#toObject) * [**toPOJO](#toPOJO) * [**toReference](#toReference) ## Methods[**](#Methods) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L256)assign * ****assign**\(data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> - #### Parameters * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### optionaloptions: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> ### [**](#getSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L261)getSchema * ****getSchema**(): undefined | string - #### Returns undefined | string ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L235)init * ****init**\(options): Promise\> - #### Parameters * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L230)isInitialized * ****isInitialized**(): boolean - #### Returns boolean ### [**](#isManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L232)isManaged * ****isManaged**(): boolean - #### Returns boolean ### [**](#isTouched)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L231)isTouched * ****isTouched**(): boolean - #### Returns boolean ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L234)populate * ****populate**\(populate, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - #### Parameters * ##### populate: false | [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] * ##### optionaloptions: [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L233)populated * ****populated**(populated): void - #### Parameters * ##### optionalpopulated: boolean #### Returns void ### [**](#serialize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L246)serialize * ****serialize**\(options): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, never> - #### Parameters * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, never> ### [**](#setSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L262)setSchema * ****setSchema**(schema): void - #### Parameters * ##### optionalschema: string #### Returns void ### [**](#setSerializationContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L251)setSerializationContext * ****setSerializationContext**\(options): void - #### Parameters * ##### options: [LoadHint](https://mikro-orm.io/api/core/interface/LoadHint.md)\ #### Returns void ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L244)toJSON * ****toJSON**(...args): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ - #### Parameters * ##### rest...args: any\[] #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ ### [**](#toObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L241)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L242)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L243)toObject * ****toObject**(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ * ****toObject**(ignoreFields): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ * ****toObject**\(ignoreFields): Omit<[EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\, Ignored> - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ ### [**](#toPOJO)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L245)toPOJO * ****toPOJO**(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ ### [**](#toReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L240)toReference * ****toReference**(): [Ref](https://mikro-orm.io/api/core.md#Ref)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, \*, never>> - #### Returns [Ref](https://mikro-orm.io/api/core.md#Ref)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, \*, never>> --- # Source: https://mikro-orm.io/api/core/class/IdentityMap.md # IdentityMap ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**\[iterator\]](#\[iterator]) * [**clear](#clear) * [**delete](#delete) * [**get](#get) * [**getByHash](#getByHash) * [**getStore](#getStore) * [**keys](#keys) * [**store](#store) * [**values](#values) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L5)constructor * ****new IdentityMap**(defaultSchema): [IdentityMap](https://mikro-orm.io/api/core/class/IdentityMap.md) - #### Parameters * ##### optionaldefaultSchema: string #### Returns [IdentityMap](https://mikro-orm.io/api/core/class/IdentityMap.md) ## Methods[**](#Methods) ### [**](#\[iterator])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L49)\[iterator] * ****\[iterator]**(): IterableIterator\, any, any> - #### Returns IterableIterator\, any, any> ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L35)clear * ****clear**(): void - #### Returns void ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L13)delete * ****delete**\(item): void - #### Parameters * ##### item: T #### Returns void ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L70)get * ****get**\(hash): undefined | T - For back compatibility only. *** #### Parameters * ##### hash: string #### Returns undefined | T ### [**](#getByHash)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L17)getByHash * ****getByHash**\(meta, hash): undefined | T - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### hash: string #### Returns undefined | T ### [**](#getStore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L22)getStore * ****getStore**\(meta): Map\ - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns Map\ ### [**](#keys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L57)keys * ****keys**(): string\[] - #### Returns string\[] ### [**](#store)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L9)store * ****store**\(item): void - #### Parameters * ##### item: T #### Returns void ### [**](#values)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L39)values * ****values**(): Partial\\[] - #### Returns Partial\\[] --- # Source: https://mikro-orm.io/api/knex/interface/IndexDef.md # IndexDef ## Index[**](#Index) ### Properties * [**columnNames](#columnNames) * [**composite](#composite) * [**constraint](#constraint) * [**deferMode](#deferMode) * [**expression](#expression) * [**keyName](#keyName) * [**options](#options) * [**primary](#primary) * [**type](#type) * [**unique](#unique) ## Properties[**](#Properties) ### [**](#columnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L88)columnNames **columnNames: string\[] ### [**](#composite)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L93)optionalcomposite **composite? : boolean ### [**](#constraint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L91)constraint **constraint: boolean ### [**](#deferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L97)optionaldeferMode **deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) | immediate | deferred ### [**](#expression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L94)optionalexpression **expression? : string ### [**](#keyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L89)keyName **keyName: string ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L95)optionaloptions **options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L92)primary **primary: boolean ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L96)optionaltype **type? : string | Readonly<{ indexType? : string; predicate? : QueryBuilder\; storageEngineIndexType? : hash | btree }> ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L90)unique **unique: boolean --- # Source: https://mikro-orm.io/api/core/interface/IndexOptions.md # IndexOptions \ ### Hierarchy * BaseOptions\ * *IndexOptions* ## Index[**](#Index) ### Properties * [**expression](#expression) * [**name](#name) * [**options](#options) * [**properties](#properties) * [**type](#type) ## Properties[**](#Properties) ### [**](#expression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L35)optionalinheritedexpression **expression? : string | (T extends [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\

? [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback)\

: [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback)\) Inherited from BaseOptions.expression ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L32)optionalinheritedname **name? : string Inherited from BaseOptions.name ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L34)optionalinheritedoptions **options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) Inherited from BaseOptions.options ### [**](#properties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L33)optionalinheritedproperties **properties? : T extends [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\

? Properties\ : Properties\ Inherited from BaseOptions.properties ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L43)optionaltype **type? : string --- # Source: https://mikro-orm.io/api/core/interface/InitCollectionOptions.md # InitCollectionOptions \ ### Hierarchy * [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ * *InitCollectionOptions* ## Index[**](#Index) ### Properties * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**dataloader](#dataloader) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**ignoreLazyScalarProperties](#ignoreLazyScalarProperties) * [**lockMode](#lockMode) * [**logging](#logging) * [**lookup](#lookup) * [**orderBy](#orderBy) * [**populate](#populate) * [**populateWhere](#populateWhere) * [**ref](#ref) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) * [**validate](#validate) * [**where](#where) ## Properties[**](#Properties) ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L51)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from EntityLoaderOptions.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L45)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from EntityLoaderOptions.convertCustomTypes ### [**](#dataloader)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L497)optionaldataloader **dataloader? : boolean ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L40)optionalinheritedexclude **exclude? : readonly [EntityField](https://mikro-orm.io/api/core.md#EntityField)\\[] Inherited from EntityLoaderOptions.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L39)optionalinheritedfields **fields? : readonly [EntityField](https://mikro-orm.io/api/core.md#EntityField)\\[] Inherited from EntityLoaderOptions.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L47)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from EntityLoaderOptions.filters ### [**](#ignoreLazyScalarProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L46)optionalinheritedignoreLazyScalarProperties **ignoreLazyScalarProperties? : boolean Inherited from EntityLoaderOptions.ignoreLazyScalarProperties ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L49)optionalinheritedlockMode **lockMode? : NONE | PESSIMISTIC\_READ | PESSIMISTIC\_WRITE | PESSIMISTIC\_PARTIAL\_WRITE | PESSIMISTIC\_WRITE\_OR\_FAIL | PESSIMISTIC\_PARTIAL\_READ | PESSIMISTIC\_READ\_OR\_FAIL Inherited from EntityLoaderOptions.lockMode ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L52)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from EntityLoaderOptions.logging ### [**](#lookup)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L44)optionalinheritedlookup **lookup? : boolean Inherited from EntityLoaderOptions.lookup ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L41)optionalinheritedorderBy **orderBy? : [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\ | [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\\[] Inherited from EntityLoaderOptions.orderBy ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L498)optionalpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L38)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all Inherited from EntityLoaderOptions.populateWhere ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L499)optionalref **ref? : boolean ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L42)optionalinheritedrefresh **refresh? : boolean Inherited from EntityLoaderOptions.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L50)optionalinheritedschema **schema? : string Inherited from EntityLoaderOptions.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L48)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) Inherited from EntityLoaderOptions.strategy ### [**](#validate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L43)optionalinheritedvalidate **validate? : boolean Inherited from EntityLoaderOptions.validate ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L37)optionalinheritedwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ Inherited from EntityLoaderOptions.where --- # Source: https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md # InsertQueryBuilder \ ### Hierarchy * [RunQueryBuilder](https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md)\ * *InsertQueryBuilder* ## Index[**](#Index) ### Properties * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResultAndCount](#getResultAndCount) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias **alias: string Inherited from RunQueryBuilder.alias ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper **helper: QueryBuilderHelper Inherited from RunQueryBuilder.helper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias **mainAlias: [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ Inherited from RunQueryBuilder.mainAlias ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from RunQueryBuilder.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from RunQueryBuilder.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from RunQueryBuilder.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from RunQueryBuilder.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from RunQueryBuilder.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from RunQueryBuilder.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from RunQueryBuilder.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from RunQueryBuilder.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2014)inheritedexecute * ****execute**\(method, mapResults): Promise\ - Inherited from RunQueryBuilder.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from RunQueryBuilder.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from RunQueryBuilder.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from RunQueryBuilder.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from RunQueryBuilder.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from RunQueryBuilder.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[T\[], number]> - Inherited from RunQueryBuilder.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[T\[], number]> ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from RunQueryBuilder.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from RunQueryBuilder.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from RunQueryBuilder.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from RunQueryBuilder.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from RunQueryBuilder.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from RunQueryBuilder.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from RunQueryBuilder.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from RunQueryBuilder.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from RunQueryBuilder.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from RunQueryBuilder.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from RunQueryBuilder.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2015)inheritedthen * ****then**\(onfulfilled, onrejected): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from RunQueryBuilder.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from RunQueryBuilder.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from RunQueryBuilder.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from RunQueryBuilder.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from RunQueryBuilder.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2013)inheritedwhere * ****where**(cond, params, operator): this - Inherited from RunQueryBuilder.where #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionalparams: any\[] | $and | $or * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from RunQueryBuilder.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from RunQueryBuilder.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/class/IntegerType.md # IntegerType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *IntegerType* * [MediumIntType](https://mikro-orm.io/api/core/class/MediumIntType.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new IntegerType**(): [IntegerType](https://mikro-orm.io/api/core/class/IntegerType.md) - Inherited from Type.constructor #### Returns [IntegerType](https://mikro-orm.io/api/core/class/IntegerType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntegerType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | number * ##### b: undefined | null | number #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntegerType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntegerType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | number - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | number ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/IntervalType.md # IntervalType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *IntervalType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new IntervalType**(): [IntervalType](https://mikro-orm.io/api/core/class/IntervalType.md) - Inherited from Type.constructor #### Returns [IntervalType](https://mikro-orm.io/api/core/class/IntervalType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L54)inheritedcompareAsType * ****compareAsType**(): string - Inherited from Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntervalType.ts#L15)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform): undefined | null | string - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntervalType.ts#L11)convertToJSValue * ****convertToJSValue**(value, platform): undefined | null | string - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntervalType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntervalType.ts#L19)getDefaultLength * ****getDefaultLength**(platform): number - Overrides Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/InvalidFieldNameException.md # InvalidFieldNameException Exception for an invalid specified field name in a statement detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *InvalidFieldNameException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new InvalidFieldNameException**(previous): [InvalidFieldNameException](https://mikro-orm.io/api/core/class/InvalidFieldNameException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [InvalidFieldNameException](https://mikro-orm.io/api/core/class/InvalidFieldNameException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/enum/IsolationLevel.md # IsolationLevel ## Index[**](#Index) ### Enumeration Members * [**READ\_COMMITTED](#READ_COMMITTED) * [**READ\_UNCOMMITTED](#READ_UNCOMMITTED) * [**REPEATABLE\_READ](#REPEATABLE_READ) * [**SERIALIZABLE](#SERIALIZABLE) * [**SNAPSHOT](#SNAPSHOT) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#READ_COMMITTED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L169)READ\_COMMITTED **READ\_COMMITTED: read committed ### [**](#READ_UNCOMMITTED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L168)READ\_UNCOMMITTED **READ\_UNCOMMITTED: read uncommitted ### [**](#REPEATABLE_READ)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L171)REPEATABLE\_READ **REPEATABLE\_READ: repeatable read ### [**](#SERIALIZABLE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L172)SERIALIZABLE **SERIALIZABLE: serializable ### [**](#SNAPSHOT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L170)SNAPSHOT **SNAPSHOT: snapshot --- # Source: https://mikro-orm.io/api/migrations/class/JSMigrationGenerator.md # JSMigrationGenerator ### Hierarchy * [MigrationGenerator](https://mikro-orm.io/api/migrations/class/MigrationGenerator.md) * *JSMigrationGenerator* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**createStatement](#createStatement) * [**generate](#generate) * [**generateMigrationFile](#generateMigrationFile) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L13)constructor * ****new JSMigrationGenerator**(driver, namingStrategy, options): [JSMigrationGenerator](https://mikro-orm.io/api/migrations/class/JSMigrationGenerator.md) - Inherited from MigrationGenerator.constructor #### Parameters * ##### driver: [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> * ##### namingStrategy: [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * ##### options: [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) #### Returns [JSMigrationGenerator](https://mikro-orm.io/api/migrations/class/JSMigrationGenerator.md) ## Methods[**](#Methods) ### [**](#createStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L37)inheritedcreateStatement * ****createStatement**(sql, padLeft): string - Inherited from MigrationGenerator.createStatement Creates single migration statement. By default adds `this.addSql(sql);` to the code. *** #### Parameters * ##### sql: string * ##### padLeft: number #### Returns string ### [**](#generate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L20)inheritedgenerate * ****generate**(diff, path, name): Promise<\[string, string]> - Inherited from MigrationGenerator.generate Generates the full contents of migration file. Uses `generateMigrationFile` to get the file contents. *** #### Parameters * ##### diff: { down: string\[]; up: string\[] } * * ##### down: string\[] * ##### up: string\[] ##### optionalpath: string * ##### optionalname: string #### Returns Promise<\[string, string]> ### [**](#generateMigrationFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/JSMigrationGenerator.ts#L8)generateMigrationFile * ****generateMigrationFile**(className, diff): string - Overrides MigrationGenerator.generateMigrationFile Returns the file contents of given migration. *** #### Parameters * ##### className: string * ##### diff: { down: string\[]; up: string\[] } * ##### down: string\[] * ##### up: string\[] #### Returns string --- # Source: https://mikro-orm.io/api/knex/interface/JoinOptions.md # JoinOptions ## Index[**](#Index) ### Properties * [**alias](#alias) * [**cond](#cond) * [**cond\_](#cond_) * [**inverseAlias](#inverseAlias) * [**inverseJoinColumns](#inverseJoinColumns) * [**joinColumns](#joinColumns) * [**nested](#nested) * [**ownerAlias](#ownerAlias) * [**parent](#parent) * [**path](#path) * [**primaryKeys](#primaryKeys) * [**prop](#prop) * [**schema](#schema) * [**subquery](#subquery) * [**table](#table) * [**type](#type) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L37)alias **alias: string ### [**](#cond)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L45)cond **cond: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#cond_)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L48)optionalcond\_ **cond\_? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#inverseAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L39)optionalinverseAlias **inverseAlias? : string ### [**](#inverseJoinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L41)optionalinverseJoinColumns **inverseJoinColumns? : string\[] ### [**](#joinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L40)optionaljoinColumns **joinColumns? : string\[] ### [**](#nested)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L50)optionalnested **nested? : Set<[JoinOptions](https://mikro-orm.io/api/knex/interface/JoinOptions.md)> ### [**](#ownerAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L38)ownerAlias **ownerAlias: string ### [**](#parent)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L51)optionalparent **parent? : [JoinOptions](https://mikro-orm.io/api/knex/interface/JoinOptions.md) ### [**](#path)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L43)optionalpath **path? : string ### [**](#primaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L42)optionalprimaryKeys **primaryKeys? : string\[] ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L44)prop **prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L35)optionalschema **schema? : string ### [**](#subquery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L49)optionalsubquery **subquery? : string ### [**](#table)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L34)table **table: string ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L36)type **type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) --- # Source: https://mikro-orm.io/api/knex/enum/JoinType.md # JoinType ## Index[**](#Index) ### Enumeration Members * [**innerJoin](#innerJoin) * [**innerJoinLateral](#innerJoinLateral) * [**leftJoin](#leftJoin) * [**leftJoinLateral](#leftJoinLateral) * [**nestedInnerJoin](#nestedInnerJoin) * [**nestedLeftJoin](#nestedLeftJoin) * [**pivotJoin](#pivotJoin) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L13)innerJoin **innerJoin: inner join ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L17)innerJoinLateral **innerJoinLateral: inner join lateral ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L12)leftJoin **leftJoin: left join ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L18)leftJoinLateral **leftJoinLateral: left join lateral ### [**](#nestedInnerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L15)nestedInnerJoin **nestedInnerJoin: nested inner join ### [**](#nestedLeftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L14)nestedLeftJoin **nestedLeftJoin: nested left join ### [**](#pivotJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L16)pivotJoin **pivotJoin: pivot join --- # Source: https://mikro-orm.io/api/core/class/JsonType.md # JsonType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *JsonType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new JsonType**(): [JsonType](https://mikro-orm.io/api/core/class/JsonType.md) - Inherited from Type.constructor #### Returns [JsonType](https://mikro-orm.io/api/core/class/JsonType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L46)runtimeType * **get runtimeType(): string - Overrides Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L42)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | string * ##### b: null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L7)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): null | string - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: unknown * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L19)convertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Overrides Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L23)convertToJSValue * ****convertToJSValue**(value, platform, context): unknown - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: unknown * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L15)convertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Overrides Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L38)ensureComparable * ****ensureComparable**\(meta, prop): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/JsonType.ts#L34)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): unknown - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: unknown * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns unknown ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/knex/interface/Knex.md # Knex \ ### Hierarchy * QueryInterface\ * EventEmitter * *Knex* ### Callable * ****Knex**\(tableName, options): QueryBuilder\, DeferredKeySelection\, base>, never, false, {}, false, {}, never>\[]> * ****Knex**\(tableName, options): QueryBuilder\ *** * #### Parameters * ##### tableName: TTable * ##### optionaloptions: PgTableOptions #### Returns QueryBuilder\, DeferredKeySelection\, base>, never, false, {}, false, {}, never>\[]> ## Index[**](#Index) ### Properties * [**\_\_knex\_\_](#__knex__) * [**andHaving](#andHaving) * [**andHavingNotIn](#andHavingNotIn) * [**andWhere](#andWhere) * [**andWhereBetween](#andWhereBetween) * [**andWhereILike](#andWhereILike) * [**andWhereJsonNotSubsetOf](#andWhereJsonNotSubsetOf) * [**andWhereJsonNotSupersetOf](#andWhereJsonNotSupersetOf) * [**andWhereJsonObject](#andWhereJsonObject) * [**andWhereJsonPath](#andWhereJsonPath) * [**andWhereJsonSubsetOf](#andWhereJsonSubsetOf) * [**andWhereJsonSupersetOf](#andWhereJsonSupersetOf) * [**andWhereLike](#andWhereLike) * [**andWhereNot](#andWhereNot) * [**andWhereNotBetween](#andWhereNotBetween) * [**andWhereNotJsonObject](#andWhereNotJsonObject) * [**andWhereRaw](#andWhereRaw) * [**as](#as) * [**avg](#avg) * [**avgDistinct](#avgDistinct) * [**client](#client) * [**column](#column) * [**columns](#columns) * [**comment](#comment) * [**count](#count) * [**countDistinct](#countDistinct) * [**crossJoin](#crossJoin) * [**denseRank](#denseRank) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**except](#except) * [**first](#first) * [**fn](#fn) * [**from](#from) * [**fromRaw](#fromRaw) * [**fullOuterJoin](#fullOuterJoin) * [**groupBy](#groupBy) * [**groupByRaw](#groupByRaw) * [**having](#having) * [**havingBetween](#havingBetween) * [**havingIn](#havingIn) * [**havingNotBetween](#havingNotBetween) * [**havingNotIn](#havingNotIn) * [**havingNotNull](#havingNotNull) * [**havingNull](#havingNull) * [**havingRaw](#havingRaw) * [**havingWrapped](#havingWrapped) * [**hintComment](#hintComment) * [**innerJoin](#innerJoin) * [**intersect](#intersect) * [**into](#into) * [**isTransaction](#isTransaction) * [**join](#join) * [**joinRaw](#joinRaw) * [**jsonExtract](#jsonExtract) * [**jsonInsert](#jsonInsert) * [**jsonRemove](#jsonRemove) * [**jsonSet](#jsonSet) * [**leftJoin](#leftJoin) * [**leftOuterJoin](#leftOuterJoin) * [**max](#max) * [**migrate](#migrate) * [**min](#min) * [**orderBy](#orderBy) * [**orderByRaw](#orderByRaw) * [**orHaving](#orHaving) * [**orHavingBetween](#orHavingBetween) * [**orHavingNotBetween](#orHavingNotBetween) * [**orHavingNotIn](#orHavingNotIn) * [**orHavingNotNull](#orHavingNotNull) * [**orHavingNull](#orHavingNull) * [**orHavingRaw](#orHavingRaw) * [**orWhere](#orWhere) * [**orWhereBetween](#orWhereBetween) * [**orWhereExists](#orWhereExists) * [**orWhereILike](#orWhereILike) * [**orWhereIn](#orWhereIn) * [**orWhereJsonNotSubsetOf](#orWhereJsonNotSubsetOf) * [**orWhereJsonNotSupersetOf](#orWhereJsonNotSupersetOf) * [**orWhereJsonObject](#orWhereJsonObject) * [**orWhereJsonPath](#orWhereJsonPath) * [**orWhereJsonSubsetOf](#orWhereJsonSubsetOf) * [**orWhereJsonSupersetOf](#orWhereJsonSupersetOf) * [**orWhereLike](#orWhereLike) * [**orWhereNot](#orWhereNot) * [**orWhereNotBetween](#orWhereNotBetween) * [**orWhereNotExists](#orWhereNotExists) * [**orWhereNotIn](#orWhereNotIn) * [**orWhereNotJsonObject](#orWhereNotJsonObject) * [**orWhereNotNull](#orWhereNotNull) * [**orWhereNull](#orWhereNull) * [**orWhereRaw](#orWhereRaw) * [**outerJoin](#outerJoin) * [**partitionBy](#partitionBy) * [**rank](#rank) * [**raw](#raw) * [**ref](#ref) * [**rightJoin](#rightJoin) * [**rightOuterJoin](#rightOuterJoin) * [**rowNumber](#rowNumber) * [**schema](#schema) * [**seed](#seed) * [**select](#select) * [**sum](#sum) * [**sumDistinct](#sumDistinct) * [**table](#table) * [**union](#union) * [**unionAll](#unionAll) * [**updateFrom](#updateFrom) * [**userParams](#userParams) * [**using](#using) * [**VERSION](#VERSION) * [**where](#where) * [**whereBetween](#whereBetween) * [**whereExists](#whereExists) * [**whereILike](#whereILike) * [**whereIn](#whereIn) * [**whereJsonNotSubsetOf](#whereJsonNotSubsetOf) * [**whereJsonNotSupersetOf](#whereJsonNotSupersetOf) * [**whereJsonObject](#whereJsonObject) * [**whereJsonPath](#whereJsonPath) * [**whereJsonSubsetOf](#whereJsonSubsetOf) * [**whereJsonSupersetOf](#whereJsonSupersetOf) * [**whereLike](#whereLike) * [**whereNot](#whereNot) * [**whereNotBetween](#whereNotBetween) * [**whereNotExists](#whereNotExists) * [**whereNotIn](#whereNotIn) * [**whereNotJsonObject](#whereNotJsonObject) * [**whereNotNull](#whereNotNull) * [**whereNull](#whereNull) * [**whereRaw](#whereRaw) * [**whereWrapped](#whereWrapped) * [**with](#with) * [**withMaterialized](#withMaterialized) * [**withNotMaterialized](#withNotMaterialized) * [**withRaw](#withRaw) * [**withRecursive](#withRecursive) * [**withSchema](#withSchema) * [**withWrapped](#withWrapped) ### Methods * [**\[captureRejectionSymbol\]](#\[captureRejectionSymbol]) * [**addListener](#addListener) * [**batchInsert](#batchInsert) * [**clear](#clear) * [**clearCounters](#clearCounters) * [**clearGroup](#clearGroup) * [**clearHaving](#clearHaving) * [**clearOrder](#clearOrder) * [**clearSelect](#clearSelect) * [**clearWhere](#clearWhere) * [**decrement](#decrement) * [**del](#del) * [**delete](#delete) * [**destroy](#destroy) * [**emit](#emit) * [**eventNames](#eventNames) * [**getMaxListeners](#getMaxListeners) * [**increment](#increment) * [**initialize](#initialize) * [**insert](#insert) * [**limit](#limit) * [**listenerCount](#listenerCount) * [**listeners](#listeners) * [**modify](#modify) * [**off](#off) * [**offset](#offset) * [**on](#on) * [**once](#once) * [**onConflict](#onConflict) * [**pluck](#pluck) * [**prependListener](#prependListener) * [**prependOnceListener](#prependOnceListener) * [**queryBuilder](#queryBuilder) * [**rawListeners](#rawListeners) * [**removeAllListeners](#removeAllListeners) * [**removeListener](#removeListener) * [**returning](#returning) * [**setMaxListeners](#setMaxListeners) * [**transaction](#transaction) * [**transactionProvider](#transactionProvider) * [**truncate](#truncate) * [**update](#update) * [**upsert](#upsert) * [**withUserParams](#withUserParams) ## Properties[**](#Properties) ### [**](#__knex__)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L395)\_\_knex\_\_ **\_\_knex\_\_: string ### [**](#andHaving)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L723)inheritedandHaving **andHaving: Having\ Inherited from Knex.QueryInterface.andHaving ### [**](#andHavingNotIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L733)inheritedandHavingNotIn **andHavingNotIn: HavingRange\ Inherited from Knex.QueryInterface.andHavingNotIn ### [**](#andWhere)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L644)inheritedandWhere **andWhere: Where\ Inherited from Knex.QueryInterface.andWhere ### [**](#andWhereBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L674)inheritedandWhereBetween **andWhereBetween: WhereBetween\ Inherited from Knex.QueryInterface.andWhereBetween ### [**](#andWhereILike)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L666)inheritedandWhereILike **andWhereILike: Where\ Inherited from Knex.QueryInterface.andWhereILike ### [**](#andWhereJsonNotSubsetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L702)inheritedandWhereJsonNotSubsetOf **andWhereJsonNotSubsetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.andWhereJsonNotSubsetOf ### [**](#andWhereJsonNotSupersetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L695)inheritedandWhereJsonNotSupersetOf **andWhereJsonNotSupersetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.andWhereJsonNotSupersetOf ### [**](#andWhereJsonObject)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L681)inheritedandWhereJsonObject **andWhereJsonObject: WhereJsonObject\ Inherited from Knex.QueryInterface.andWhereJsonObject ### [**](#andWhereJsonPath)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L688)inheritedandWhereJsonPath **andWhereJsonPath: WhereJsonPath\ Inherited from Knex.QueryInterface.andWhereJsonPath ### [**](#andWhereJsonSubsetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L699)inheritedandWhereJsonSubsetOf **andWhereJsonSubsetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.andWhereJsonSubsetOf ### [**](#andWhereJsonSupersetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L692)inheritedandWhereJsonSupersetOf **andWhereJsonSupersetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.andWhereJsonSupersetOf ### [**](#andWhereLike)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L663)inheritedandWhereLike **andWhereLike: Where\ Inherited from Knex.QueryInterface.andWhereLike ### [**](#andWhereNot)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L647)inheritedandWhereNot **andWhereNot: Where\ Inherited from Knex.QueryInterface.andWhereNot ### [**](#andWhereNotBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L677)inheritedandWhereNotBetween **andWhereNotBetween: WhereBetween\ Inherited from Knex.QueryInterface.andWhereNotBetween ### [**](#andWhereNotJsonObject)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L684)inheritedandWhereNotJsonObject **andWhereNotJsonObject: WhereJsonObject\ Inherited from Knex.QueryInterface.andWhereNotJsonObject ### [**](#andWhereRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L651)inheritedandWhereRaw **andWhereRaw: WhereRaw\ Inherited from Knex.QueryInterface.andWhereRaw ### [**](#as)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L600)inheritedas **as: As\ Inherited from Knex.QueryInterface.as ### [**](#avg)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L787)inheritedavg **avg: TypePreservingAggregation\ Inherited from Knex.QueryInterface.avg ### [**](#avgDistinct)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L788)inheritedavgDistinct **avgDistinct: TypePreservingAggregation\ Inherited from Knex.QueryInterface.avgDistinct ### [**](#client)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L429)client **client: any ### [**](#column)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L602)inheritedcolumn **column: Select\ Inherited from Knex.QueryInterface.column ### [**](#columns)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L601)inheritedcolumns **columns: Select\ Inherited from Knex.QueryInterface.columns ### [**](#comment)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L603)inheritedcomment **comment: Comment\ Inherited from Knex.QueryInterface.comment ### [**](#count)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L773)inheritedcount **count: AsymmetricAggregation\ Inherited from Knex.QueryInterface.count ### [**](#countDistinct)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L778)inheritedcountDistinct **countDistinct: AsymmetricAggregation\ Inherited from Knex.QueryInterface.countDistinct ### [**](#crossJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L622)inheritedcrossJoin **crossJoin: Join\ Inherited from Knex.QueryInterface.crossJoin ### [**](#denseRank)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L816)inheriteddenseRank **denseRank: AnalyticFunction\ Inherited from Knex.QueryInterface.denseRank ### [**](#distinct)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L609)inheriteddistinct **distinct: Distinct\ Inherited from Knex.QueryInterface.distinct ### [**](#distinctOn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L610)inheriteddistinctOn **distinctOn: DistinctOn\ Inherited from Knex.QueryInterface.distinctOn ### [**](#except)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L719)inheritedexcept **except: Except\ Inherited from Knex.QueryInterface.except ### [**](#first)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L820)inheritedfirst **first: Select\, undefined>> Inherited from Knex.QueryInterface.first ### [**](#fn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L432)fn **fn: FunctionHelper ### [**](#from)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L605)inheritedfrom **from: Table\ Inherited from Knex.QueryInterface.from ### [**](#fromRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L606)inheritedfromRaw **fromRaw: Table\ Inherited from Knex.QueryInterface.fromRaw ### [**](#fullOuterJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L621)inheritedfullOuterJoin **fullOuterJoin: Join\ Inherited from Knex.QueryInterface.fullOuterJoin ### [**](#groupBy)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L705)inheritedgroupBy **groupBy: GroupBy\ Inherited from Knex.QueryInterface.groupBy ### [**](#groupByRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L706)inheritedgroupByRaw **groupByRaw: RawQueryBuilder\ Inherited from Knex.QueryInterface.groupByRaw ### [**](#having)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L722)inheritedhaving **having: Having\ Inherited from Knex.QueryInterface.having ### [**](#havingBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L731)inheritedhavingBetween **havingBetween: HavingRange\ Inherited from Knex.QueryInterface.havingBetween ### [**](#havingIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L727)inheritedhavingIn **havingIn: HavingRange\ Inherited from Knex.QueryInterface.havingIn ### [**](#havingNotBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L729)inheritedhavingNotBetween **havingNotBetween: HavingRange\ Inherited from Knex.QueryInterface.havingNotBetween ### [**](#havingNotIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L732)inheritedhavingNotIn **havingNotIn: HavingRange\ Inherited from Knex.QueryInterface.havingNotIn ### [**](#havingNotNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L736)inheritedhavingNotNull **havingNotNull: HavingNull\ Inherited from Knex.QueryInterface.havingNotNull ### [**](#havingNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L735)inheritedhavingNull **havingNull: HavingNull\ Inherited from Knex.QueryInterface.havingNull ### [**](#havingRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L724)inheritedhavingRaw **havingRaw: RawQueryBuilder\ Inherited from Knex.QueryInterface.havingRaw ### [**](#havingWrapped)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L653)inheritedhavingWrapped **havingWrapped: WhereWrapped\ Inherited from Knex.QueryInterface.havingWrapped ### [**](#hintComment)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L604)inheritedhintComment **hintComment: HintComment\ Inherited from Knex.QueryInterface.hintComment ### [**](#innerJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L615)inheritedinnerJoin **innerJoin: Join\ Inherited from Knex.QueryInterface.innerJoin ### [**](#intersect)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L718)inheritedintersect **intersect: Intersect\ Inherited from Knex.QueryInterface.intersect ### [**](#into)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L607)inheritedinto **into: Table\ Inherited from Knex.QueryInterface.into ### [**](#isTransaction)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L436)optionalisTransaction **isTransaction? : boolean ### [**](#join)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L613)inheritedjoin **join: Join\ Inherited from Knex.QueryInterface.join ### [**](#joinRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L614)inheritedjoinRaw **joinRaw: JoinRaw\ Inherited from Knex.QueryInterface.joinRaw ### [**](#jsonExtract)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L625)inheritedjsonExtract **jsonExtract: JsonExtract\ Inherited from Knex.QueryInterface.jsonExtract ### [**](#jsonInsert)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L627)inheritedjsonInsert **jsonInsert: JsonInsert\ Inherited from Knex.QueryInterface.jsonInsert ### [**](#jsonRemove)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L628)inheritedjsonRemove **jsonRemove: JsonRemove\ Inherited from Knex.QueryInterface.jsonRemove ### [**](#jsonSet)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L626)inheritedjsonSet **jsonSet: JsonSet\ Inherited from Knex.QueryInterface.jsonSet ### [**](#leftJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L616)inheritedleftJoin **leftJoin: Join\ Inherited from Knex.QueryInterface.leftJoin ### [**](#leftOuterJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L617)inheritedleftOuterJoin **leftOuterJoin: Join\ Inherited from Knex.QueryInterface.leftOuterJoin ### [**](#max)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L784)inheritedmax **max: TypePreservingAggregation\ Inherited from Knex.QueryInterface.max ### [**](#migrate)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L430)migrate **migrate: Migrator ### [**](#min)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L783)inheritedmin **min: TypePreservingAggregation\ Inherited from Knex.QueryInterface.min ### [**](#orderBy)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L709)inheritedorderBy **orderBy: OrderBy\ Inherited from Knex.QueryInterface.orderBy ### [**](#orderByRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L710)inheritedorderByRaw **orderByRaw: RawQueryBuilder\ Inherited from Knex.QueryInterface.orderByRaw ### [**](#orHaving)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L725)inheritedorHaving **orHaving: Having\ Inherited from Knex.QueryInterface.orHaving ### [**](#orHavingBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L730)inheritedorHavingBetween **orHavingBetween: HavingRange\ Inherited from Knex.QueryInterface.orHavingBetween ### [**](#orHavingNotBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L728)inheritedorHavingNotBetween **orHavingNotBetween: HavingRange\ Inherited from Knex.QueryInterface.orHavingNotBetween ### [**](#orHavingNotIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L734)inheritedorHavingNotIn **orHavingNotIn: HavingRange\ Inherited from Knex.QueryInterface.orHavingNotIn ### [**](#orHavingNotNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L738)inheritedorHavingNotNull **orHavingNotNull: HavingNull\ Inherited from Knex.QueryInterface.orHavingNotNull ### [**](#orHavingNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L737)inheritedorHavingNull **orHavingNull: HavingNull\ Inherited from Knex.QueryInterface.orHavingNull ### [**](#orHavingRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L726)inheritedorHavingRaw **orHavingRaw: RawQueryBuilder\ Inherited from Knex.QueryInterface.orHavingRaw ### [**](#orWhere)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L645)inheritedorWhere **orWhere: Where\ Inherited from Knex.QueryInterface.orWhere ### [**](#orWhereBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L673)inheritedorWhereBetween **orWhereBetween: WhereBetween\ Inherited from Knex.QueryInterface.orWhereBetween ### [**](#orWhereExists)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L655)inheritedorWhereExists **orWhereExists: WhereExists\ Inherited from Knex.QueryInterface.orWhereExists ### [**](#orWhereILike)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L667)inheritedorWhereILike **orWhereILike: Where\ Inherited from Knex.QueryInterface.orWhereILike ### [**](#orWhereIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L659)inheritedorWhereIn **orWhereIn: WhereIn\ Inherited from Knex.QueryInterface.orWhereIn ### [**](#orWhereJsonNotSubsetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L701)inheritedorWhereJsonNotSubsetOf **orWhereJsonNotSubsetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.orWhereJsonNotSubsetOf ### [**](#orWhereJsonNotSupersetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L694)inheritedorWhereJsonNotSupersetOf **orWhereJsonNotSupersetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.orWhereJsonNotSupersetOf ### [**](#orWhereJsonObject)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L680)inheritedorWhereJsonObject **orWhereJsonObject: WhereJsonObject\ Inherited from Knex.QueryInterface.orWhereJsonObject ### [**](#orWhereJsonPath)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L687)inheritedorWhereJsonPath **orWhereJsonPath: WhereJsonPath\ Inherited from Knex.QueryInterface.orWhereJsonPath ### [**](#orWhereJsonSubsetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L698)inheritedorWhereJsonSubsetOf **orWhereJsonSubsetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.orWhereJsonSubsetOf ### [**](#orWhereJsonSupersetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L691)inheritedorWhereJsonSupersetOf **orWhereJsonSupersetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.orWhereJsonSupersetOf ### [**](#orWhereLike)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L664)inheritedorWhereLike **orWhereLike: Where\ Inherited from Knex.QueryInterface.orWhereLike ### [**](#orWhereNot)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L648)inheritedorWhereNot **orWhereNot: Where\ Inherited from Knex.QueryInterface.orWhereNot ### [**](#orWhereNotBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L676)inheritedorWhereNotBetween **orWhereNotBetween: WhereBetween\ Inherited from Knex.QueryInterface.orWhereNotBetween ### [**](#orWhereNotExists)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L657)inheritedorWhereNotExists **orWhereNotExists: WhereExists\ Inherited from Knex.QueryInterface.orWhereNotExists ### [**](#orWhereNotIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L661)inheritedorWhereNotIn **orWhereNotIn: WhereIn\ Inherited from Knex.QueryInterface.orWhereNotIn ### [**](#orWhereNotJsonObject)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L683)inheritedorWhereNotJsonObject **orWhereNotJsonObject: WhereJsonObject\ Inherited from Knex.QueryInterface.orWhereNotJsonObject ### [**](#orWhereNotNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L671)inheritedorWhereNotNull **orWhereNotNull: WhereNull\ Inherited from Knex.QueryInterface.orWhereNotNull ### [**](#orWhereNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L669)inheritedorWhereNull **orWhereNull: WhereNull\ Inherited from Knex.QueryInterface.orWhereNull ### [**](#orWhereRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L650)inheritedorWhereRaw **orWhereRaw: WhereRaw\ Inherited from Knex.QueryInterface.orWhereRaw ### [**](#outerJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L620)inheritedouterJoin **outerJoin: Join\ Inherited from Knex.QueryInterface.outerJoin ### [**](#partitionBy)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L713)inheritedpartitionBy **partitionBy: PartitionBy\ Inherited from Knex.QueryInterface.partitionBy ### [**](#rank)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L815)inheritedrank **rank: AnalyticFunction\ Inherited from Knex.QueryInterface.rank ### [**](#raw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L397)raw **raw: RawBuilder\ ### [**](#ref)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L433)ref **ref: RefBuilder ### [**](#rightJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L618)inheritedrightJoin **rightJoin: Join\ Inherited from Knex.QueryInterface.rightJoin ### [**](#rightOuterJoin)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L619)inheritedrightOuterJoin **rightOuterJoin: Join\ Inherited from Knex.QueryInterface.rightOuterJoin ### [**](#rowNumber)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L817)inheritedrowNumber **rowNumber: AnalyticFunction\ Inherited from Knex.QueryInterface.rowNumber ### [**](#schema)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L423)schema **schema: SchemaBuilder ### [**](#seed)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L431)seed **seed: Seeder ### [**](#select)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L599)inheritedselect **select: Select\ Inherited from Knex.QueryInterface.select ### [**](#sum)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L785)inheritedsum **sum: TypePreservingAggregation\ Inherited from Knex.QueryInterface.sum ### [**](#sumDistinct)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L786)inheritedsumDistinct **sumDistinct: TypePreservingAggregation\ Inherited from Knex.QueryInterface.sumDistinct ### [**](#table)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L608)inheritedtable **table: Table\ Inherited from Knex.QueryInterface.table ### [**](#union)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L716)inheritedunion **union: Union\ Inherited from Knex.QueryInterface.union ### [**](#unionAll)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L717)inheritedunionAll **unionAll: Union\ Inherited from Knex.QueryInterface.unionAll ### [**](#updateFrom)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1155)inheritedupdateFrom **updateFrom: Table\ Inherited from Knex.QueryInterface.updateFrom ### [**](#userParams)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L434)userParams **userParams: Record\ ### [**](#using)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L631)inheritedusing **using: Using\ Inherited from Knex.QueryInterface.using ### [**](#VERSION)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L394)VERSION **VERSION: string ### [**](#where)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L643)inheritedwhere **where: Where\ Inherited from Knex.QueryInterface.where ### [**](#whereBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L672)inheritedwhereBetween **whereBetween: WhereBetween\ Inherited from Knex.QueryInterface.whereBetween ### [**](#whereExists)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L654)inheritedwhereExists **whereExists: WhereExists\ Inherited from Knex.QueryInterface.whereExists ### [**](#whereILike)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L665)inheritedwhereILike **whereILike: Where\ Inherited from Knex.QueryInterface.whereILike ### [**](#whereIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L658)inheritedwhereIn **whereIn: WhereIn\ Inherited from Knex.QueryInterface.whereIn ### [**](#whereJsonNotSubsetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L700)inheritedwhereJsonNotSubsetOf **whereJsonNotSubsetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.whereJsonNotSubsetOf ### [**](#whereJsonNotSupersetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L693)inheritedwhereJsonNotSupersetOf **whereJsonNotSupersetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.whereJsonNotSupersetOf ### [**](#whereJsonObject)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L679)inheritedwhereJsonObject **whereJsonObject: WhereJsonObject\ Inherited from Knex.QueryInterface.whereJsonObject ### [**](#whereJsonPath)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L686)inheritedwhereJsonPath **whereJsonPath: WhereJsonPath\ Inherited from Knex.QueryInterface.whereJsonPath ### [**](#whereJsonSubsetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L697)inheritedwhereJsonSubsetOf **whereJsonSubsetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.whereJsonSubsetOf ### [**](#whereJsonSupersetOf)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L690)inheritedwhereJsonSupersetOf **whereJsonSupersetOf: WhereJsonObject\ Inherited from Knex.QueryInterface.whereJsonSupersetOf ### [**](#whereLike)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L662)inheritedwhereLike **whereLike: Where\ Inherited from Knex.QueryInterface.whereLike ### [**](#whereNot)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L646)inheritedwhereNot **whereNot: Where\ Inherited from Knex.QueryInterface.whereNot ### [**](#whereNotBetween)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L675)inheritedwhereNotBetween **whereNotBetween: WhereBetween\ Inherited from Knex.QueryInterface.whereNotBetween ### [**](#whereNotExists)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L656)inheritedwhereNotExists **whereNotExists: WhereExists\ Inherited from Knex.QueryInterface.whereNotExists ### [**](#whereNotIn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L660)inheritedwhereNotIn **whereNotIn: WhereIn\ Inherited from Knex.QueryInterface.whereNotIn ### [**](#whereNotJsonObject)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L682)inheritedwhereNotJsonObject **whereNotJsonObject: WhereJsonObject\ Inherited from Knex.QueryInterface.whereNotJsonObject ### [**](#whereNotNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L670)inheritedwhereNotNull **whereNotNull: WhereNull\ Inherited from Knex.QueryInterface.whereNotNull ### [**](#whereNull)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L668)inheritedwhereNull **whereNull: WhereNull\ Inherited from Knex.QueryInterface.whereNull ### [**](#whereRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L649)inheritedwhereRaw **whereRaw: WhereRaw\ Inherited from Knex.QueryInterface.whereRaw ### [**](#whereWrapped)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L652)inheritedwhereWrapped **whereWrapped: WhereWrapped\ Inherited from Knex.QueryInterface.whereWrapped ### [**](#with)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L634)inheritedwith **with: With\ Inherited from Knex.QueryInterface.with ### [**](#withMaterialized)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L635)inheritedwithMaterialized **withMaterialized: With\ Inherited from Knex.QueryInterface.withMaterialized ### [**](#withNotMaterialized)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L636)inheritedwithNotMaterialized **withNotMaterialized: With\ Inherited from Knex.QueryInterface.withNotMaterialized ### [**](#withRaw)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L638)inheritedwithRaw **withRaw: WithRaw\ Inherited from Knex.QueryInterface.withRaw ### [**](#withRecursive)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L637)inheritedwithRecursive **withRecursive: With\ Inherited from Knex.QueryInterface.withRecursive ### [**](#withSchema)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L639)inheritedwithSchema **withSchema: WithSchema\ Inherited from Knex.QueryInterface.withSchema ### [**](#withWrapped)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L640)inheritedwithWrapped **withWrapped: WithWrapped\ Inherited from Knex.QueryInterface.withWrapped ## Methods[**](#Methods) ### [**](#\[captureRejectionSymbol])[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L103)optionalinherited\[captureRejectionSymbol] * ****\[captureRejectionSymbol]**\(error, event, ...args): void - Inherited from events.EventEmitter.\[captureRejectionSymbol] #### Parameters * ##### error: Error * ##### event: string | symbol * ##### rest...args: AnyRest #### Returns void ### [**](#addListener)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L642)inheritedaddListener * ****addListener**\(eventName, listener): this - Inherited from events.EventEmitter.addListener Alias for `emitter.on(eventName, listener)`. * **@since** v0.1.26 *** #### Parameters * ##### eventName: string | symbol * ##### listener: (...args) => void #### Returns this ### [**](#batchInsert)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L415)batchInsert * ****batchInsert**\(tableName, data, chunkSize): BatchInsertBuilder\ - #### Parameters * ##### tableName: TableDescriptor * ##### data: TRecord2 extends CompositeTableType\, Partial\> ? readonly ResolveTableType\, insert>\[] : readonly DbRecordArr\\[] * ##### optionalchunkSize: number #### Returns BatchInsertBuilder\ ### [**](#clear)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L760)inheritedclear * ****clear**(statement): QueryBuilder\ - Inherited from Knex.QueryInterface.clear #### Parameters * ##### statement: ClearStatements #### Returns QueryBuilder\ ### [**](#clearCounters)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L759)inheritedclearCounters * ****clearCounters**(): QueryBuilder\ - Inherited from Knex.QueryInterface.clearCounters #### Returns QueryBuilder\ ### [**](#clearGroup)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L756)inheritedclearGroup * ****clearGroup**(): QueryBuilder\ - Inherited from Knex.QueryInterface.clearGroup #### Returns QueryBuilder\ ### [**](#clearHaving)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L758)inheritedclearHaving * ****clearHaving**(): QueryBuilder\ - Inherited from Knex.QueryInterface.clearHaving #### Returns QueryBuilder\ ### [**](#clearOrder)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L757)inheritedclearOrder * ****clearOrder**(): QueryBuilder\ - Inherited from Knex.QueryInterface.clearOrder #### Returns QueryBuilder\ ### [**](#clearSelect)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L741)inheritedclearSelect * ****clearSelect**(): QueryBuilder\ extends DeferredKeySelection\ ? DeferredKeySelection\\[] : TResult> - Inherited from Knex.QueryInterface.clearSelect #### Returns QueryBuilder\ extends DeferredKeySelection\ ? DeferredKeySelection\\[] : TResult> ### [**](#clearWhere)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L755)inheritedclearWhere * ****clearWhere**(): QueryBuilder\ - Inherited from Knex.QueryInterface.clearWhere #### Returns QueryBuilder\ ### [**](#decrement)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L802)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L806)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L810)inheriteddecrement * ****decrement**(columnName, amount): QueryBuilder\ * ****decrement**(columnName, amount): QueryBuilder\ * ****decrement**(columns): QueryBuilder\ - Inherited from Knex.QueryInterface.decrement #### Parameters * ##### columnName: keyof TRecord * ##### optionalamount: number #### Returns QueryBuilder\ ### [**](#del)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1157)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1161)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1172)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1183)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1187)inheriteddel * ****del**(returning, options): QueryBuilder\\[]> * ****del**\(returning, options): QueryBuilder\ * ****del**\(returning, options): QueryBuilder\ * ****del**\(returning, options): QueryBuilder\ * ****del**\(): QueryBuilder\ - Inherited from Knex.QueryInterface.del #### Parameters * ##### returning: \* * ##### optionaloptions: DMLOptions #### Returns QueryBuilder\\[]> ### [**](#delete)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1189)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1193)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1204)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1215)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1219)inheriteddelete * ****delete**(returning, options): QueryBuilder\\[]> * ****delete**\(returning, options): QueryBuilder\ * ****delete**\(returning, options): QueryBuilder\ * ****delete**\(returning, options): QueryBuilder\ * ****delete**\(): QueryBuilder\ - Inherited from Knex.QueryInterface.delete #### Parameters * ##### returning: \* * ##### optionaloptions: DMLOptions #### Returns QueryBuilder\\[]> ### [**](#destroy)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L412)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L413)destroy * ****destroy**(callback): void * ****destroy**(): Promise\ - #### Parameters * ##### callback: Function #### Returns void ### [**](#emit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L904)inheritedemit * ****emit**\(eventName, ...args): boolean - Inherited from events.EventEmitter.emit Synchronously calls each of the listeners registered for the event named `eventName`, in the order they were registered, passing the supplied arguments to each. Returns `true` if the event had listeners, `false` otherwise. ``` import { EventEmitter } from 'node:events'; const myEmitter = new EventEmitter(); // First listener myEmitter.on('event', function firstListener() { console.log('Helloooo! first listener'); }); // Second listener myEmitter.on('event', function secondListener(arg1, arg2) { console.log(`event with parameters ${arg1}, ${arg2} in second listener`); }); // Third listener myEmitter.on('event', function thirdListener(...args) { const parameters = args.join(', '); console.log(`event with parameters ${parameters} in third listener`); }); console.log(myEmitter.listeners('event')); myEmitter.emit('event', 1, 2, 3, 4, 5); // Prints: // [ // [Function: firstListener], // [Function: secondListener], // [Function: thirdListener] // ] // Helloooo! first listener // event with parameters 1, 2 in second listener // event with parameters 1, 2, 3, 4, 5 in third listener ``` * **@since** v0.1.26 *** #### Parameters * ##### eventName: string | symbol * ##### rest...args: AnyRest #### Returns boolean ### [**](#eventNames)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L967)inheritedeventNames * ****eventNames**(): (string | symbol)\[] - Inherited from events.EventEmitter.eventNames Returns an array listing the events for which the emitter has registered listeners. The values in the array are strings or `Symbol`s. ``` import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.on('foo', () => {}); myEE.on('bar', () => {}); const sym = Symbol('symbol'); myEE.on(sym, () => {}); console.log(myEE.eventNames()); // Prints: [ 'foo', 'bar', Symbol(symbol) ] ``` * **@since** v6.0.0 *** #### Returns (string | symbol)\[] ### [**](#getMaxListeners)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L819)inheritedgetMaxListeners * ****getMaxListeners**(): number - Inherited from events.EventEmitter.getMaxListeners Returns the current max listener value for the `EventEmitter` which is either set by `emitter.setMaxListeners(n)` or defaults to EventEmitter.defaultMaxListeners. * **@since** v1.0.0 *** #### Returns number ### [**](#increment)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L790)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L794)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L798)inheritedincrement * ****increment**(columnName, amount): QueryBuilder\ * ****increment**(columnName, amount): QueryBuilder\ * ****increment**(columns): QueryBuilder\ - Inherited from Knex.QueryInterface.increment #### Parameters * ##### columnName: keyof TRecord * ##### optionalamount: number #### Returns QueryBuilder\ ### [**](#initialize)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L411)initialize * ****initialize**(config): void - #### Parameters * ##### optionalconfig: Config\ #### Returns void ### [**](#insert)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L830)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L839)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L855)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L871)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L887)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L903)inheritedinsert * ****insert**(data, returning, options): QueryBuilder\\[]> * ****insert**\(data, returning, options): QueryBuilder\ * ****insert**\(data, returning, options): QueryBuilder\ * ****insert**\(data, returning, options): QueryBuilder\ * ****insert**\(data, returning, options): QueryBuilder\ * ****insert**\(data): QueryBuilder\ - Inherited from Knex.QueryInterface.insert #### Parameters * ##### data: TRecord extends CompositeTableType\, Partial\> ? ResolveTableType\, insert> | readonly ResolveTableType\, insert>\[] : DbRecordArr\ | readonly DbRecordArr\\[] * ##### returning: \* * ##### optionaloptions: DMLOptions #### Returns QueryBuilder\\[]> ### [**](#limit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L767)inheritedlimit * ****limit**(limit, options): QueryBuilder\ - Inherited from Knex.QueryInterface.limit #### Parameters * ##### limit: number * ##### optionaloptions: string | Readonly<{ skipBinding?: boolean }> #### Returns QueryBuilder\ ### [**](#listenerCount)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L913)inheritedlistenerCount * ****listenerCount**\(eventName, listener): number - Inherited from events.EventEmitter.listenerCount Returns the number of listeners listening for the event named `eventName`. If `listener` is provided, it will return how many times the listener is found in the list of the listeners of the event. * **@since** v3.2.0 *** #### Parameters * ##### eventName: string | symbol The name of the event being listened for * ##### optionallistener: Function The event handler function #### Returns number ### [**](#listeners)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L832)inheritedlisteners * ****listeners**\(eventName): Function\[] - Inherited from events.EventEmitter.listeners Returns a copy of the array of listeners for the event named `eventName`. ``` server.on('connection', (stream) => { console.log('someone connected!'); }); console.log(util.inspect(server.listeners('connection'))); // Prints: [ [Function] ] ``` * **@since** v0.1.26 *** #### Parameters * ##### eventName: string | symbol #### Returns Function\[] ### [**](#modify)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L992)inheritedmodify * ****modify**\(callback, ...args): QueryBuilder\ - Inherited from Knex.QueryInterface.modify #### Parameters * ##### callback: QueryCallbackWithArgs\ * ##### rest...args: any\[] #### Returns QueryBuilder\ ### [**](#off)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L792)inheritedoff * ****off**\(eventName, listener): this - Inherited from events.EventEmitter.off Alias for `emitter.removeListener()`. * **@since** v10.0.0 *** #### Parameters * ##### eventName: string | symbol * ##### listener: (...args) => void #### Returns this ### [**](#offset)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L763)inheritedoffset * ****offset**(offset, options): QueryBuilder\ - Inherited from Knex.QueryInterface.offset #### Parameters * ##### offset: number * ##### optionaloptions: boolean | Readonly<{ skipBinding?: boolean }> #### Returns QueryBuilder\ ### [**](#on)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L674)inheritedon * ****on**\(eventName, listener): this - Inherited from events.EventEmitter.on Adds the `listener` function to the end of the listeners array for the event named `eventName`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `eventName` and `listener` will result in the `listener` being added, and called, multiple times. ``` server.on('connection', (stream) => { console.log('someone connected!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. By default, event listeners are invoked in the order they are added. The `emitter.prependListener()` method can be used as an alternative to add the event listener to the beginning of the listeners array. ``` import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.on('foo', () => console.log('a')); myEE.prependListener('foo', () => console.log('b')); myEE.emit('foo'); // Prints: // b // a ``` * **@since** v0.1.101 *** #### Parameters * ##### eventName: string | symbol The name of the event. * ##### listener: (...args) => void The callback function #### Returns this ### [**](#once)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L704)inheritedonce * ****once**\(eventName, listener): this - Inherited from events.EventEmitter.once Adds a **one-time** `listener` function for the event named `eventName`. The next time `eventName` is triggered, this listener is removed and then invoked. ``` server.once('connection', (stream) => { console.log('Ah, we have our first user!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. By default, event listeners are invoked in the order they are added. The `emitter.prependOnceListener()` method can be used as an alternative to add the event listener to the beginning of the listeners array. ``` import { EventEmitter } from 'node:events'; const myEE = new EventEmitter(); myEE.once('foo', () => console.log('a')); myEE.prependOnceListener('foo', () => console.log('b')); myEE.emit('foo'); // Prints: // b // a ``` * **@since** v0.3.0 *** #### Parameters * ##### eventName: string | symbol The name of the event. * ##### listener: (...args) => void The callback function #### Returns this ### [**](#onConflict)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1140)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1143)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1147)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1149)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1151)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1153)inheritedonConflict * ****onConflict**\(column): OnConflictQueryBuilder\ * ****onConflict**\(columns): OnConflictQueryBuilder\ * ****onConflict**(columns): OnConflictQueryBuilder\ * ****onConflict**(columns): OnConflictQueryBuilder\ * ****onConflict**(raw): OnConflictQueryBuilder\ * ****onConflict**(): OnConflictQueryBuilder\ - Inherited from Knex.QueryInterface.onConflict #### Parameters * ##### column: TKey #### Returns OnConflictQueryBuilder\ ### [**](#pluck)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L825)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L828)inheritedpluck * ****pluck**\(column): QueryBuilder\ * ****pluck**\(column): QueryBuilder\ - Inherited from Knex.QueryInterface.pluck #### Parameters * ##### column: K #### Returns QueryBuilder\ ### [**](#prependListener)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L931)inheritedprependListener * ****prependListener**\(eventName, listener): this - Inherited from events.EventEmitter.prependListener Adds the `listener` function to the *beginning* of the listeners array for the event named `eventName`. No checks are made to see if the `listener` has already been added. Multiple calls passing the same combination of `eventName` and `listener` will result in the `listener` being added, and called, multiple times. ``` server.prependListener('connection', (stream) => { console.log('someone connected!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. * **@since** v6.0.0 *** #### Parameters * ##### eventName: string | symbol The name of the event. * ##### listener: (...args) => void The callback function #### Returns this ### [**](#prependOnceListener)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L947)inheritedprependOnceListener * ****prependOnceListener**\(eventName, listener): this - Inherited from events.EventEmitter.prependOnceListener Adds a **one-time**`listener` function for the event named `eventName` to the *beginning* of the listeners array. The next time `eventName` is triggered, this listener is removed, and then invoked. ``` server.prependOnceListener('connection', (stream) => { console.log('Ah, we have our first user!'); }); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. * **@since** v6.0.0 *** #### Parameters * ##### eventName: string | symbol The name of the event. * ##### listener: (...args) => void The callback function #### Returns this ### [**](#queryBuilder)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L424)queryBuilder * ****queryBuilder**\(): QueryBuilder\ - #### Returns QueryBuilder\ ### [**](#rawListeners)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L863)inheritedrawListeners * ****rawListeners**\(eventName): Function\[] - Inherited from events.EventEmitter.rawListeners Returns a copy of the array of listeners for the event named `eventName`, including any wrappers (such as those created by `.once()`). ``` import { EventEmitter } from 'node:events'; const emitter = new EventEmitter(); emitter.once('log', () => console.log('log once')); // Returns a new Array with a function `onceWrapper` which has a property // `listener` which contains the original listener bound above const listeners = emitter.rawListeners('log'); const logFnWrapper = listeners[0]; // Logs "log once" to the console and does not unbind the `once` event logFnWrapper.listener(); // Logs "log once" to the console and removes the listener logFnWrapper(); emitter.on('log', () => console.log('log persistently')); // Will return a new Array with a single function bound by `.on()` above const newListeners = emitter.rawListeners('log'); // Logs "log persistently" twice newListeners[0](); emitter.emit('log'); ``` * **@since** v9.4.0 *** #### Parameters * ##### eventName: string | symbol #### Returns Function\[] ### [**](#removeAllListeners)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L803)inheritedremoveAllListeners * ****removeAllListeners**(eventName): this - Inherited from events.EventEmitter.removeAllListeners Removes all listeners, or those of the specified `eventName`. It is bad practice to remove listeners added elsewhere in the code, particularly when the `EventEmitter` instance was created by some other component or module (e.g. sockets or file streams). Returns a reference to the `EventEmitter`, so that calls can be chained. * **@since** v0.1.26 *** #### Parameters * ##### optionaleventName: string | symbol #### Returns this ### [**](#removeListener)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L787)inheritedremoveListener * ****removeListener**\(eventName, listener): this - Inherited from events.EventEmitter.removeListener Removes the specified `listener` from the listener array for the event named `eventName`. ``` const callback = (stream) => { console.log('someone connected!'); }; server.on('connection', callback); // ... server.removeListener('connection', callback); ``` `removeListener()` will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified `eventName`, then `removeListener()` must be called multiple times to remove each instance. Once an event is emitted, all listeners attached to it at the time of emitting are called in order. This implies that any `removeListener()` or `removeAllListeners()` calls *after* emitting and *before* the last listener finishes execution will not remove them from`emit()` in progress. Subsequent events behave as expected. ``` import { EventEmitter } from 'node:events'; class MyEmitter extends EventEmitter {} const myEmitter = new MyEmitter(); const callbackA = () => { console.log('A'); myEmitter.removeListener('event', callbackB); }; const callbackB = () => { console.log('B'); }; myEmitter.on('event', callbackA); myEmitter.on('event', callbackB); // callbackA removes listener callbackB but it will still be called. // Internal listener array at time of emit [callbackA, callbackB] myEmitter.emit('event'); // Prints: // A // B // callbackB is now removed. // Internal listener array [callbackA] myEmitter.emit('event'); // Prints: // A ``` Because listeners are managed using an internal array, calling this will change the position indices of any listener registered *after* the listener being removed. This will not impact the order in which listeners are called, but it means that any copies of the listener array as returned by the `emitter.listeners()` method will need to be recreated. When a single function has been added as a handler multiple times for a single event (as in the example below), `removeListener()` will remove the most recently added instance. In the example the `once('ping')` listener is removed: ``` import { EventEmitter } from 'node:events'; const ee = new EventEmitter(); function pong() { console.log('pong'); } ee.on('ping', pong); ee.once('ping', pong); ee.removeListener('ping', pong); ee.emit('ping'); ee.emit('ping'); ``` Returns a reference to the `EventEmitter`, so that calls can be chained. * **@since** v0.1.26 *** #### Parameters * ##### eventName: string | symbol * ##### listener: (...args) => void #### Returns this ### [**](#returning)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1106)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1110)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1121)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1135)inheritedreturning * ****returning**(column, options): QueryBuilder\\[]> * ****returning**\(column, options): QueryBuilder\ * ****returning**\(columns, options): QueryBuilder\ * ****returning**\(column, options): QueryBuilder\ - Inherited from Knex.QueryInterface.returning #### Parameters * ##### column: \* * ##### optionaloptions: DMLOptions #### Returns QueryBuilder\\[]> ### [**](#setMaxListeners)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/events.d.ts#L813)inheritedsetMaxListeners * ****setMaxListeners**(n): this - Inherited from events.EventEmitter.setMaxListeners By default `EventEmitter`s will print a warning if more than `10` listeners are added for a particular event. This is a useful default that helps finding memory leaks. The `emitter.setMaxListeners()` method allows the limit to be modified for this specific `EventEmitter` instance. The value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners. Returns a reference to the `EventEmitter`, so that calls can be chained. * **@since** v0.3.5 *** #### Parameters * ##### n: number #### Returns this ### [**](#transaction)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L402)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L403)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L407)transaction * ****transaction**(config): Promise\> * ****transaction**(transactionScope, config): Promise\> * ****transaction**\(transactionScope, config): Promise\ - #### Parameters * ##### optionalconfig: TransactionConfig #### Returns Promise\> ### [**](#transactionProvider)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L399)transactionProvider * ****transactionProvider**(config): TransactionProvider - #### Parameters * ##### optionalconfig: TransactionConfig #### Returns TransactionProvider ### [**](#truncate)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1221)inheritedtruncate * ****truncate**(): QueryBuilder\ - Inherited from Knex.QueryInterface.truncate #### Returns QueryBuilder\ ### [**](#update)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L996)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1010)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1024)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1028)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1034)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1039)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1053)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1067)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1081)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1095)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L1101)inheritedupdate * ****update**\(columnName, value, returning, options): QueryBuilder\ * ****update**\(columnName, value, returning, options): QueryBuilder\ * ****update**\(columnName, value): QueryBuilder\ * ****update**\(columnName, value, returning, options): QueryBuilder\ * ****update**(data, returning, options): QueryBuilder\\[]> * ****update**\(data, returning, options): QueryBuilder\ * ****update**\(data, returning, options): QueryBuilder\ * ****update**\(data, returning, options): QueryBuilder\ * ****update**\(data, returning, options): QueryBuilder\ * ****update**\(data): QueryBuilder\ * ****update**\(columnName, value): QueryBuilder\ - Inherited from Knex.QueryInterface.update #### Parameters * ##### columnName: K1 * ##### value: DbColumn\\[K1]> * ##### returning: K2 * ##### optionaloptions: DMLOptions #### Returns QueryBuilder\ ### [**](#upsert)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L911)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L920)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L936)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L952)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L968)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L984)inheritedupsert * ****upsert**(data, returning, options): QueryBuilder\\[]> * ****upsert**\(data, returning, options): QueryBuilder\ * ****upsert**\(data, returning, options): QueryBuilder\ * ****upsert**\(data, returning, options): QueryBuilder\ * ****upsert**\(data, returning, options): QueryBuilder\ * ****upsert**\(data): QueryBuilder\ - Inherited from Knex.QueryInterface.upsert #### Parameters * ##### data: TRecord extends CompositeTableType\, Partial\> ? ResolveTableType\, upsert> | readonly ResolveTableType\, upsert>\[] : DbRecordArr\ | readonly DbRecordArr\\[] * ##### returning: \* * ##### optionaloptions: DMLOptions #### Returns QueryBuilder\\[]> ### [**](#withUserParams)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L435)withUserParams * ****withUserParams**(params): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - #### Parameters * ##### params: Record\ #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ --- # Source: https://mikro-orm.io/api/libsql/class/LibSqlConnection.md # LibSqlConnection ### Hierarchy * [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) * *LibSqlConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new LibSqlConnection**(config, options, type): [LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md) - Inherited from BaseSqliteConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from BaseSqliteConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from BaseSqliteConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from BaseSqliteConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from BaseSqliteConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/libsql/src/LibSqlConnection.ts#L7)connect * ****connect**(): Promise\ - Overrides BaseSqliteConnection.connect Establishes connection to database *** #### Returns Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/libsql/src/LibSqlConnection.ts#L19)createKnex * ****createKnex**(): void - Overrides BaseSqliteConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from BaseSqliteConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from BaseSqliteConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L24)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from BaseSqliteConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L91)inheritedgetConnectionOptions * ****getConnectionOptions**(): [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - Inherited from BaseSqliteConnection.getConnectionOptions #### Returns [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L20)inheritedgetDefaultClientUrl * ****getDefaultClientUrl**(): string - Inherited from BaseSqliteConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from BaseSqliteConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from BaseSqliteConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from BaseSqliteConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L28)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from BaseSqliteConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from BaseSqliteConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from BaseSqliteConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from BaseSqliteConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from BaseSqliteConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/libsql/class/LibSqlDriver.md # LibSqlDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md)> * *LibSqlDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/libsql/src/LibSqlDriver.ts#L8)constructor * ****new LibSqlDriver**(config): [LibSqlDriver](https://mikro-orm.io/api/libsql/class/LibSqlDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [LibSqlDriver](https://mikro-orm.io/api/libsql/class/LibSqlDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[LibSqlDriver](https://mikro-orm.io/api/libsql/class/LibSqlDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L511)inheritednativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L720)inheritednativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[LibSqlConnection](https://mikro-orm.io/api/libsql/class/LibSqlConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/libsql/class/LibSqlExceptionConverter.md # LibSqlExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *LibSqlExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new LibSqlExceptionConverter**(): [LibSqlExceptionConverter](https://mikro-orm.io/api/libsql/class/LibSqlExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [LibSqlExceptionConverter](https://mikro-orm.io/api/libsql/class/LibSqlExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/libsql/src/LibSqlExceptionConverter.ts#L15)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@inheritDoc** * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/LibSqlKnexDialect.md # LibSqlKnexDialect ### Hierarchy * BetterSqlite3Dialect * *LibSqlKnexDialect* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**driverName](#driverName) ### Methods * [**\_driver](#_driver) * [**\_query](#_query) * [**acquireRawConnection](#acquireRawConnection) * [**tableCompiler](#tableCompiler) * [**validateConnection](#validateConnection) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new LibSqlKnexDialect**(): [LibSqlKnexDialect](https://mikro-orm.io/api/knex/class/LibSqlKnexDialect.md) - Inherited from MonkeyPatchable.BetterSqlite3Dialect.constructor #### Returns [LibSqlKnexDialect](https://mikro-orm.io/api/knex/class/LibSqlKnexDialect.md) ## Accessors[**](#Accessors) ### [**](#driverName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L6)driverName * **get driverName(): string - #### Returns string ## Methods[**](#Methods) ### [**](#_driver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L10)\_driver * ****\_driver**(): any - #### Returns any ### [**](#_query)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L14)\_query * ****\_query**(this, connection, obj): Promise\ - #### Parameters * ##### this: any * ##### connection: any * ##### obj: any #### Returns Promise\ ### [**](#acquireRawConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L38)acquireRawConnection * ****acquireRawConnection**(this): Promise\ - #### Parameters * ##### this: any #### Returns Promise\ ### [**](#tableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L47)tableCompiler * ****tableCompiler**(): any - #### Returns any ### [**](#validateConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L52)validateConnection * ****validateConnection**(connection): boolean - #### Parameters * ##### connection: any #### Returns boolean --- # Source: https://mikro-orm.io/api/libsql/class/LibSqlPlatform.md # LibSqlPlatform ### Hierarchy * [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) * *LibSqlPlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new LibSqlPlatform**(): [LibSqlPlatform](https://mikro-orm.io/api/libsql/class/LibSqlPlatform.md) - Inherited from BaseSqlitePlatform.constructor #### Returns [LibSqlPlatform](https://mikro-orm.io/api/libsql/class/LibSqlPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from BaseSqlitePlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from BaseSqlitePlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from BaseSqlitePlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from BaseSqlitePlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from BaseSqlitePlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from BaseSqlitePlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from BaseSqlitePlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from BaseSqlitePlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L73)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from BaseSqlitePlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from BaseSqlitePlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/libsql/src/LibSqlPlatform.ts#L12)escape * ****escape**(value): string - Overrides BaseSqlitePlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from BaseSqlitePlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from BaseSqlitePlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from BaseSqlitePlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L22)inheritedgetBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Inherited from BaseSqlitePlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L51)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L55)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from BaseSqlitePlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from BaseSqlitePlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L14)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from BaseSqlitePlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### length: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L18)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length: number } * ##### length: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from BaseSqlitePlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from BaseSqlitePlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from BaseSqlitePlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from BaseSqlitePlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from BaseSqlitePlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L99)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from BaseSqlitePlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from BaseSqlitePlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from BaseSqlitePlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from BaseSqlitePlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L26)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from BaseSqlitePlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from BaseSqlitePlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L47)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from BaseSqlitePlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L107)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(): string - Inherited from BaseSqlitePlatform.getFullTextWhereClause #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L91)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from BaseSqlitePlatform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L43)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L100)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from BaseSqlitePlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from BaseSqlitePlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from BaseSqlitePlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from BaseSqlitePlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from BaseSqlitePlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from BaseSqlitePlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from BaseSqlitePlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from BaseSqlitePlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from BaseSqlitePlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from BaseSqlitePlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from BaseSqlitePlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from BaseSqlitePlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L39)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from BaseSqlitePlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from BaseSqlitePlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from BaseSqlitePlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L35)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L59)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from BaseSqlitePlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from BaseSqlitePlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from BaseSqlitePlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from BaseSqlitePlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from BaseSqlitePlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from BaseSqlitePlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from BaseSqlitePlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from BaseSqlitePlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from BaseSqlitePlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L63)inheritednormalizeColumnType * ****normalizeColumnType**(type, options): string - Inherited from BaseSqlitePlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from BaseSqlitePlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from BaseSqlitePlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L83)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from BaseSqlitePlatform.processDateProperty This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. We use this method to convert Dates to timestamps when computing the changeset, so we have the right data type in the payload as well as in original entity data. Without that, we would end up with diffs including all Date properties, as we would be comparing Date object with timestamp. *** #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from BaseSqlitePlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L119)inheritedquoteValue * ****quoteValue**(value): string - Inherited from BaseSqlitePlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L111)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from BaseSqlitePlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from BaseSqlitePlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from BaseSqlitePlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from BaseSqlitePlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from BaseSqlitePlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L103)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from BaseSqlitePlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from BaseSqlitePlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from BaseSqlitePlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from BaseSqlitePlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)inheritedsupportsSchemas * ****supportsSchemas**(): boolean - Inherited from BaseSqlitePlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from BaseSqlitePlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from BaseSqlitePlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from BaseSqlitePlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from BaseSqlitePlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from BaseSqlitePlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from BaseSqlitePlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L6)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from BaseSqlitePlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from BaseSqlitePlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from BaseSqlitePlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from BaseSqlitePlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from BaseSqlitePlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L10)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from BaseSqlitePlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from BaseSqlitePlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/libsql/class/LibSqlSchemaHelper.md # LibSqlSchemaHelper ### Hierarchy * [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) * *LibSqlSchemaHelper* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**isImplicitIndex](#isImplicitIndex) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new LibSqlSchemaHelper**(platform): [LibSqlSchemaHelper](https://mikro-orm.io/api/libsql/class/LibSqlSchemaHelper.md) - Inherited from BaseSqliteSchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [LibSqlSchemaHelper](https://mikro-orm.io/api/libsql/class/LibSqlSchemaHelper.md) ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from BaseSqliteSchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from BaseSqliteSchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from BaseSqliteSchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from BaseSqliteSchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from BaseSqliteSchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from BaseSqliteSchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from BaseSqliteSchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from BaseSqliteSchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from BaseSqliteSchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L174)inheritedcreateTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Inherited from BaseSqliteSchemaHelper.createTableColumn #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L196)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from BaseSqliteSchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L8)inheriteddisableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Inherited from BaseSqliteSchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from BaseSqliteSchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L12)inheritedenableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Inherited from BaseSqliteSchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from BaseSqliteSchemaHelper.finalizeTable #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from BaseSqliteSchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from BaseSqliteSchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L209)inheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from BaseSqliteSchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L236)inheritedgetChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Inherited from BaseSqliteSchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L161)inheritedgetChecks * ****getChecks**(connection, tableName, schemaName): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Inherited from BaseSqliteSchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L67)inheritedgetColumns * ****getColumns**(connection, tableName, schemaName): Promise\ - Inherited from BaseSqliteSchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L192)inheritedgetCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from BaseSqliteSchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from BaseSqliteSchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)inheritedgetDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from BaseSqliteSchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from BaseSqliteSchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L34)inheritedgetDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Inherited from BaseSqliteSchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L25)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from BaseSqliteSchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from BaseSqliteSchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L105)inheritedgetEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from BaseSqliteSchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### schemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from BaseSqliteSchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L166)inheritedgetForeignKeysSQL * ****getForeignKeysSQL**(tableName): string - Inherited from BaseSqliteSchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L131)inheritedgetIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Inherited from BaseSqliteSchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L20)inheritedgetListTablesSQL * ****getListTablesSQL**(): string - Inherited from BaseSqliteSchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L188)inheritedgetManagementDbName * ****getManagementDbName**(): string - Inherited from BaseSqliteSchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)inheritedgetNamespaces * ****getNamespaces**(connection): Promise\ - Inherited from BaseSqliteSchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)inheritedgetPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Inherited from BaseSqliteSchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L224)inheritedgetPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Inherited from BaseSqliteSchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L124)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from BaseSqliteSchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from BaseSqliteSchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L119)inheritedgetRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - Inherited from BaseSqliteSchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L151)inheritedgetRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Inherited from BaseSqliteSchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L20)inheritedgetSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Inherited from BaseSqliteSchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from BaseSqliteSchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from BaseSqliteSchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from BaseSqliteSchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inheritedinferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Inherited from BaseSqliteSchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#isImplicitIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L204)inheritedisImplicitIndex * ****isImplicitIndex**(name): boolean - Inherited from BaseSqliteSchemaHelper.isImplicitIndex Implicit indexes will be ignored when diffing *** #### Parameters * ##### name: string #### Returns boolean ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L102)inheritedloadInformationSchema * ****loadInformationSchema**(schema, connection, tables, schemas): Promise\ - Inherited from BaseSqliteSchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalschemas: string\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L170)inheritedmapForeignKeys * ****mapForeignKeys**(fks, tableName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from BaseSqliteSchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L297)inheritednormalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length, defaultValues): string | number - Inherited from BaseSqliteSchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### optionallength: number * ##### defaultValues: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ = {} #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from BaseSqliteSchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from BaseSqliteSchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L16)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from BaseSqliteSchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/core/interface/LoadCountOptions.md # LoadCountOptions \ ### Hierarchy * [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ * *LoadCountOptions* ## Index[**](#Index) ### Properties * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**ctx](#ctx) * [**filters](#filters) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**where](#where) ## Properties[**](#Properties) ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L248)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from CountOptions.cache ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L258)optionalinheritedcomments **comments? : string | string\[] Inherited from CountOptions.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L253)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from CountOptions.connectionType ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L252)optionalinheritedctx **ctx? : any Inherited from CountOptions.ctx ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L244)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from CountOptions.filters ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L254)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from CountOptions.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L246)optionalinheritedgroupBy **groupBy? : string | readonly string\[] Inherited from CountOptions.groupBy ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L247)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from CountOptions.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L260)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from CountOptions.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L256)optionalinheritedindexHint **indexHint? : string Inherited from CountOptions.indexHint sql only ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L261)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from CountOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L262)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from CountOptions.logging ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L249)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from CountOptions.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L251)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from CountOptions.populateFilter ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L250)optionalinheritedpopulateWhere **populateWhere? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ | [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all Inherited from CountOptions.populateWhere ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L503)optionalrefresh **refresh? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L245)optionalinheritedschema **schema? : string Inherited from CountOptions.schema ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L504)optionalwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ --- # Source: https://mikro-orm.io/api/core/interface/LoadHint.md # LoadHint \ ### Hierarchy * *LoadHint* * [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md) ## Index[**](#Index) ### Properties * [**exclude](#exclude) * [**fields](#fields) * [**populate](#populate) ## Properties[**](#Properties) ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ --- # Source: https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md # LoadReferenceOptions \ ### Hierarchy * [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ * *LoadReferenceOptions* ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**dataloader](#dataloader) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**lockVersion](#lockVersion) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | { endCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOneOptions.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | { startCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOneOptions.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from FindOneOptions.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from FindOneOptions.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from FindOneOptions.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from FindOneOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalinheritedctx **ctx? : any Inherited from FindOneOptions.ctx ### [**](#dataloader)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L302)optionaldataloader **dataloader? : boolean ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from FindOneOptions.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOneOptions.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOneOptions.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from FindOneOptions.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from FindOneOptions.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from FindOneOptions.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from FindOneOptions.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from FindOneOptions.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from FindOneOptions.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from FindOneOptions.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from FindOneOptions.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from FindOneOptions.last Fetch `last` N items. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L209)optionalinheritedlockMode **lockMode? : [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) Inherited from FindOneOptions.lockMode ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from FindOneOptions.lockTableAliases sql only ### [**](#lockVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L210)optionalinheritedlockVersion **lockVersion? : number | Date Inherited from FindOneOptions.lockVersion ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from FindOneOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from FindOneOptions.logging ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionalinheritedoffset **offset? : number Inherited from FindOneOptions.offset Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOneOptions.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from FindOneOptions.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from FindOneOptions.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOneOptions.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOneOptions.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOneOptions.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from FindOneOptions.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from FindOneOptions.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from FindOneOptions.strategy sql only --- # Source: https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md # LoadReferenceOrFailOptions \ ### Hierarchy * [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md)\ * *LoadReferenceOrFailOptions* ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**dataloader](#dataloader) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**failHandler](#failHandler) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**lockVersion](#lockVersion) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**strategy](#strategy) * [**strict](#strict) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | { endCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOneOrFailOptions.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | { startCursor: null | string } | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ Inherited from FindOneOrFailOptions.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from FindOneOrFailOptions.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from FindOneOrFailOptions.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from FindOneOrFailOptions.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from FindOneOrFailOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L190)optionalinheritedctx **ctx? : any Inherited from FindOneOrFailOptions.ctx ### [**](#dataloader)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L306)optionaldataloader **dataloader? : boolean ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from FindOneOrFailOptions.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOneOrFailOptions.exclude ### [**](#failHandler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L214)optionalinheritedfailHandler **failHandler? : (entityName, where) => Error Inherited from FindOneOrFailOptions.failHandler #### Type declaration * * **(entityName, where): Error - #### Parameters * ##### entityName: string * ##### where: any #### Returns Error ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from FindOneOrFailOptions.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from FindOneOrFailOptions.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from FindOneOrFailOptions.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from FindOneOrFailOptions.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from FindOneOrFailOptions.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from FindOneOrFailOptions.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from FindOneOrFailOptions.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from FindOneOrFailOptions.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from FindOneOrFailOptions.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from FindOneOrFailOptions.last Fetch `last` N items. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L209)optionalinheritedlockMode **lockMode? : [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) Inherited from FindOneOrFailOptions.lockMode ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from FindOneOrFailOptions.lockTableAliases sql only ### [**](#lockVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L210)optionalinheritedlockVersion **lockVersion? : number | Date Inherited from FindOneOrFailOptions.lockVersion ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from FindOneOrFailOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from FindOneOrFailOptions.logging ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionalinheritedoffset **offset? : number Inherited from FindOneOrFailOptions.offset Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOneOrFailOptions.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from FindOneOrFailOptions.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from FindOneOrFailOptions.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOneOrFailOptions.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOneOrFailOptions.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOneOrFailOptions.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from FindOneOrFailOptions.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from FindOneOrFailOptions.schema ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from FindOneOrFailOptions.strategy sql only ### [**](#strict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L215)optionalinheritedstrict **strict? : boolean Inherited from FindOneOrFailOptions.strict --- # Source: https://mikro-orm.io/api/core/enum/LoadStrategy.md # LoadStrategy ## Index[**](#Index) ### Enumeration Members * [**BALANCED](#BALANCED) * [**JOINED](#JOINED) * [**SELECT\_IN](#SELECT_IN) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#BALANCED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L146)BALANCED **BALANCED: balanced ### [**](#JOINED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L145)JOINED **JOINED: joined ### [**](#SELECT_IN)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L144)SELECT\_IN **SELECT\_IN: select-in --- # Source: https://mikro-orm.io/api/core/interface/LoadedCollection.md # LoadedCollection \ ### Hierarchy * [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ * *LoadedCollection* ## Index[**](#Index) ### Properties * [**$](#$) * [**owner](#owner) ### Accessors * [**length](#length) ### Methods * [**\[iterator\]](#\[iterator]) * [**add](#add) * [**contains](#contains) * [**count](#count) * [**exists](#exists) * [**filter](#filter) * [**find](#find) * [**get](#get) * [**getIdentifiers](#getIdentifiers) * [**getItems](#getItems) * [**indexBy](#indexBy) * [**init](#init) * [**isDirty](#isDirty) * [**isEmpty](#isEmpty) * [**isInitialized](#isInitialized) * [**isPartial](#isPartial) * [**load](#load) * [**loadCount](#loadCount) * [**loadItems](#loadItems) * [**map](#map) * [**matching](#matching) * [**populated](#populated) * [**reduce](#reduce) * [**remove](#remove) * [**removeAll](#removeAll) * [**set](#set) * [**setDirty](#setDirty) * [**shouldPopulate](#shouldPopulate) * [**slice](#slice) * [**toArray](#toArray) * [**toJSON](#toJSON) ## Properties[**](#Properties) ### [**](#$)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1274)$ **$: [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ ### [**](#owner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L19)readonlyinheritedowner **owner: object Inherited from Collection.owner ## Accessors[**](#Accessors) ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L367)inheritedlength * **get length(): number - Inherited from Collection.length #### Returns number ## Methods[**](#Methods) ### [**](#\[iterator])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L371)inherited\[iterator] * ****\[iterator]**(): IterableIterator\ - Inherited from Collection.\[iterator] #### Returns IterableIterator\ ### [**](#add)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L162)inheritedadd * ****add**\(entity, ...entities): void - Inherited from Collection.add #### Parameters * ##### entity: TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> * ##### rest...entities: (TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\)\[] #### Returns void ### [**](#contains)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L196)inheritedcontains * ****contains**\(item, check): boolean - Inherited from Collection.contains #### Parameters * ##### item: TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ * ##### check: boolean = true #### Returns boolean ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L204)inheritedcount * ****count**(): number - Inherited from Collection.count #### Returns number ### [**](#exists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L225)inheritedexists * ****exists**(cb): boolean - Inherited from Collection.exists Tests for the existence of an element that satisfies the given predicate. *** #### Parameters * ##### cb: (item) => boolean #### Returns boolean ### [**](#filter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L241)inheritedfilter * ****filter**(cb): T\[] - Inherited from Collection.filter Extracts a subset of the collection items. *** #### Parameters * ##### cb: (item, index) => boolean #### Returns T\[] ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L233)inheritedfind * ****find**(cb): undefined | T - Inherited from Collection.find Returns the first element of this collection that satisfies the predicate. *** #### Parameters * ##### cb: (item, index) => boolean #### Returns undefined | T ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1275)get * ****get**(): [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ - #### Returns [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ ### [**](#getIdentifiers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L51)inheritedgetIdentifiers * ****getIdentifiers**\(field): U\[] - Inherited from Collection.getIdentifiers #### Parameters * ##### optionalfield: string | string\[] #### Returns U\[] ### [**](#getItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1276)getItems * ****getItems**(check): T\[] - Overrides Collection.getItems Returns the items (the collection must be initialized) *** #### Parameters * ##### optionalcheck: boolean #### Returns T\[] ### [**](#indexBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L258)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L263)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L268)inheritedindexBy * ****indexBy**\(key): Record\ * ****indexBy**\(key, valueKey): Record\ - Inherited from Collection.indexBy Maps the collection items to a dictionary, indexed by the key you specify. If there are more items with the same key, only the first one will be present. *** #### Parameters * ##### key: K1 #### Returns Record\ ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L289)inheritedinit * ****init**\(options): Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> - Inherited from Collection.init #### Parameters * ##### options: [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\ = {} #### Returns Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> ### [**](#isDirty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L351)inheritedisDirty * ****isDirty**(): boolean - Inherited from Collection.isDirty #### Returns boolean ### [**](#isEmpty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L209)inheritedisEmpty * ****isEmpty**(): boolean - Inherited from Collection.isEmpty #### Returns boolean ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L337)inheritedisInitialized * ****isInitialized**(fully): boolean - Inherited from Collection.isInitialized #### Parameters * ##### fully: boolean = false #### Returns boolean ### [**](#isPartial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L355)inheritedisPartial * ****isPartial**(): boolean - Inherited from Collection.isPartial #### Returns boolean ### [**](#load)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L62)inheritedload * ****load**\(options): Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> - Inherited from Collection.load Ensures the collection is loaded first (without reloading it if it already is loaded). Returns the Collection instance (itself), works the same as `Reference.load()`. *** #### Parameters * ##### options: [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\ = {} #### Returns Promise<[LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> ### [**](#loadCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L95)inheritedloadCount * ****loadCount**(options): Promise\ - Inherited from Collection.loadCount Gets the count of collection items from database instead of counting loaded items. The value is cached (unless you use the `where` option), use `refresh: true` to force reload it. *** #### Parameters * ##### options: boolean | [LoadCountOptions](https://mikro-orm.io/api/core/interface/LoadCountOptions.md)\ = {} #### Returns Promise\ ### [**](#loadItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L86)inheritedloadItems * ****loadItems**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Inherited from Collection.loadItems Initializes the collection and returns the items *** #### Parameters * ##### optionaloptions: [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#map)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L249)inheritedmap * ****map**\(mapper): R\[] - Inherited from Collection.map Maps the collection items based on your provided mapper function. *** #### Parameters * ##### mapper: (item, index) => R #### Returns R\[] ### [**](#matching)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L119)inheritedmatching * ****matching**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Inherited from Collection.matching #### Parameters * ##### options: [MatchingOptions](https://mikro-orm.io/api/core/interface/MatchingOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L285)inheritedpopulated * ****populated**(populated): void - Inherited from Collection.populated #### Parameters * ##### populated: undefined | boolean = true #### Returns void ### [**](#reduce)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L300)inheritedreduce * ****reduce**\(cb, initial): R - Inherited from Collection.reduce Maps the collection items based on your provided mapper function to a single object. *** #### Parameters * ##### cb: (obj, item, index) => R * ##### initial: R = ... #### Returns R ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L173)inheritedremove * ****remove**\(entity, ...entities): void - Inherited from Collection.remove Remove specified item(s) from the collection. Note that removing item from collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. *** #### Parameters * ##### entity: TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Iterable\, any, any> | (item) => boolean * ##### rest...entities: (TT | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\)\[] #### Returns void ### [**](#removeAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L187)inheritedremoveAll * ****removeAll**(): void - Inherited from Collection.removeAll Remove all items from the collection. Note that removing items from collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. *** #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L105)inheritedset * ****set**(items): void - Inherited from Collection.set #### Parameters * ##### items: Iterable\, any, any> #### Returns void ### [**](#setDirty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L363)inheritedsetDirty * ****setDirty**(dirty): void - Inherited from Collection.setDirty #### Parameters * ##### dirty: boolean = true #### Returns void ### [**](#shouldPopulate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L273)inheritedshouldPopulate * ****shouldPopulate**(populated): boolean - Inherited from Collection.shouldPopulate #### Parameters * ##### optionalpopulated: boolean #### Returns boolean ### [**](#slice)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L217)inheritedslice * ****slice**(start, end): T\[] - Inherited from Collection.slice Extracts a slice of the collection items starting at position start to end (exclusive) of the collection. If end is null it returns all elements from start to the end of the collection. *** #### Parameters * ##### optionalstart: number * ##### optionalend: number #### Returns T\[] ### [**](#toArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L36)inheritedtoArray * ****toArray**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] - Inherited from Collection.toArray #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L154)inheritedtoJSON * ****toJSON**\(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] - Inherited from Collection.toJSON #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\\[] --- # Source: https://mikro-orm.io/api/core/interface/LoadedReference.md # LoadedReference \ ### Hierarchy * [Reference](https://mikro-orm.io/api/core/class/Reference.md)\> * *LoadedReference* ## Index[**](#Index) ### Properties * [**$](#$) ### Methods * [**get](#get) * [**getEntity](#getEntity) * [**getProperty](#getProperty) * [**isInitialized](#isInitialized) * [**load](#load) * [**loadOrFail](#loadOrFail) * [**loadProperty](#loadProperty) * [**populated](#populated) * [**toJSON](#toJSON) * [**unwrap](#unwrap) ## Properties[**](#Properties) ### [**](#$)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1264)$ **$: NonNullable\ ## Methods[**](#Methods) ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1265)get * ****get**(): NonNullable\ - #### Returns NonNullable\ ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L169)inheritedgetEntity * ****getEntity**(): NonNullable\ - Inherited from Reference.getEntity #### Returns NonNullable\ ### [**](#getProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L177)inheritedgetProperty * ****getProperty**\(prop): NonNullable\\[K] - Inherited from Reference.getProperty #### Parameters * ##### prop: K #### Returns NonNullable\\[K] ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L186)inheritedisInitialized * ****isInitialized**(): boolean - Inherited from Reference.isInitialized #### Returns boolean ### [**](#load)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L117)inheritedload * ****load**\(options): Promise\> - Inherited from Reference.load Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity. If the entity is not found in the database (e.g. it was deleted in the meantime, or currently active filters disallow loading of it) the method returns `null`. Use `loadOrFail()` if you want an error to be thrown in such a case. *** #### Parameters * ##### options: [LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md)\ = {} #### Returns Promise\> ### [**](#loadOrFail)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L146)inheritedloadOrFail * ****loadOrFail**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - Inherited from Reference.loadOrFail Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). *** #### Parameters * ##### options: [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md)\ = {} #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#loadProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L181)inheritedloadProperty * ****loadProperty**\(prop, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[K]> - Inherited from Reference.loadProperty #### Parameters * ##### prop: K * ##### optionaloptions: [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[K]> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L190)inheritedpopulated * ****populated**(populated): void - Inherited from Reference.populated #### Parameters * ##### optionalpopulated: boolean #### Returns void ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L194)inheritedtoJSON * ****toJSON**(...args): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from Reference.toJSON #### Parameters * ##### rest...args: any\[] #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#unwrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L165)inheritedunwrap * ****unwrap**(): NonNullable\ - Inherited from Reference.unwrap #### Returns NonNullable\ --- # Source: https://mikro-orm.io/api/core/enum/LockMode.md # LockMode ## Index[**](#Index) ### Enumeration Members * [**NONE](#NONE) * [**OPTIMISTIC](#OPTIMISTIC) * [**PESSIMISTIC\_PARTIAL\_READ](#PESSIMISTIC_PARTIAL_READ) * [**PESSIMISTIC\_PARTIAL\_WRITE](#PESSIMISTIC_PARTIAL_WRITE) * [**PESSIMISTIC\_READ](#PESSIMISTIC_READ) * [**PESSIMISTIC\_READ\_OR\_FAIL](#PESSIMISTIC_READ_OR_FAIL) * [**PESSIMISTIC\_WRITE](#PESSIMISTIC_WRITE) * [**PESSIMISTIC\_WRITE\_OR\_FAIL](#PESSIMISTIC_WRITE_OR_FAIL) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#NONE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L157)NONE **NONE: 0 ### [**](#OPTIMISTIC)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L158)OPTIMISTIC **OPTIMISTIC: 1 ### [**](#PESSIMISTIC_PARTIAL_READ)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L163)PESSIMISTIC\_PARTIAL\_READ **PESSIMISTIC\_PARTIAL\_READ: 6 ### [**](#PESSIMISTIC_PARTIAL_WRITE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L161)PESSIMISTIC\_PARTIAL\_WRITE **PESSIMISTIC\_PARTIAL\_WRITE: 4 ### [**](#PESSIMISTIC_READ)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L159)PESSIMISTIC\_READ **PESSIMISTIC\_READ: 2 ### [**](#PESSIMISTIC_READ_OR_FAIL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L164)PESSIMISTIC\_READ\_OR\_FAIL **PESSIMISTIC\_READ\_OR\_FAIL: 7 ### [**](#PESSIMISTIC_WRITE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L160)PESSIMISTIC\_WRITE **PESSIMISTIC\_WRITE: 3 ### [**](#PESSIMISTIC_WRITE_OR_FAIL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L162)PESSIMISTIC\_WRITE\_OR\_FAIL **PESSIMISTIC\_WRITE\_OR\_FAIL: 5 --- # Source: https://mikro-orm.io/api/core/interface/LockOptions.md # LockOptions ### Hierarchy * [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) * *LockOptions* ## Index[**](#Index) ### Properties * [**ctx](#ctx) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**lockVersion](#lockVersion) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L289)optionalinheritedctx **ctx? : any Inherited from DriverMethodOptions.ctx ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L282)optionallockMode **lockMode? : [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L284)optionallockTableAliases **lockTableAliases? : string\[] ### [**](#lockVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L283)optionallockVersion **lockVersion? : number | Date ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L291)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from DriverMethodOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L285)optionallogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L290)optionalinheritedschema **schema? : string Inherited from DriverMethodOptions.schema --- # Source: https://mikro-orm.io/api/core/class/LockWaitTimeoutException.md # LockWaitTimeoutException Exception for a lock wait timeout error of a transaction detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *LockWaitTimeoutException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new LockWaitTimeoutException**(previous): [LockWaitTimeoutException](https://mikro-orm.io/api/core/class/LockWaitTimeoutException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [LockWaitTimeoutException](https://mikro-orm.io/api/core/class/LockWaitTimeoutException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/LogContext.md # LogContext ### Hierarchy * [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) * *LogContext* ## Index[**](#Index) ### Properties * [**affected](#affected) * [**connection](#connection) * [**debugMode](#debugMode) * [**enabled](#enabled) * [**label](#label) * [**level](#level) * [**params](#params) * [**query](#query) * [**results](#results) * [**took](#took) ## Properties[**](#Properties) ### [**](#affected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L42)optionalaffected **affected? : number ### [**](#connection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L46)optionalconnection **connection? : { name? : string; type? : string } #### Type declaration * ##### optionalname?: string * ##### optionaltype?: string ### [**](#debugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L45)optionaldebugMode **debugMode? : [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] ### [**](#enabled)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L44)optionalenabled **enabled? : boolean ### [**](#label)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L38)optionallabel **label? : string ### [**](#level)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L43)optionallevel **level? : info | warning | error ### [**](#params)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L39)optionalparams **params? : unknown\[] ### [**](#query)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L37)optionalquery **query? : string ### [**](#results)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L41)optionalresults **results? : number ### [**](#took)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L40)optionaltook **took? : number --- # Source: https://mikro-orm.io/api/core/interface/Logger.md # Logger ### Implemented by * [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) ## Index[**](#Index) ### Methods * [**error](#error) * [**isEnabled](#isEnabled) * [**log](#log) * [**logQuery](#logQuery) * [**setDebugMode](#setDebugMode) * [**warn](#warn) ## Methods[**](#Methods) ### [**](#error)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L13)error * ****error**(namespace, message, context): void - Logs error message inside given namespace. *** #### Parameters * ##### namespace: [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#isEnabled)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L30)isEnabled * ****isEnabled**(namespace, context): boolean - #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns boolean ### [**](#log)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L8)log * ****log**(namespace, message, context): void - Logs a message inside given namespace. *** #### Parameters * ##### namespace: [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#logQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L23)logQuery * ****logQuery**(context): void - Logs a message inside given namespace. *** #### Parameters * ##### context: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#setDebugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L28)setDebugMode * ****setDebugMode**(debugMode): void - Sets active namespaces. Pass `true` to enable all logging. *** #### Parameters * ##### debugMode: boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] #### Returns void ### [**](#warn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L18)warn * ****warn**(namespace, message, context): void - Logs warning message inside given namespace. *** #### Parameters * ##### namespace: [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/LoggerOptions.md # LoggerOptions ## Index[**](#Index) ### Properties * [**debugMode](#debugMode) * [**highlighter](#highlighter) * [**ignoreDeprecations](#ignoreDeprecations) * [**usesReplicas](#usesReplicas) * [**writer](#writer) ## Properties[**](#Properties) ### [**](#debugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L54)optionaldebugMode **debugMode? : boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] ### [**](#highlighter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L56)optionalhighlighter **highlighter? : [Highlighter](https://mikro-orm.io/api/core/interface/Highlighter.md) ### [**](#ignoreDeprecations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L55)optionalignoreDeprecations **ignoreDeprecations? : boolean | string\[] ### [**](#usesReplicas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L57)optionalusesReplicas **usesReplicas? : boolean ### [**](#writer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L53)writer **writer: (message) => void #### Type declaration * * **(message): void - #### Parameters * ##### message: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/ManyToMany.md # ManyToMany ### Callable * ****ManyToMany**\(entity, mappedBy, options): (target, propertyName) => any *** * #### Parameters * ##### optionalentity: string | [ManyToManyOptions](https://mikro-orm.io/api/core/interface/ManyToManyOptions.md)\ | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### optionalmappedBy: (string & keyof T) | (e) => any * ##### options: Partial<[ManyToManyOptions](https://mikro-orm.io/api/core/interface/ManyToManyOptions.md)\> = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/ManyToManyOptions.md # ManyToManyOptions \ ### Hierarchy * [ReferenceOptions](https://mikro-orm.io/api/core/interface/ReferenceOptions.md)\ * *ManyToManyOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**createForeignKeyConstraint](#createForeignKeyConstraint) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**deleteRule](#deleteRule) * [**eager](#eager) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**fixedOrder](#fixedOrder) * [**fixedOrderColumn](#fixedOrderColumn) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**inversedBy](#inversedBy) * [**inverseJoinColumn](#inverseJoinColumn) * [**inverseJoinColumns](#inverseJoinColumns) * [**joinColumn](#joinColumn) * [**joinColumns](#joinColumns) * [**lazy](#lazy) * [**length](#length) * [**mappedBy](#mappedBy) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**orderBy](#orderBy) * [**owner](#owner) * [**persist](#persist) * [**pivotEntity](#pivotEntity) * [**pivotTable](#pivotTable) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**referenceColumnName](#referenceColumnName) * [**referencedColumnNames](#referencedColumnNames) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**updateRule](#updateRule) * [**version](#version) * [**where](#where) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof Owner Inherited from ReferenceOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from ReferenceOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L336)optionalinheritedcascade **cascade? : [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md)\[] Inherited from ReferenceOptions.cascade Set what actions on owning entity should be cascaded to the relationship. Defaults to \[Cascade.PERSIST, Cascade.MERGE] (see [cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from ReferenceOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from ReferenceOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from ReferenceOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from ReferenceOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from ReferenceOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#createForeignKeyConstraint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L76)optionalcreateForeignKeyConstraint **createForeignKeyConstraint? : boolean Enable/disable foreign key constraint creation on this relation ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from ReferenceOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from ReferenceOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from ReferenceOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#deleteRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L70)optionaldeleteRule **deleteRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default What to do when the target entity gets deleted. ### [**](#eager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L339)optionalinheritedeager **eager? : boolean Inherited from ReferenceOptions.eager Always load the relationship. Discouraged for use with to-many relations for performance reasons. ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L333)optionalinheritedentity **entity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ Inherited from ReferenceOptions.entity Set target entity type. ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from ReferenceOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from ReferenceOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from ReferenceOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L345)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from ReferenceOptions.filters Control filter parameters for the relation. This will serve as a default value when processing filters on this relation. It's value can be overridden via `em.fork()` or `FindOptions`. ### [**](#fixedOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L40)optionalfixedOrder **fixedOrder? : boolean Force stable insertion order of items in the collection (see [Collections](https://mikro-orm.io/docs/collections.md)). ### [**](#fixedOrderColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L43)optionalfixedOrderColumn **fixedOrderColumn? : string Override default order column name (`id`) for fixed ordering. ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from ReferenceOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from ReferenceOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from ReferenceOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof Owner Inherited from ReferenceOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from ReferenceOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from ReferenceOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from ReferenceOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from ReferenceOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from ReferenceOptions.index Explicitly specify index on a property. ### [**](#inversedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L28)optionalinversedBy **inversedBy? : (string & keyof Target) | (e) => any Point to the inverse side property name. ### [**](#inverseJoinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L58)optionalinverseJoinColumn **inverseJoinColumn? : string Override the default database column name on the inverse side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#inverseJoinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L61)optionalinverseJoinColumns **inverseJoinColumns? : string\[] Override the default database column name on the inverse side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#joinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L52)optionaljoinColumn **joinColumn? : string Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#joinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L55)optionaljoinColumns **joinColumns? : string\[] Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from ReferenceOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from ReferenceOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#mappedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L31)optionalmappedBy **mappedBy? : (string & keyof Target) | (e) => any Point to the owning side property name. ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from ReferenceOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from ReferenceOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from ReferenceOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from ReferenceOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L37)optionalorderBy **orderBy? : [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\ | [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\\[] Set default ordering. ### [**](#owner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L25)optionalowner **owner? : boolean Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use `inversedBy` or `mappedBy` to distinguish owning and inverse side. ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from ReferenceOptions.persist Set false to define Property. ### [**](#pivotEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L49)optionalpivotEntity **pivotEntity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ Set pivot entity for this relation (see [Custom pivot table entity](https://mikro-orm.io/docs/collections.md#custom-pivot-table-entity)). ### [**](#pivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L46)optionalpivotTable **pivotTable? : string Override default name for pivot table (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from ReferenceOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from ReferenceOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from ReferenceOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L64)optionalreferenceColumnName **referenceColumnName? : string Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#referencedColumnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L67)optionalreferencedColumnNames **referencedColumnNames? : string\[] Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from ReferenceOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from ReferenceOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from ReferenceOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from ReferenceOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from ReferenceOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from ReferenceOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from ReferenceOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L342)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from ReferenceOptions.strategy Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from ReferenceOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from ReferenceOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from ReferenceOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from ReferenceOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#updateRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L73)optionalupdateRule **updateRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default What to do when the reference to the target entity gets updated. ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from ReferenceOptions.version Set to true to enable Locking via version field. (SQL only) ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L34)optionalwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ Condition for [Declarative partial loading](https://mikro-orm.io/docs/collections.md#declarative-partial-loading). --- # Source: https://mikro-orm.io/api/core/function/ManyToOne.md # ManyToOne ### Callable * ****ManyToOne**\(entity, options): (target, propertyName) => any *** * #### Parameters * ##### entity: string | [ManyToOneOptions](https://mikro-orm.io/api/core/interface/ManyToOneOptions.md)\ | (e) => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ = {} * ##### options: Partial<[ManyToOneOptions](https://mikro-orm.io/api/core/interface/ManyToOneOptions.md)\> = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/ManyToOneOptions.md # ManyToOneOptions \ ### Hierarchy * [ReferenceOptions](https://mikro-orm.io/api/core/interface/ReferenceOptions.md)\ * *ManyToOneOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**createForeignKeyConstraint](#createForeignKeyConstraint) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**deferMode](#deferMode) * [**deleteRule](#deleteRule) * [**eager](#eager) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**foreignKeyName](#foreignKeyName) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**inversedBy](#inversedBy) * [**joinColumn](#joinColumn) * [**joinColumns](#joinColumns) * [**lazy](#lazy) * [**length](#length) * [**mapToPk](#mapToPk) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**ownColumns](#ownColumns) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**referenceColumnName](#referenceColumnName) * [**referencedColumnNames](#referencedColumnNames) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**updateRule](#updateRule) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof Owner Inherited from ReferenceOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from ReferenceOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L336)optionalinheritedcascade **cascade? : [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md)\[] Inherited from ReferenceOptions.cascade Set what actions on owning entity should be cascaded to the relationship. Defaults to \[Cascade.PERSIST, Cascade.MERGE] (see [cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from ReferenceOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from ReferenceOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from ReferenceOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from ReferenceOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from ReferenceOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#createForeignKeyConstraint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L60)optionalcreateForeignKeyConstraint **createForeignKeyConstraint? : boolean Enable/disable foreign key constraint creation on this relation ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from ReferenceOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from ReferenceOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from ReferenceOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#deferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L57)optionaldeferMode **deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) | immediate | deferred Set the constraint type. Immediate constraints are checked for each statement, while deferred ones are only checked at the end of the transaction. Only for postgres unique constraints. ### [**](#deleteRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L51)optionaldeleteRule **deleteRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default What to do when the target entity gets deleted. ### [**](#eager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L339)optionalinheritedeager **eager? : boolean Inherited from ReferenceOptions.eager Always load the relationship. Discouraged for use with to-many relations for performance reasons. ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L333)optionalinheritedentity **entity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ Inherited from ReferenceOptions.entity Set target entity type. ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from ReferenceOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from ReferenceOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from ReferenceOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L345)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from ReferenceOptions.filters Control filter parameters for the relation. This will serve as a default value when processing filters on this relation. It's value can be overridden via `em.fork()` or `FindOptions`. ### [**](#foreignKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L63)optionalforeignKeyName **foreignKeyName? : string Set a custom foreign key constraint name, overriding NamingStrategy.indexName(). ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from ReferenceOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from ReferenceOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from ReferenceOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof Owner Inherited from ReferenceOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from ReferenceOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from ReferenceOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from ReferenceOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from ReferenceOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from ReferenceOptions.index Explicitly specify index on a property. ### [**](#inversedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L24)optionalinversedBy **inversedBy? : (string & keyof Target) | (e) => any Point to the inverse side property name. ### [**](#joinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L36)optionaljoinColumn **joinColumn? : string Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#joinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L39)optionaljoinColumns **joinColumns? : string\[] Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from ReferenceOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from ReferenceOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#mapToPk)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L33)optionalmapToPk **mapToPk? : boolean Map this relation to the primary key value instead of an entity. ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from ReferenceOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from ReferenceOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from ReferenceOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from ReferenceOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#ownColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L42)optionalownColumns **ownColumns? : string\[] When a part of a composite column is shared in other properties, use this option to specify what columns are considered as owned by this property. This is useful when your composite property is nullable, but parts of it are not. ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from ReferenceOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from ReferenceOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L30)optionalprimary **primary? : boolean Overrides ReferenceOptions.primary Use this relation as a primary key. ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L27)optionalref **ref? : boolean Overrides ReferenceOptions.ref Wrap the entity in [Reference](https://mikro-orm.io/api/core/class/Reference.md) wrapper. ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L45)optionalreferenceColumnName **referenceColumnName? : string Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#referencedColumnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L48)optionalreferencedColumnNames **referencedColumnNames? : string\[] Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from ReferenceOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from ReferenceOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from ReferenceOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from ReferenceOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from ReferenceOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from ReferenceOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from ReferenceOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L342)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from ReferenceOptions.strategy Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from ReferenceOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from ReferenceOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from ReferenceOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from ReferenceOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#updateRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L54)optionalupdateRule **updateRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default What to do when the reference to the target entity gets updated. ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from ReferenceOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md # MariaDbConnection ### Hierarchy * [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) * *MariaDbConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new MariaDbConnection**(config, options, type): [MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md) - Inherited from MySqlConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from MySqlConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from MySqlConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from MySqlConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from MySqlConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L42)inheritedconnect * ****connect**(): void | Promise\ - Inherited from MySqlConnection.connect Establishes connection to database *** #### Returns void | Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbConnection.ts#L6)createKnex * ****createKnex**(): void - Overrides MySqlConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from MySqlConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from MySqlConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L118)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from MySqlConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbConnection.ts#L11)getConnectionOptions * ****getConnectionOptions**(): MySqlConnectionConfig - Overrides MySqlConnection.getConnectionOptions #### Returns MySqlConnectionConfig ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlConnection.ts#L12)inheritedgetDefaultClientUrl * ****getDefaultClientUrl**(): string - Inherited from MySqlConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from MySqlConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from MySqlConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from MySqlConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L197)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from MySqlConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from MySqlConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from MySqlConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from MySqlConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from MySqlConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/mariadb/class/MariaDbDriver.md # MariaDbDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md), [MariaDbPlatform](https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md)> * *MariaDbDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbDriver.ts#L26)constructor * ****new MariaDbDriver**(config): [MariaDbDriver](https://mikro-orm.io/api/mariadb/class/MariaDbDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MariaDbDriver](https://mikro-orm.io/api/mariadb/class/MariaDbDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[MariaDbDriver](https://mikro-orm.io/api/mariadb/class/MariaDbDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [MariaDbPlatform](https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [MariaDbPlatform](https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbDriver.ts#L47)nativeInsertMany * ****nativeInsertMany**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbDriver.ts#L59)nativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/mariadb/class/MariaDbExceptionConverter.md # MariaDbExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *MariaDbExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MariaDbExceptionConverter**(): [MariaDbExceptionConverter](https://mikro-orm.io/api/mariadb/class/MariaDbExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [MariaDbExceptionConverter](https://mikro-orm.io/api/mariadb/class/MariaDbExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbExceptionConverter.ts#L15)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@link** * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/MariaDbKnexDialect.md # MariaDbKnexDialect ### Hierarchy * [MySqlKnexDialect](https://mikro-orm.io/api/knex/class/MySqlKnexDialect.md) * *MariaDbKnexDialect* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**driverName](#driverName) ### Methods * [**\_driver](#_driver) * [**columnCompiler](#columnCompiler) * [**queryCompiler](#queryCompiler) * [**validateConnection](#validateConnection) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MariaDbKnexDialect**(): [MariaDbKnexDialect](https://mikro-orm.io/api/knex/class/MariaDbKnexDialect.md) - Inherited from MySqlKnexDialect.constructor #### Returns [MariaDbKnexDialect](https://mikro-orm.io/api/knex/class/MariaDbKnexDialect.md) ## Accessors[**](#Accessors) ### [**](#driverName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MariaDbKnexDialect.ts#L5)driverName * **get driverName(): string - #### Returns string ## Methods[**](#Methods) ### [**](#_driver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MariaDbKnexDialect.ts#L9)\_driver * ****\_driver**(): any - #### Returns any ### [**](#columnCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlKnexDialect.ts#L12)inheritedcolumnCompiler * ****columnCompiler**(): any - Inherited from MySqlKnexDialect.columnCompiler #### Returns any ### [**](#queryCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlKnexDialect.ts#L7)inheritedqueryCompiler * ****queryCompiler**(): any - Inherited from MySqlKnexDialect.queryCompiler #### Returns any ### [**](#validateConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MariaDbKnexDialect.ts#L13)validateConnection * ****validateConnection**(connection): any - #### Parameters * ##### connection: any #### Returns any --- # Source: https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md # MariaDbPlatform ### Hierarchy * [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) * *MariaDbPlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MariaDbPlatform**(): [MariaDbPlatform](https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md) - Inherited from MySqlPlatform.constructor #### Returns [MariaDbPlatform](https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from MySqlPlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from MySqlPlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from MySqlPlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from MySqlPlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from MySqlPlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from MySqlPlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbPlatform.ts#L14)convertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Overrides MySqlPlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from MySqlPlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L388)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from MySqlPlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from MySqlPlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L81)inheritedescape * ****escape**(value): string - Inherited from MySqlPlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from MySqlPlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from MySqlPlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from MySqlPlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from MySqlPlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L32)inheritedgetBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Inherited from MySqlPlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from MySqlPlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L72)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from MySqlPlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L232)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from MySqlPlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from MySqlPlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L140)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from MySqlPlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L144)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from MySqlPlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from MySqlPlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbPlatform.ts#L10)getDefaultCharset * ****getDefaultCharset**(): string - Overrides MySqlPlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from MySqlPlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L86)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from MySqlPlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L121)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from MySqlPlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from MySqlPlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from MySqlPlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from MySqlPlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from MySqlPlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L248)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from MySqlPlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from MySqlPlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L256)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from MySqlPlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L133)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from MySqlPlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L129)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(): string - Inherited from MySqlPlatform.getFullTextWhereClause #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L106)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from MySqlPlatform.getIndexName Returns the default name of index for the given columns cannot go past 64 character length for identifiers in MySQL *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L212)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from MySqlPlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L60)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from MySqlPlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from MySqlPlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from MySqlPlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from MySqlPlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from MySqlPlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from MySqlPlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from MySqlPlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from MySqlPlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from MySqlPlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from MySqlPlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from MySqlPlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from MySqlPlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from MySqlPlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from MySqlPlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from MySqlPlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from MySqlPlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from MySqlPlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from MySqlPlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L224)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L236)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from MySqlPlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from MySqlPlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from MySqlPlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from MySqlPlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L94)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from MySqlPlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from MySqlPlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from MySqlPlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from MySqlPlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from MySqlPlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from MySqlPlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L76)inheritednormalizeColumnType * ****normalizeColumnType**(type, options): string - Inherited from MySqlPlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from MySqlPlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from MySqlPlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from MySqlPlatform.processDateProperty #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from MySqlPlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L65)inheritedquoteValue * ****quoteValue**(value): string - Inherited from MySqlPlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from MySqlPlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from MySqlPlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from MySqlPlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L125)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from MySqlPlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from MySqlPlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from MySqlPlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from MySqlPlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from MySqlPlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from MySqlPlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)inheritedsupportsSchemas * ****supportsSchemas**(): boolean - Inherited from MySqlPlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from MySqlPlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L98)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from MySqlPlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from MySqlPlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from MySqlPlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from MySqlPlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from MySqlPlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from MySqlPlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from MySqlPlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from MySqlPlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from MySqlPlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from MySqlPlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L65)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from MySqlPlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from MySqlPlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/mariadb/class/MariaDbSchemaHelper.md # MariaDbSchemaHelper ### Hierarchy * [MySqlSchemaHelper](https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md) * *MariaDbSchemaHelper* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**DEFAULT\_VALUES](#DEFAULT_VALUES) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAllChecks](#getAllChecks) * [**getAllColumns](#getAllColumns) * [**getAllEnumDefinitions](#getAllEnumDefinitions) * [**getAllForeignKeys](#getAllForeignKeys) * [**getAllIndexes](#getAllIndexes) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new MariaDbSchemaHelper**(platform): [MariaDbSchemaHelper](https://mikro-orm.io/api/mariadb/class/MariaDbSchemaHelper.md) - Inherited from MySqlSchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [MariaDbSchemaHelper](https://mikro-orm.io/api/mariadb/class/MariaDbSchemaHelper.md) ## Properties[**](#Properties) ### [**](#DEFAULT_VALUES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L13)staticreadonlyinheritedDEFAULT\_VALUES **DEFAULT\_VALUES: { 0: string\[]; current\_timestamp(?): string\[]; now(): string\[] } = ... Inherited from MySqlSchemaHelper.DEFAULT\_VALUES #### Type declaration * ##### 0: string\[] * ##### current\_timestamp(?): string\[] * ##### now(): string\[] ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from MySqlSchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from MySqlSchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from MySqlSchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L248)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from MySqlSchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from MySqlSchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from MySqlSchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from MySqlSchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from MySqlSchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from MySqlSchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L222)inheritedcreateTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Inherited from MySqlSchemaHelper.createTableColumn #### Parameters * ##### table: [MySqlTableBuilder](https://mikro-orm.io/api/knex/interface/MySqlTableBuilder.md) * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L353)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from MySqlSchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L27)inheriteddisableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Inherited from MySqlSchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from MySqlSchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L31)inheritedenableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Inherited from MySqlSchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L35)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from MySqlSchemaHelper.finalizeTable #### Parameters * ##### table: CreateTableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAllChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbSchemaHelper.ts#L117)getAllChecks * ****getAllChecks**(connection, tables, columns): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> - Overrides MySqlSchemaHelper.getAllChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalcolumns: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> ### [**](#getAllColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbSchemaHelper.ts#L61)getAllColumns * ****getAllColumns**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> - Overrides MySqlSchemaHelper.getAllColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> ### [**](#getAllEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L317)inheritedgetAllEnumDefinitions * ****getAllEnumDefinitions**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\>> - Inherited from MySqlSchemaHelper.getAllEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\>> ### [**](#getAllForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L180)inheritedgetAllForeignKeys * ****getAllForeignKeys**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> - Inherited from MySqlSchemaHelper.getAllForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> ### [**](#getAllIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbSchemaHelper.ts#L34)getAllIndexes * ****getAllIndexes**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> - Overrides MySqlSchemaHelper.getAllIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from MySqlSchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from MySqlSchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L533)optionalinheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from MySqlSchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L285)inheritedgetChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Inherited from MySqlSchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbSchemaHelper.ts#L159)getChecks * ****getChecks**(connection, tableName, schemaName, columns): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Overrides MySqlSchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### schemaName: string * ##### optionalcolumns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L365)inheritedgetColumns * ****getColumns**(connection, tableName, schemaName): Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> - Inherited from MySqlSchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L318)inheritedgetCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Inherited from MySqlSchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from MySqlSchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from MySqlSchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from MySqlSchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)inheritedgetDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Inherited from MySqlSchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from MySqlSchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from MySqlSchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L155)inheritedgetDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Inherited from MySqlSchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L323)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from MySqlSchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from MySqlSchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from MySqlSchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from MySqlSchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L359)inheritedgetEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from MySqlSchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from MySqlSchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L310)inheritedgetForeignKeysSQL * ****getForeignKeysSQL**(tableName, schemaName): string - Inherited from MySqlSchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L371)inheritedgetIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Inherited from MySqlSchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L44)inheritedgetListTablesSQL * ****getListTablesSQL**(): string - Inherited from MySqlSchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L345)inheritedgetManagementDbName * ****getManagementDbName**(): string - Inherited from MySqlSchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)inheritedgetNamespaces * ****getNamespaces**(connection): Promise\ - Inherited from MySqlSchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)inheritedgetPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Inherited from MySqlSchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L206)inheritedgetPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Inherited from MySqlSchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L52)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from MySqlSchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] = \[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from MySqlSchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L269)inheritedgetRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to): string - Inherited from MySqlSchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L277)inheritedgetRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Inherited from MySqlSchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L19)inheritedgetSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Inherited from MySqlSchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from MySqlSchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from MySqlSchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from MySqlSchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inheritedinferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Inherited from MySqlSchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mariadb/src/MariaDbSchemaHelper.ts#L14)loadInformationSchema * ****loadInformationSchema**(schema, connection, tables): Promise\ - Overrides MySqlSchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L275)inheritedmapForeignKeys * ****mapForeignKeys**(fks, tableName, schemaName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from MySqlSchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L376)inheritednormalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length): string | number - Inherited from MySqlSchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### length: number #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from MySqlSchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from MySqlSchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L48)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from MySqlSchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/core/interface/MatchingOptions.md # MatchingOptions \ ### Hierarchy * [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * *MatchingOptions* ## Index[**](#Index) ### Properties * [**after](#after) * [**before](#before) * [**cache](#cache) * [**comments](#comments) * [**connectionType](#connectionType) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**exclude](#exclude) * [**fields](#fields) * [**filters](#filters) * [**first](#first) * [**flags](#flags) * [**flushMode](#flushMode) * [**groupBy](#groupBy) * [**having](#having) * [**hintComments](#hintComments) * [**indexHint](#indexHint) * [**last](#last) * [**limit](#limit) * [**lockMode](#lockMode) * [**lockTableAliases](#lockTableAliases) * [**loggerContext](#loggerContext) * [**logging](#logging) * [**offset](#offset) * [**orderBy](#orderBy) * [**overfetch](#overfetch) * [**populate](#populate) * [**populateFilter](#populateFilter) * [**populateOrderBy](#populateOrderBy) * [**populateWhere](#populateWhere) * [**refresh](#refresh) * [**schema](#schema) * [**store](#store) * [**strategy](#strategy) * [**where](#where) ## Properties[**](#Properties) ### [**](#after)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L163)optionalinheritedafter **after? : string | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ | { endCursor: null | string } Inherited from FindOptions.after Fetch items `after` this cursor. ### [**](#before)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L160)optionalinheritedbefore **before? : string | [FilterObject](https://mikro-orm.io/api/core.md#FilterObject)\ | { startCursor: null | string } Inherited from FindOptions.before Fetch items `before` this cursor. ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L143)optionalinheritedcache **cache? : number | boolean | \[string, number] Inherited from FindOptions.cache Control result caching for this query. Result cache is by default disabled, not to be confused with the identity map. ### [**](#comments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L195)optionalinheritedcomments **comments? : string | string\[] Inherited from FindOptions.comments sql only ### [**](#connectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L191)optionalinheritedconnectionType **connectionType? : [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) Inherited from FindOptions.connectionType ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L175)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from FindOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L28)optionalctx **ctx? : any Overrides FindOptions.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L176)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from FindOptions.disableIdentityMap ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L112)optionalinheritedexclude **exclude? : readonly never\[] Inherited from FindOptions.exclude ### [**](#fields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L111)optionalinheritedfields **fields? : readonly (ALL extends StringKeys\ ? (NonNullable\ & ALL, \*>> extends unknown ? ALL : never) | (StringKeys\ & ALL, \*>>, \*> extends never ? never : \`${StringKeys\ & ALL}.\`) : StringKeys\ | \`${CollectionKeys\}:ref\`)\[] Inherited from FindOptions.fields ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L185)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from FindOptions.filters ### [**](#first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L166)optionalinheritedfirst **first? : number Inherited from FindOptions.first Fetch `first` N items. ### [**](#flags)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L178)optionalinheritedflags **flags? : [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md)\[] Inherited from FindOptions.flags ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L184)optionalinheritedflushMode **flushMode? : always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto Inherited from FindOptions.flushMode ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L180)optionalinheritedgroupBy **groupBy? : string | string\[] Inherited from FindOptions.groupBy sql only ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L181)optionalinheritedhaving **having? : [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ Inherited from FindOptions.having ### [**](#hintComments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L197)optionalinheritedhintComments **hintComments? : string | string\[] Inherited from FindOptions.hintComments sql only ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L193)optionalinheritedindexHint **indexHint? : string Inherited from FindOptions.indexHint sql only ### [**](#last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L169)optionalinheritedlast **last? : number Inherited from FindOptions.last Fetch `last` N items. ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L150)optionalinheritedlimit **limit? : number Inherited from FindOptions.limit Limit the number of returned results. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#lockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L187)optionalinheritedlockMode **lockMode? : NONE | PESSIMISTIC\_READ | PESSIMISTIC\_WRITE | PESSIMISTIC\_PARTIAL\_WRITE | PESSIMISTIC\_WRITE\_OR\_FAIL | PESSIMISTIC\_PARTIAL\_READ | PESSIMISTIC\_READ\_OR\_FAIL Inherited from FindOptions.lockMode sql only ### [**](#lockTableAliases)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L189)optionalinheritedlockTableAliases **lockTableAliases? : string\[] Inherited from FindOptions.lockTableAliases sql only ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L198)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from FindOptions.loggerContext ### [**](#logging)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L199)optionalinheritedlogging **logging? : [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) Inherited from FindOptions.logging ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L157)optionalinheritedoffset **offset? : number Inherited from FindOptions.offset Sets the offset. If you try to use limit/offset on a query that joins a to-many relation, pagination mechanism will be triggered, resulting in a subquery condition, to apply this limit only to the root entities instead of the cartesian product you get from a database in this case. ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L140)optionalinheritedorderBy **orderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOptions.orderBy Ordering of the results.Can be an object or array of objects, keys are property names, values are ordering (asc/desc) ### [**](#overfetch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L172)optionalinheritedoverfetch **overfetch? : boolean Inherited from FindOptions.overfetch Fetch one more item than `first`/`last`, enabled automatically in `em.findByCursor` to check if there is a next page. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L110)optionalinheritedpopulate **populate? : [Populate](https://mikro-orm.io/api/core.md#Populate)\ Inherited from FindOptions.populate ### [**](#populateFilter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L134)optionalinheritedpopulateFilter **populateFilter? : [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOptions.populateFilter Filter condition for populated relations. This is similar to `populateWhere`, but will produce a `left join` when nesting the condition. This is used for implementation of joined filters. ### [**](#populateOrderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L137)optionalinheritedpopulateOrderBy **populateOrderBy? : [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ Inherited from FindOptions.populateOrderBy Used for ordering of the populate queries. If not specified, the value of `options.orderBy` is used. ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L128)optionalinheritedpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all | [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ Inherited from FindOptions.populateWhere Where condition for populated relations. This will have no effect on the root entity. With `select-in` strategy, this is applied only to the populate queries. With `joined` strategy, those are applied as `join on` conditions. When you use a nested condition on a to-many relation, it will produce a nested inner join, discarding the collection items based on the child condition. ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L174)optionalinheritedrefresh **refresh? : boolean Inherited from FindOptions.refresh ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L177)optionalinheritedschema **schema? : string Inherited from FindOptions.schema ### [**](#store)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L27)optionalstore **store? : boolean ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L183)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from FindOptions.strategy sql only ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L26)optionalwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ --- # Source: https://mikro-orm.io/api/core/class/MediumIntType.md # MediumIntType ### Hierarchy * [IntegerType](https://mikro-orm.io/api/core/class/IntegerType.md) * *MediumIntType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MediumIntType**(): [MediumIntType](https://mikro-orm.io/api/core/class/MediumIntType.md) - Inherited from IntegerType.constructor #### Returns [MediumIntType](https://mikro-orm.io/api/core/class/MediumIntType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from IntegerType.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from IntegerType.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from IntegerType.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from IntegerType.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from IntegerType.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntegerType.ts#L11)inheritedcompareAsType * ****compareAsType**(): string - Inherited from IntegerType.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from IntegerType.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | number * ##### b: undefined | null | number #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | number - Inherited from IntegerType.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from IntegerType.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | number - Inherited from IntegerType.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from IntegerType.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/IntegerType.ts#L15)inheritedensureComparable * ****ensureComparable**(): boolean - Inherited from IntegerType.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/MediumIntType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides IntegerType.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from IntegerType.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | number - Inherited from IntegerType.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | number ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from IntegerType.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from IntegerType.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md # MemoryCacheAdapter ### Implements * [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clear](#clear) * [**get](#get) * [**remove](#remove) * [**set](#set) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L7)constructor * ****new MemoryCacheAdapter**(options): [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md) - #### Parameters * ##### options: { expiration: number } * ##### expiration: number #### Returns [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md) ## Methods[**](#Methods) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L43)clear * ****clear**(): void - Implementation of CacheAdapter.clear Clears all items stored in the cache. *** #### Returns void ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L12)get * ****get**\(name): undefined | T - Implementation of CacheAdapter.get Gets the items under `name` key from the cache. *** #### Parameters * ##### name: string #### Returns undefined | T ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L36)remove * ****remove**(name): void - Implementation of CacheAdapter.remove Removes the item from cache. *** #### Parameters * ##### name: string #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L29)set * ****set**(name, data, origin, expiration): void - Implementation of CacheAdapter.set Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. *** #### Parameters * ##### name: string * ##### data: any * ##### origin: string * ##### optionalexpiration: number #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/MergeOptions.md # MergeOptions ## Index[**](#Index) ### Properties * [**cascade](#cascade) * [**convertCustomTypes](#convertCustomTypes) * [**disableContextResolution](#disableContextResolution) * [**keepIdentity](#keepIdentity) * [**refresh](#refresh) * [**schema](#schema) * [**validate](#validate) ## Properties[**](#Properties) ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2431)optionalcascade **cascade? : boolean ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2426)optionalconvertCustomTypes **convertCustomTypes? : boolean ### [**](#disableContextResolution)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2428)optionaldisableContextResolution **disableContextResolution? : boolean ### [**](#keepIdentity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2429)optionalkeepIdentity **keepIdentity? : boolean ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2425)optionalrefresh **refresh? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2427)optionalschema **schema? : string ### [**](#validate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2430)optionalvalidate **validate? : boolean --- # Source: https://mikro-orm.io/api/core/class/MetadataDiscovery.md # MetadataDiscovery ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**discover](#discover) * [**discoverReferences](#discoverReferences) * [**discoverSync](#discoverSync) * [**processDiscoveredEntities](#processDiscoveredEntities) * [**reset](#reset) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L53)constructor * ****new MetadataDiscovery**(metadata, platform, config): [MetadataDiscovery](https://mikro-orm.io/api/core/class/MetadataDiscovery.md) - #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MetadataDiscovery](https://mikro-orm.io/api/core/class/MetadataDiscovery.md) ## Methods[**](#Methods) ### [**](#discover)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L63)discover * ****discover**(preferTsNode): Promise<[MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md)> - #### Parameters * ##### preferTsNode: boolean = true #### Returns Promise<[MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md)> ### [**](#discoverReferences)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L327)discoverReferences * ****discoverReferences**\(refs): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\\[] - #### Parameters * ##### refs: ([Constructor](https://mikro-orm.io/api/core.md#Constructor)\ | [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\)\[] #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\\[] ### [**](#discoverSync)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L83)discoverSync * ****discoverSync**(preferTsNode): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - #### Parameters * ##### preferTsNode: boolean = true #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#processDiscoveredEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L150)processDiscoveredEntities * ****processDiscoveredEntities**(discovered): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\\[] - #### Parameters * ##### discovered: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\\[] #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\\[] ### [**](#reset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L367)reset * ****reset**(className): void - #### Parameters * ##### className: string #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/MetadataDiscoveryOptions.md # MetadataDiscoveryOptions ## Index[**](#Index) ### Properties * [**afterDiscovered](#afterDiscovered) * [**alwaysAnalyseProperties](#alwaysAnalyseProperties) * [**checkDuplicateEntities](#checkDuplicateEntities) * [**checkDuplicateFieldNames](#checkDuplicateFieldNames) * [**checkDuplicateTableNames](#checkDuplicateTableNames) * [**checkNonPersistentCompositeProps](#checkNonPersistentCompositeProps) * [**disableDynamicFileAccess](#disableDynamicFileAccess) * [**getMappedType](#getMappedType) * [**inferDefaultValues](#inferDefaultValues) * [**onMetadata](#onMetadata) * [**requireEntitiesArray](#requireEntitiesArray) * [**tsConfigPath](#tsConfigPath) * [**warnWhenNoEntities](#warnWhenNoEntities) ## Properties[**](#Properties) ### [**](#afterDiscovered)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L589)optionalafterDiscovered **afterDiscovered? : (storage, platform) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ #### Type declaration * * **(storage, platform): [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ - #### Parameters * ##### storage: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ ### [**](#alwaysAnalyseProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L584)optionalalwaysAnalyseProperties **alwaysAnalyseProperties? : boolean ### [**](#checkDuplicateEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L582)optionalcheckDuplicateEntities **checkDuplicateEntities? : boolean ### [**](#checkDuplicateFieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L581)optionalcheckDuplicateFieldNames **checkDuplicateFieldNames? : boolean ### [**](#checkDuplicateTableNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L580)optionalcheckDuplicateTableNames **checkDuplicateTableNames? : boolean ### [**](#checkNonPersistentCompositeProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L583)optionalcheckNonPersistentCompositeProps **checkNonPersistentCompositeProps? : boolean ### [**](#disableDynamicFileAccess)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L585)optionaldisableDynamicFileAccess **disableDynamicFileAccess? : boolean ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L587)optionalgetMappedType **getMappedType? : (type, platform) => undefined | [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Type declaration * * **(type, platform): undefined | [Type](https://mikro-orm.io/api/core/class/Type.md)\ - #### Parameters * ##### type: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#inferDefaultValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L586)optionalinferDefaultValues **inferDefaultValues? : boolean ### [**](#onMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L588)optionalonMetadata **onMetadata? : (meta, platform) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ #### Type declaration * * **(meta, platform): [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ ### [**](#requireEntitiesArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L579)optionalrequireEntitiesArray **requireEntitiesArray? : boolean ### [**](#tsConfigPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L590)optionaltsConfigPath **tsConfigPath? : string ### [**](#warnWhenNoEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L578)optionalwarnWhenNoEntities **warnWhenNoEntities? : boolean --- # Source: https://mikro-orm.io/api/core/class/MetadataError.md # MetadataError \ ### Hierarchy * [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\ * *MetadataError* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**entity](#entity) * [**message](#message) * [**name](#name) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**getEntity](#getEntity) * [**cannotCommit](#cannotCommit) * [**cannotModifyInverseCollection](#cannotModifyInverseCollection) * [**cannotModifyReadonlyCollection](#cannotModifyReadonlyCollection) * [**cannotRemoveFromCollectionWithoutOrphanRemoval](#cannotRemoveFromCollectionWithoutOrphanRemoval) * [**cannotUseGlobalContext](#cannotUseGlobalContext) * [**cannotUseGroupOperatorsInsideScalars](#cannotUseGroupOperatorsInsideScalars) * [**cannotUseOperatorsInsideEmbeddables](#cannotUseOperatorsInsideEmbeddables) * [**captureStackTrace](#captureStackTrace) * [**duplicateEntityDiscovered](#duplicateEntityDiscovered) * [**duplicateFieldName](#duplicateFieldName) * [**entityNotFound](#entityNotFound) * [**entityNotManaged](#entityNotManaged) * [**fromCollectionNotInitialized](#fromCollectionNotInitialized) * [**fromInversideSidePrimary](#fromInversideSidePrimary) * [**fromMergeWithoutPK](#fromMergeWithoutPK) * [**fromMissingOption](#fromMissingOption) * [**fromMissingPrimaryKey](#fromMissingPrimaryKey) * [**fromUnknownEntity](#fromUnknownEntity) * [**fromWrongForeignKey](#fromWrongForeignKey) * [**fromWrongOwnership](#fromWrongOwnership) * [**fromWrongPropertyType](#fromWrongPropertyType) * [**fromWrongReference](#fromWrongReference) * [**fromWrongReferenceKind](#fromWrongReferenceKind) * [**fromWrongRepositoryType](#fromWrongRepositoryType) * [**fromWrongTypeDefinition](#fromWrongTypeDefinition) * [**invalidCompositeIdentifier](#invalidCompositeIdentifier) * [**invalidEmbeddableQuery](#invalidEmbeddableQuery) * [**invalidManyToManyWithPivotEntity](#invalidManyToManyWithPivotEntity) * [**invalidPrimaryKey](#invalidPrimaryKey) * [**invalidPropertyName](#invalidPropertyName) * [**invalidType](#invalidType) * [**invalidVersionFieldType](#invalidVersionFieldType) * [**missingMetadata](#missingMetadata) * [**multipleDecorators](#multipleDecorators) * [**multipleVersionFields](#multipleVersionFields) * [**noEntityDiscovered](#noEntityDiscovered) * [**nonPersistentCompositeProp](#nonPersistentCompositeProp) * [**notDiscoveredEntity](#notDiscoveredEntity) * [**notEntity](#notEntity) * [**onlyAbstractEntitiesDiscovered](#onlyAbstractEntitiesDiscovered) * [**prepareStackTrace](#prepareStackTrace) * [**propertyRequired](#propertyRequired) * [**propertyTargetsEntityType](#propertyTargetsEntityType) * [**targetIsAbstract](#targetIsAbstract) * [**transactionRequired](#transactionRequired) * [**unknownIndexProperty](#unknownIndexProperty) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)constructor * ****new MetadataError**\(message, entity): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\ - Inherited from ValidationError.constructor #### Parameters * ##### message: string * ##### optionalentity: T #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\ ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ValidationError.cause ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)optionalreadonlyinheritedentity **entity? : T Inherited from ValidationError.entity ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ValidationError.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ValidationError.name ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ValidationError.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ValidationError.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L17)inheritedgetEntity * ****getEntity**(): undefined | Partial\ - Inherited from ValidationError.getEntity Gets instance of entity that caused this error. *** #### Returns undefined | Partial\ ### [**](#cannotCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L116)staticinheritedcannotCommit * ****cannotCommit**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotCommit #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyInverseCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L90)staticinheritedcannotModifyInverseCollection * ****cannotModifyInverseCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyInverseCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyReadonlyCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L99)staticinheritedcannotModifyReadonlyCollection * ****cannotModifyReadonlyCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyReadonlyCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotRemoveFromCollectionWithoutOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L103)staticinheritedcannotRemoveFromCollectionWithoutOrphanRemoval * ****cannotRemoveFromCollectionWithoutOrphanRemoval**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotRemoveFromCollectionWithoutOrphanRemoval #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L120)staticinheritedcannotUseGlobalContext * ****cannotUseGlobalContext**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGlobalContext #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGroupOperatorsInsideScalars)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L128)staticinheritedcannotUseGroupOperatorsInsideScalars * ****cannotUseGroupOperatorsInsideScalars**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGroupOperatorsInsideScalars #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseOperatorsInsideEmbeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L124)staticinheritedcannotUseOperatorsInsideEmbeddables * ****cannotUseOperatorsInsideEmbeddables**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseOperatorsInsideEmbeddables #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ValidationError.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#duplicateEntityDiscovered)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L243)staticduplicateEntityDiscovered * ****duplicateEntityDiscovered**(paths, subject): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### paths: string\[] * ##### subject: string = 'entity names' #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#duplicateFieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L247)staticduplicateFieldName * ****duplicateFieldName**(className, names): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### className: string * ##### names: \[string, string]\[] #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#entityNotFound)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L214)staticentityNotFound * ****entityNotFound**(name, path): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### name: string * ##### path: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#entityNotManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L49)staticinheritedentityNotManaged * ****entityNotManaged**(entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.entityNotManaged #### Parameters * ##### entity: Partial\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromCollectionNotInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L34)staticinheritedfromCollectionNotInitialized * ****fromCollectionNotInitialized**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromCollectionNotInitialized #### Parameters * ##### entity: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromInversideSidePrimary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L209)staticfromInversideSidePrimary * ****fromInversideSidePrimary**(meta, owner, prop): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### owner: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromMergeWithoutPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L41)staticinheritedfromMergeWithoutPK * ****fromMergeWithoutPK**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromMergeWithoutPK #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromMissingOption)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L283)staticfromMissingOption * ****fromMissingOption**(meta, prop, option): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### option: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromMissingPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L174)staticfromMissingPrimaryKey * ****fromMissingPrimaryKey**(meta): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromUnknownEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L231)staticfromUnknownEntity * ****fromUnknownEntity**(className, source): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### className: string * ##### source: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromWrongForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L186)staticfromWrongForeignKey * ****fromWrongForeignKey**(meta, prop, key): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### key: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromWrongOwnership)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L198)staticfromWrongOwnership * ****fromWrongOwnership**(meta, prop, key): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### key: inversedBy | mappedBy #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromWrongPropertyType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L21)staticinheritedfromWrongPropertyType * ****fromWrongPropertyType**(entity, property, expectedType, givenType, givenValue): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongPropertyType #### Parameters * ##### entity: Partial\ * ##### property: string * ##### expectedType: string * ##### givenType: string * ##### givenValue: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L178)staticfromWrongReference * ****fromWrongReference**(meta, prop, key, owner): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### key: inversedBy | mappedBy * ##### optionalowner: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromWrongReferenceKind)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L205)staticfromWrongReferenceKind * ****fromWrongReferenceKind**(meta, owner, prop): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### owner: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#fromWrongRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L28)staticinheritedfromWrongRepositoryType * ****fromWrongRepositoryType**(entityName, repoType, method): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongRepositoryType #### Parameters * ##### entityName: string * ##### repoType: string * ##### method: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongTypeDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L190)staticfromWrongTypeDefinition * ****fromWrongTypeDefinition**(meta, prop): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#invalidCompositeIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L112)staticinheritedinvalidCompositeIdentifier * ****invalidCompositeIdentifier**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidCompositeIdentifier #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidEmbeddableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L132)staticinheritedinvalidEmbeddableQuery * ****invalidEmbeddableQuery**(className, propName, embeddableType): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidEmbeddableQuery #### Parameters * ##### className: string * ##### propName: string * ##### embeddableType: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidManyToManyWithPivotEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L263)staticinvalidManyToManyWithPivotEntity * ****invalidManyToManyWithPivotEntity**(meta1, prop1, meta2, prop2): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta1: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop1: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### meta2: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop2: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#invalidPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L259)staticinvalidPrimaryKey * ****invalidPrimaryKey**(meta, prop, requiredName): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### requiredName: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#invalidPropertyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L71)staticinheritedinvalidPropertyName * ****invalidPropertyName**(entityName, invalid): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidPropertyName #### Parameters * ##### entityName: string * ##### invalid: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L75)staticinheritedinvalidType * ****invalidType**(type, value, mode): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidType #### Parameters * ##### type: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ * ##### value: any * ##### mode: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidVersionFieldType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L226)staticinvalidVersionFieldType * ****invalidVersionFieldType**(meta): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#missingMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L255)staticmissingMetadata * ****missingMetadata**(entity): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### entity: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#multipleDecorators)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L251)staticmultipleDecorators * ****multipleDecorators**(entityName, propertyName): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### entityName: string * ##### propertyName: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#multipleVersionFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L222)staticmultipleVersionFields * ****multipleVersionFields**(meta, fields): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### fields: string\[] #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#noEntityDiscovered)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L235)staticnoEntityDiscovered * ****noEntityDiscovered**(): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#nonPersistentCompositeProp)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L273)staticnonPersistentCompositeProp * ****nonPersistentCompositeProp**(meta, prop): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#notDiscoveredEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L58)staticinheritednotDiscoveredEntity * ****notDiscoveredEntity**(data, meta, action): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notDiscoveredEntity #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### action: string = 'persist' #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L53)staticinheritednotEntity * ****notEntity**(owner, prop, data): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notEntity #### Parameters * ##### owner: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### data: any #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#onlyAbstractEntitiesDiscovered)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L239)staticonlyAbstractEntitiesDiscovered * ****onlyAbstractEntitiesDiscovered**(): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ValidationError.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any ### [**](#propertyRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L85)staticinheritedpropertyRequired * ****propertyRequired**(entity, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.propertyRequired #### Parameters * ##### entity: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#propertyTargetsEntityType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L277)staticpropertyTargetsEntityType * ****propertyTargetsEntityType**(meta, prop, target): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### target: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#targetIsAbstract)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L269)statictargetIsAbstract * ****targetIsAbstract**(meta, prop): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> ### [**](#transactionRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L45)staticinheritedtransactionRequired * ****transactionRequired**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.transactionRequired #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#unknownIndexProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L218)staticunknownIndexProperty * ****unknownIndexProperty**(meta, prop, type): [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: string * ##### type: string #### Returns [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md)\> --- # Source: https://mikro-orm.io/api/core/class/MetadataProvider.md # abstractMetadataProvider ### Hierarchy * *MetadataProvider* * [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md) * [TsMorphMetadataProvider](https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**loadEntityMetadata](#loadEntityMetadata) * [**loadFromCache](#loadFromCache) * [**useCache](#useCache) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L13)constructor * ****new MetadataProvider**(config): [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) - #### Parameters * ##### config: [IConfiguration](https://mikro-orm.io/api/core/interface/IConfiguration.md) #### Returns [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) ## Methods[**](#Methods) ### [**](#loadEntityMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L15)abstractloadEntityMetadata * ****loadEntityMetadata**(meta, name): void - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### name: string #### Returns void ### [**](#loadFromCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L17)loadFromCache * ****loadFromCache**(meta, cache): void - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### cache: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void ### [**](#useCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L29)useCache * ****useCache**(): boolean - #### Returns boolean --- # Source: https://mikro-orm.io/api/core/class/MetadataStorage.md # MetadataStorage ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**PATH\_SYMBOL](#PATH_SYMBOL) ### Methods * [**\[iterator\]](#\[iterator]) * [**decorate](#decorate) * [**find](#find) * [**get](#get) * [**getAll](#getAll) * [**getByDiscriminatorColumn](#getByDiscriminatorColumn) * [**has](#has) * [**reset](#reset) * [**set](#set) * [**clear](#clear) * [**getMetadata](#getMetadata) * [**getMetadataFromDecorator](#getMetadataFromDecorator) * [**init](#init) * [**isKnownEntity](#isKnownEntity) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L14)constructor * ****new MetadataStorage**(metadata): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - #### Parameters * ##### metadata: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> = {} #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ## Properties[**](#Properties) ### [**](#PATH_SYMBOL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L9)staticreadonlyPATH\_SYMBOL **PATH\_SYMBOL: typeof PATH\_SYMBOL = ... ## Methods[**](#Methods) ### [**](#\[iterator])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L115)\[iterator] * ****\[iterator]**(): IterableIterator<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\, any, any> - #### Returns IterableIterator<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\, any, any> ### [**](#decorate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L109)decorate * ****decorate**(em): void - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns void ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L88)find * ****find**\(entityName): undefined | [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns undefined | [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L74)get * ****get**\(entityName, init, validate): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### entityName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### init: boolean = false * ##### validate: boolean = true #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#getAll)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L58)getAll * ****getAll**(): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> - #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> ### [**](#getByDiscriminatorColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L62)getByDiscriminatorColumn * ****getByDiscriminatorColumn**\(meta, data): undefined | [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns undefined | [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#has)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L97)has * ****has**(entity): boolean - #### Parameters * ##### entity: string #### Returns boolean ### [**](#reset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L105)reset * ****reset**(entity): void - #### Parameters * ##### entity: string #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L101)set * ****set**(entity, meta): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### entity: string * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L54)staticclear * ****clear**(): void - #### Returns void ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L18)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L19)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L20)staticgetMetadata * ****getMetadata**(): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> * ****getMetadata**\(entity, path): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\> ### [**](#getMetadataFromDecorator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L38)staticgetMetadataFromDecorator * ****getMetadataFromDecorator**\(target): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### target: T & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) & { \[PATH\_SYMBOL]?: string } #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L50)staticinit * ****init**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#isKnownEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L34)staticisKnownEntity * ****isKnownEntity**(name): boolean - #### Parameters * ##### name: string #### Returns boolean --- # Source: https://mikro-orm.io/api/migrations/class/Migration.md # abstractMigration ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**addSql](#addSql) * [**down](#down) * [**execute](#execute) * [**getEntityManager](#getEntityManager) * [**getKnex](#getKnex) * [**getQueries](#getQueries) * [**isTransactional](#isTransactional) * [**reset](#reset) * [**setTransactionContext](#setTransactionContext) * [**up](#up) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L12)constructor * ****new Migration**(driver, config): [Migration](https://mikro-orm.io/api/migrations/class/Migration.md) - #### Parameters * ##### driver: [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [Migration](https://mikro-orm.io/api/migrations/class/Migration.md) ## Methods[**](#Methods) ### [**](#addSql)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L25)addSql * ****addSql**(sql): void - #### Parameters * ##### sql: [Query](https://mikro-orm.io/api/migrations.md#Query) #### Returns void ### [**](#down)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L17)down * ****down**(): void | Promise\ - #### Returns void | Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L42)execute * ****execute**(sql, params): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\>\[]> - Executes a raw SQL query. Accepts a string SQL or a knex query builder instance. The `params` parameter is respected only if you use string SQL in the first parameter. *** #### Parameters * ##### sql: [Query](https://mikro-orm.io/api/migrations.md#Query) * ##### optionalparams: unknown\[] #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\>\[]> ### [**](#getEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L54)getEntityManager * ****getEntityManager**(): [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)>> - Creates a cached `EntityManager` instance for this migration, which will respect the current transaction context. *** #### Returns [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)>> ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L46)getKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getQueries)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L63)getQueries * ****getQueries**(): [Query](https://mikro-orm.io/api/migrations.md#Query)\[] - #### Returns [Query](https://mikro-orm.io/api/migrations.md#Query)\[] ### [**](#isTransactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L21)isTransactional * ****isTransactional**(): boolean - #### Returns boolean ### [**](#reset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L29)reset * ****reset**(): void - #### Returns void ### [**](#setTransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L34)setTransactionContext * ****setTransactionContext**(ctx): void - #### Parameters * ##### ctx: any #### Returns void ### [**](#up)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migration.ts#L15)abstractup * ****up**(): void | Promise\ - #### Returns void | Promise\ --- # Source: https://mikro-orm.io/api/core/interface/MigrationDiff.md # MigrationDiff ## Index[**](#Index) ### Properties * [**down](#down) * [**up](#up) ## Properties[**](#Properties) ### [**](#down)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1041)down **down: string\[] ### [**](#up)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1040)up **up: string\[] --- # Source: https://mikro-orm.io/api/migrations/class/MigrationGenerator.md # abstractMigrationGenerator ### Hierarchy * *MigrationGenerator* * [JSMigrationGenerator](https://mikro-orm.io/api/migrations/class/JSMigrationGenerator.md) * [TSMigrationGenerator](https://mikro-orm.io/api/migrations/class/TSMigrationGenerator.md) ### Implements * [IMigrationGenerator](https://mikro-orm.io/api/core/interface/IMigrationGenerator.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**createStatement](#createStatement) * [**generate](#generate) * [**generateMigrationFile](#generateMigrationFile) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L13)constructor * ****new MigrationGenerator**(driver, namingStrategy, options): [MigrationGenerator](https://mikro-orm.io/api/migrations/class/MigrationGenerator.md) - #### Parameters * ##### driver: [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> * ##### namingStrategy: [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * ##### options: [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) #### Returns [MigrationGenerator](https://mikro-orm.io/api/migrations/class/MigrationGenerator.md) ## Methods[**](#Methods) ### [**](#createStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L37)createStatement * ****createStatement**(sql, padLeft): string - Implementation of IMigrationGenerator.createStatement Creates single migration statement. By default adds `this.addSql(sql);` to the code. *** #### Parameters * ##### sql: string * ##### padLeft: number #### Returns string ### [**](#generate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L20)generate * ****generate**(diff, path, name): Promise<\[string, string]> - Implementation of IMigrationGenerator.generate Generates the full contents of migration file. Uses `generateMigrationFile` to get the file contents. *** #### Parameters * ##### diff: { down: string\[]; up: string\[] } * * ##### down: string\[] * ##### up: string\[] ##### optionalpath: string * ##### optionalname: string #### Returns Promise<\[string, string]> ### [**](#generateMigrationFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L49)abstractgenerateMigrationFile * ****generateMigrationFile**(className, diff): [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ - Implementation of IMigrationGenerator.generateMigrationFile Returns the file contents of given migration. *** #### Parameters * ##### className: string * ##### diff: { down: string\[]; up: string\[] } * ##### down: string\[] * ##### up: string\[] #### Returns [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ --- # Source: https://mikro-orm.io/api/core/interface/MigrationObject.md # MigrationObject ## Index[**](#Index) ### Properties * [**class](#class) * [**name](#name) ## Properties[**](#Properties) ### [**](#class)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1068)class **class: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L1067)name **name: string --- # Source: https://mikro-orm.io/api/migrations/class/MigrationRunner.md # MigrationRunner ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**run](#run) * [**setMasterMigration](#setMasterMigration) * [**unsetMasterMigration](#unsetMasterMigration) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationRunner.ts#L11)constructor * ****new MigrationRunner**(driver, options, config): [MigrationRunner](https://mikro-orm.io/api/migrations/class/MigrationRunner.md) - #### Parameters * ##### driver: [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> * ##### options: [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MigrationRunner](https://mikro-orm.io/api/migrations/class/MigrationRunner.md) ## Methods[**](#Methods) ### [**](#run)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationRunner.ts#L18)run * ****run**(migration, method): Promise\ - #### Parameters * ##### migration: [Migration](https://mikro-orm.io/api/migrations/class/Migration.md) * ##### method: up | down #### Returns Promise\ ### [**](#setMasterMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationRunner.ts#L33)setMasterMigration * ****setMasterMigration**(trx): void - #### Parameters * ##### trx: any #### Returns void ### [**](#unsetMasterMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationRunner.ts#L37)unsetMasterMigration * ****unsetMasterMigration**(): void - #### Returns void --- # Source: https://mikro-orm.io/api/migrations/class/MigrationStorage.md # MigrationStorage ### Implements * UmzugStorage ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**ensureTable](#ensureTable) * [**executed](#executed) * [**getExecutedMigrations](#getExecutedMigrations) * [**logMigration](#logMigration) * [**setMasterMigration](#setMasterMigration) * [**unlogMigration](#unlogMigration) * [**unsetMasterMigration](#unsetMasterMigration) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L13)constructor * ****new MigrationStorage**(driver, options): [MigrationStorage](https://mikro-orm.io/api/migrations/class/MigrationStorage.md) - #### Parameters * ##### driver: [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> * ##### options: [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) #### Returns [MigrationStorage](https://mikro-orm.io/api/migrations/class/MigrationStorage.md) ## Methods[**](#Methods) ### [**](#ensureTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L62)ensureTable * ****ensureTable**(): Promise\ - #### Returns Promise\ ### [**](#executed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L19)executed * ****executed**(): Promise\ - Implementation of UmzugStorage.executed Gets list of executed migrations. *** #### Returns Promise\ ### [**](#getExecutedMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L43)getExecutedMigrations * ****getExecutedMigrations**(): Promise<[MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow)\[]> - #### Returns Promise<[MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow)\[]> ### [**](#logMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L24)logMigration * ****logMigration**(params): Promise\ - Implementation of UmzugStorage.logMigration Logs migration to be considered as executed. *** #### Parameters * ##### params: MigrationParams\ #### Returns Promise\ ### [**](#setMasterMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L88)setMasterMigration * ****setMasterMigration**(trx): void - #### Parameters * ##### trx: any #### Returns void ### [**](#unlogMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L30)unlogMigration * ****unlogMigration**(params): Promise\ - Implementation of UmzugStorage.unlogMigration Unlogs migration (makes it to be considered as pending). *** #### Parameters * ##### params: MigrationParams\ #### Returns Promise\ ### [**](#unsetMasterMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationStorage.ts#L92)unsetMasterMigration * ****unsetMasterMigration**(): void - #### Returns void --- # Source: https://mikro-orm.io/api/migrations/class/Migrator.md # Migrator ### Implements * [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**checkMigrationNeeded](#checkMigrationNeeded) * [**createInitialMigration](#createInitialMigration) * [**createMigration](#createMigration) * [**down](#down) * [**getExecutedMigrations](#getExecutedMigrations) * [**getPendingMigrations](#getPendingMigrations) * [**off](#off) * [**on](#on) * [**up](#up) * [**register](#register) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L47)constructor * ****new Migrator**(em): [Migrator](https://mikro-orm.io/api/migrations/class/Migrator.md) - #### Parameters * ##### em: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)>> #### Returns [Migrator](https://mikro-orm.io/api/migrations/class/Migrator.md) ## Methods[**](#Methods) ### [**](#checkMigrationNeeded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L95)checkMigrationNeeded * ****checkMigrationNeeded**(): Promise\ - Implementation of IMigrator.checkMigrationNeeded Checks current schema for changes. *** #### Returns Promise\ ### [**](#createInitialMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L104)createInitialMigration * ****createInitialMigration**(path, name, blank): Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> - Implementation of IMigrator.createInitialMigration Creates initial migration. This generates the schema based on metadata, and checks whether all the tables are already present. If yes, it will also automatically log the migration as executed. Initial migration can be created only if the schema is already aligned with the metadata, or when no schema is present - in such case regular migration would have the same effect. *** #### Parameters * ##### optionalpath: string * ##### optionalname: string * ##### blank: boolean = false #### Returns Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> ### [**](#createMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L73)createMigration * ****createMigration**(path, blank, initial, name): Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> - Implementation of IMigrator.createMigration Checks current schema for changes, generates new migration if there are any. *** #### Parameters * ##### optionalpath: string * ##### blank: boolean = false * ##### initial: boolean = false * ##### optionalname: string #### Returns Promise<[MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult)> ### [**](#down)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L264)down * ****down**(options): Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> - Implementation of IMigrator.down Executes down migrations to the given point. Without parameter it will migrate one version down. *** #### Parameters * ##### optionaloptions: string | string\[] | [MigrateOptions](https://mikro-orm.io/api/core.md#MigrateOptions) #### Returns Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> ### [**](#getExecutedMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L229)getExecutedMigrations * ****getExecutedMigrations**(): Promise<[MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow)\[]> - Implementation of IMigrator.getExecutedMigrations Returns list of already executed migrations. *** #### Returns Promise<[MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow)\[]> ### [**](#getPendingMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L249)getPendingMigrations * ****getPendingMigrations**(): Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> - Implementation of IMigrator.getPendingMigrations Returns list of pending (not yet executed) migrations found in the migration directory. *** #### Returns Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> ### [**](#off)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L133)off * ****off**(eventName, listener): this - Implementation of IMigrator.off Removes event handler. *** #### Parameters * ##### eventName: [MigratorEvent](https://mikro-orm.io/api/core.md#MigratorEvent) * ##### listener: (event) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ #### Returns this ### [**](#on)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L125)on * ****on**(eventName, listener): this - Implementation of IMigrator.on Registers event handler. *** #### Parameters * ##### eventName: [MigratorEvent](https://mikro-orm.io/api/core.md#MigratorEvent) * ##### listener: (event) => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ #### Returns this ### [**](#up)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L257)up * ****up**(options): Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> - Implementation of IMigrator.up Executes specified migrations. Without parameter it will migrate up to the latest version. *** #### Parameters * ##### optionaloptions: string | string\[] | [MigrateOptions](https://mikro-orm.io/api/core.md#MigrateOptions) #### Returns Promise<[UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration)\[]> ### [**](#register)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/Migrator.ts#L66)staticregister * ****register**(orm): void - #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void --- # Source: https://mikro-orm.io/api/sqlite/class/MikroORM.md # Source: https://mikro-orm.io/api/postgresql/class/MikroORM.md # Source: https://mikro-orm.io/api/mysql/class/MikroORM.md # Source: https://mikro-orm.io/api/mssql/class/MikroORM.md # Source: https://mikro-orm.io/api/mongodb/class/MikroORM.md # Source: https://mikro-orm.io/api/mariadb/class/MikroORM.md # Source: https://mikro-orm.io/api/libsql/class/MikroORM.md # Source: https://mikro-orm.io/api/core/class/MikroORM.md # Source: https://mikro-orm.io/api/better-sqlite/class/MikroORM.md # MikroORM \ Helper class for bootstrapping the MikroORM. ### Hierarchy * [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md), EM> * *MikroORM* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**config](#config) * [**em](#em) ### Accessors * [**entityGenerator](#entityGenerator) * [**migrator](#migrator) * [**schema](#schema) * [**seeder](#seeder) ### Methods * [**checkConnection](#checkConnection) * [**close](#close) * [**connect](#connect) * [**discoverEntities](#discoverEntities) * [**discoverEntitiesSync](#discoverEntitiesSync) * [**discoverEntity](#discoverEntity) * [**getEntityGenerator](#getEntityGenerator) * [**getMetadata](#getMetadata) * [**getMigrator](#getMigrator) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSeeder](#getSeeder) * [**isConnected](#isConnected) * [**reconnect](#reconnect) * [**init](#init) * [**initSync](#initSync) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L114)constructor * ****new MikroORM**\(options): [BetterSqliteMikroORM](https://mikro-orm.io/api/better-sqlite/class/MikroORM.md)\ - Inherited from MikroORM.constructor #### Parameters * ##### options: [Options](https://mikro-orm.io/api/core.md#Options)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md), EM> | [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md), EM> #### Returns [BetterSqliteMikroORM](https://mikro-orm.io/api/better-sqlite/class/MikroORM.md)\ ## Properties[**](#Properties) ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L16)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md), [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md)> & [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from MikroORM.config ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L15)inheritedem **em: EM Inherited from MikroORM.em The global EntityManager instance. If you are using `RequestContext` helper, it will automatically pick the request specific context under the hood ## Accessors[**](#Accessors) ### [**](#entityGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L322)inheritedentityGenerator * **get entityGenerator(): [IEntityGenerator](https://mikro-orm.io/api/core/interface/IEntityGenerator.md) - Inherited from MikroORM.entityGenerator Shortcut for `orm.getEntityGenerator()` *** #### Returns [IEntityGenerator](https://mikro-orm.io/api/core/interface/IEntityGenerator.md) ### [**](#migrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L315)inheritedmigrator * **get migrator(): [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) - Inherited from MikroORM.migrator Shortcut for `orm.getMigrator()` *** #### Returns [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L301)inheritedschema * **get schema(): ReturnType\\[getSchemaGenerator]> - Inherited from MikroORM.schema Shortcut for `orm.getSchemaGenerator()` *** #### Returns ReturnType\\[getSchemaGenerator]> ### [**](#seeder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L308)inheritedseeder * **get seeder(): [ISeedManager](https://mikro-orm.io/api/core/interface/ISeedManager.md) - Inherited from MikroORM.seeder Shortcut for `orm.getSeeder()` *** #### Returns [ISeedManager](https://mikro-orm.io/api/core/interface/ISeedManager.md) ## Methods[**](#Methods) ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L179)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from MikroORM.checkConnection Checks whether the database connection is active, returns . *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L186)inheritedclose * ****close**(force): Promise\ - Inherited from MikroORM.close Closes the database connection. *** #### Parameters * ##### force: boolean = false #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L137)inheritedconnect * ****connect**(): Promise<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md)> - Inherited from MikroORM.connect Connects to the database. *** #### Returns Promise<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md)> ### [**](#discoverEntities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L223)inheriteddiscoverEntities * ****discoverEntities**(): Promise\ - Inherited from MikroORM.discoverEntities #### Returns Promise\ ### [**](#discoverEntitiesSync)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L228)inheriteddiscoverEntitiesSync * ****discoverEntitiesSync**(): void - Inherited from MikroORM.discoverEntitiesSync #### Returns void ### [**](#discoverEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L244)inheriteddiscoverEntity * ****discoverEntity**\(entities, reset): void - Inherited from MikroORM.discoverEntity Allows dynamically discovering new entity by reference, handy for testing schema diffing. *** #### Parameters * ##### entities: T | T\[] * ##### optionalreset: string | string\[] #### Returns void ### [**](#getEntityGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L280)inheritedgetEntityGenerator * ****getEntityGenerator**\(): T - Inherited from MikroORM.getEntityGenerator Gets the EntityGenerator. *** #### Returns T ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L204)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L209)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L214)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ****getMetadata**\(entityName): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - Inherited from MikroORM.getMetadata Gets the `MetadataStorage`. *** #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getMigrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L287)inheritedgetMigrator * ****getMigrator**\(): T - Inherited from MikroORM.getMigrator Gets the Migrator. *** #### Returns T ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L266)inheritedgetSchemaGenerator * ****getSchemaGenerator**(): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from MikroORM.getSchemaGenerator Gets the SchemaGenerator. *** #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSeeder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L294)inheritedgetSeeder * ****getSeeder**\(): T - Inherited from MikroORM.getSeeder Gets the SeedManager *** #### Returns T ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L172)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from MikroORM.isConnected Checks whether the database connection is active. *** #### Returns Promise\ ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/MikroORM.ts#L160)inheritedreconnect * ****reconnect**(options): Promise\ - Inherited from MikroORM.reconnect Reconnects, possibly to a different database. *** #### Parameters * ##### options: [Options](https://mikro-orm.io/api/core.md#Options) = {} #### Returns Promise\ ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqliteMikroORM.ts#L22)staticinit * ****init**\(options): Promise<[MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)\> - Overrides MikroORM.init Initialize the ORM, load entity metadata, create EntityManager and connect to the database. If you omit the `options` parameter, your CLI config will be used. *** #### Parameters * ##### optionaloptions: [Options](https://mikro-orm.io/api/core.md#Options)\ #### Returns Promise<[MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)\> ### [**](#initSync)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqliteMikroORM.ts#L29)staticinitSync * ****initSync**\(options): [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)\ - Overrides MikroORM.initSync Synchronous variant of the `init` method with some limitations: * database connection will be established when you first interact with the database (or you can use `orm.connect()` explicitly) * no loading of the `config` file, `options` parameter is mandatory * no support for folder based discovery * no check for mismatched package versions *** #### Parameters * ##### options: [Options](https://mikro-orm.io/api/core.md#Options)\ #### Returns [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)\ --- # Source: https://mikro-orm.io/api/core/interface/MikroORMOptions.md # MikroORMOptions \ ### Hierarchy * [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * *MikroORMOptions* ## Index[**](#Index) ### Properties * [**allowGlobalContext](#allowGlobalContext) * [**assign](#assign) * [**autoJoinOneToOneOwner](#autoJoinOneToOneOwner) * [**autoJoinRefsForFilters](#autoJoinRefsForFilters) * [**baseDir](#baseDir) * [**batchSize](#batchSize) * [**charset](#charset) * [**clientUrl](#clientUrl) * [**collate](#collate) * [**colors](#colors) * [**connect](#connect) * [**context](#context) * [**contextName](#contextName) * [**dataloader](#dataloader) * [**dbName](#dbName) * [**debug](#debug) * [**disableIdentityMap](#disableIdentityMap) * [**disableTransactions](#disableTransactions) * [**discovery](#discovery) * [**driver](#driver) * [**driverOptions](#driverOptions) * [**dynamicImportProvider](#dynamicImportProvider) * [**embeddables](#embeddables) * [**ensureDatabase](#ensureDatabase) * [**ensureIndexes](#ensureIndexes) * [**entities](#entities) * [**entitiesTs](#entitiesTs) * [**entityGenerator](#entityGenerator) * [**entityManager](#entityManager) * [**entityRepository](#entityRepository) * [**extensions](#extensions) * [**filters](#filters) * [**filtersOnRelations](#filtersOnRelations) * [**findExactlyOneOrFailHandler](#findExactlyOneOrFailHandler) * [**findOneOrFailHandler](#findOneOrFailHandler) * [**flushMode](#flushMode) * [**forceEntityConstructor](#forceEntityConstructor) * [**forceUndefined](#forceUndefined) * [**forceUtcTimezone](#forceUtcTimezone) * [**hashAlgorithm](#hashAlgorithm) * [**highlighter](#highlighter) * [**host](#host) * [**hydrator](#hydrator) * [**ignoreDeprecations](#ignoreDeprecations) * [**ignoreUndefinedInQuery](#ignoreUndefinedInQuery) * [**implicitTransactions](#implicitTransactions) * [**loadStrategy](#loadStrategy) * [**logger](#logger) * [**loggerFactory](#loggerFactory) * [**metadataCache](#metadataCache) * [**metadataProvider](#metadataProvider) * [**migrations](#migrations) * [**multipleStatements](#multipleStatements) * [**name](#name) * [**namingStrategy](#namingStrategy) * [**onQuery](#onQuery) * [**password](#password) * [**persistOnCreate](#persistOnCreate) * [**pool](#pool) * [**populateAfterFlush](#populateAfterFlush) * [**populateWhere](#populateWhere) * [**port](#port) * [**preferReadReplicas](#preferReadReplicas) * [**preferTs](#preferTs) * [**processOnCreateHooksEarly](#processOnCreateHooksEarly) * [**propagationOnPrototype](#propagationOnPrototype) * [**replicas](#replicas) * [**resultCache](#resultCache) * [**schema](#schema) * [**schemaGenerator](#schemaGenerator) * [**seeder](#seeder) * [**serialization](#serialization) * [**strict](#strict) * [**subscribers](#subscribers) * [**timezone](#timezone) * [**tsNode](#tsNode) * [**upsertManaged](#upsertManaged) * [**useBatchInserts](#useBatchInserts) * [**useBatchUpdates](#useBatchUpdates) * [**user](#user) * [**validate](#validate) * [**validateRequired](#validateRequired) * [**verbose](#verbose) ## Properties[**](#Properties) ### [**](#allowGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L648)allowGlobalContext **allowGlobalContext: boolean ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L618)assign **assign: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ ### [**](#autoJoinOneToOneOwner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L608)autoJoinOneToOneOwner **autoJoinOneToOneOwner: boolean ### [**](#autoJoinRefsForFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L609)autoJoinRefsForFilters **autoJoinRefsForFilters: boolean ### [**](#baseDir)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L666)baseDir **baseDir: string ### [**](#batchSize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L634)batchSize **batchSize: number ### [**](#charset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L522)optionalinheritedcharset **charset? : string Inherited from ConnectionOptions.charset ### [**](#clientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L517)optionalinheritedclientUrl **clientUrl? : string Inherited from ConnectionOptions.clientUrl ### [**](#collate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L523)optionalinheritedcollate **collate? : string Inherited from ConnectionOptions.collate ### [**](#colors)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L651)optionalcolors **colors? : boolean ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L604)connect **connect: boolean ### [**](#context)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L646)context **context: (name) => undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Type declaration * * **(name): undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> - #### Parameters * ##### name: string #### Returns undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> ### [**](#contextName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L647)contextName **contextName: string ### [**](#dataloader)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L637)dataloader **dataloader: boolean | [DataloaderType](https://mikro-orm.io/api/core/enum/DataloaderType.md) ### [**](#dbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L514)optionalinheriteddbName **dbName? : string Inherited from ConnectionOptions.dbName ### [**](#debug)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L655)debug **debug: boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L649)optionaldisableIdentityMap **disableIdentityMap? : boolean ### [**](#disableTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L603)optionaldisableTransactions **disableTransactions? : boolean ### [**](#discovery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L599)discovery **discovery: [MetadataDiscoveryOptions](https://mikro-orm.io/api/core/interface/MetadataDiscoveryOptions.md) ### [**](#driver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L600)optionaldriver **driver? : new (config) => D #### Type declaration * * **new (config): D - #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns D ### [**](#driverOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L526)optionalinheriteddriverOptions **driverOptions? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) Inherited from ConnectionOptions.driverOptions ### [**](#dynamicImportProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L697)dynamicImportProvider **dynamicImportProvider: (id) => Promise\ #### Type declaration * * **(id): Promise\ - #### Parameters * ##### id: string #### Returns Promise\ ### [**](#embeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L676)embeddables **embeddables: { prefixMode: [EmbeddedPrefixMode](https://mikro-orm.io/api/core.md#EmbeddedPrefixMode) } #### Type declaration * ##### prefixMode: [EmbeddedPrefixMode](https://mikro-orm.io/api/core.md#EmbeddedPrefixMode) ### [**](#ensureDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L630)ensureDatabase **ensureDatabase: boolean | [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L631)ensureIndexes **ensureIndexes: boolean ### [**](#entities)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L594)entities **entities: (string | [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\> | [EntityClassGroup](https://mikro-orm.io/api/core.md#EntityClassGroup)\> | [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\)\[] ### [**](#entitiesTs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L595)entitiesTs **entitiesTs: (string | [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\> | [EntityClassGroup](https://mikro-orm.io/api/core.md#EntityClassGroup)\> | [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md)\)\[] ### [**](#entityGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L679)entityGenerator **entityGenerator: [GenerateOptions](https://mikro-orm.io/api/core/interface/GenerateOptions.md) ### [**](#entityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L641)optionalentityManager **entityManager? : [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ ### [**](#entityRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L640)optionalentityRepository **entityRepository? : [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#extensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L596)extensions **extensions: { register: (orm) => void }\[] ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L598)filters **filters: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<{ name? : string } & Omit\> ### [**](#filtersOnRelations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L610)filtersOnRelations **filtersOnRelations: boolean ### [**](#findExactlyOneOrFailHandler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L654)findExactlyOneOrFailHandler **findExactlyOneOrFailHandler: (entityName, where) => Error #### Type declaration * * **(entityName, where): Error - #### Parameters * ##### entityName: string * ##### where: IPrimaryKeyValue | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns Error ### [**](#findOneOrFailHandler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L653)findOneOrFailHandler **findOneOrFailHandler: (entityName, where) => Error #### Type declaration * * **(entityName, where): Error - #### Parameters * ##### entityName: string * ##### where: IPrimaryKeyValue | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns Error ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L639)flushMode **flushMode: always | [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) | commit | auto ### [**](#forceEntityConstructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L621)forceEntityConstructor **forceEntityConstructor: boolean | (string | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\>)\[] ### [**](#forceUndefined)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L622)forceUndefined **forceUndefined: boolean ### [**](#forceUtcTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L628)optionalforceUtcTimezone **forceUtcTimezone? : boolean ### [**](#hashAlgorithm)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L696)hashAlgorithm **hashAlgorithm: md5 | sha256 ### [**](#highlighter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L657)highlighter **highlighter: [Highlighter](https://mikro-orm.io/api/core/interface/Highlighter.md) ### [**](#host)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L518)optionalinheritedhost **host? : string Inherited from ConnectionOptions.host ### [**](#hydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L635)hydrator **hydrator: HydratorConstructor ### [**](#ignoreDeprecations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L656)ignoreDeprecations **ignoreDeprecations: boolean | string\[] ### [**](#ignoreUndefinedInQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L606)optionalignoreUndefinedInQuery **ignoreUndefinedInQuery? : boolean ### [**](#implicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L602)optionalimplicitTransactions **implicitTransactions? : boolean ### [**](#loadStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L636)loadStrategy **loadStrategy: [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced ### [**](#logger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L650)logger **logger: (message) => void #### Type declaration * * **(message): void - #### Parameters * ##### message: string #### Returns void ### [**](#loggerFactory)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L652)optionalloggerFactory **loggerFactory? : (options) => [Logger](https://mikro-orm.io/api/core/interface/Logger.md) #### Type declaration * * **(options): [Logger](https://mikro-orm.io/api/core/interface/Logger.md) - #### Parameters * ##### options: [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) #### Returns [Logger](https://mikro-orm.io/api/core/interface/Logger.md) ### [**](#metadataCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L680)metadataCache **metadataCache: { adapter? : new (...params) => [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md); combined? : string | boolean; enabled? : boolean; options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary); pretty? : boolean } #### Type declaration * ##### optionaladapter?: new (...params) => [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) * * **new (...params): [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) - #### Parameters * ##### rest...params: any\[] #### Returns [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) * ##### optionalcombined?: string | boolean * ##### optionalenabled?: boolean * ##### optionaloptions?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) * ##### optionalpretty?: boolean ### [**](#metadataProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L693)metadataProvider **metadataProvider: new (config) => [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) #### Type declaration * * **new (config): [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) - #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) ### [**](#migrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L667)migrations **migrations: [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) ### [**](#multipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L524)optionalinheritedmultipleStatements **multipleStatements? : boolean Inherited from ConnectionOptions.multipleStatements ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L516)optionalinheritedname **name? : string Inherited from ConnectionOptions.name ### [**](#namingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L601)optionalnamingStrategy **namingStrategy? : new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) #### Type declaration * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#onQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L607)onQuery **onQuery: (sql, params) => string #### Type declaration * * **(sql, params): string - #### Parameters * ##### sql: string * ##### params: unknown\[] #### Returns string ### [**](#password)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L521)optionalinheritedpassword **password? : string | () => [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)\ | [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise)<[DynamicPassword](https://mikro-orm.io/api/core/interface/DynamicPassword.md)> Inherited from ConnectionOptions.password ### [**](#persistOnCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L619)persistOnCreate **persistOnCreate: boolean ### [**](#pool)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L525)optionalinheritedpool **pool? : [PoolConfig](https://mikro-orm.io/api/core/interface/PoolConfig.md) Inherited from ConnectionOptions.pool ### [**](#populateAfterFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L612)populateAfterFlush **populateAfterFlush: boolean ### [**](#populateWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L638)optionalpopulateWhere **populateWhere? : [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) | infer | all ### [**](#port)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L519)optionalinheritedport **port? : number Inherited from ConnectionOptions.port ### [**](#preferReadReplicas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L695)preferReadReplicas **preferReadReplicas: boolean ### [**](#preferTs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L663)optionalpreferTs **preferTs? : 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 and `pathTs` for migrations and seeders. Should be used only for tests and stay disabled for production builds. ### [**](#processOnCreateHooksEarly)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L627)processOnCreateHooksEarly **processOnCreateHooksEarly: boolean Property `onCreate` hooks are normally executed during `flush` operation. With this option, they will be processed early inside `em.create()` method. ### [**](#propagationOnPrototype)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L611)propagationOnPrototype **propagationOnPrototype: boolean ### [**](#replicas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L642)optionalreplicas **replicas? : [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md)\[] ### [**](#resultCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L687)resultCache **resultCache: { adapter? : new (...params) => [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md); expiration? : number; global? : number | boolean | \[string, number]; options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) } #### Type declaration * ##### optionaladapter?: new (...params) => [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) * * **new (...params): [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) - #### Parameters * ##### rest...params: any\[] #### Returns [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) * ##### optionalexpiration?: number * ##### optionalglobal?: number | boolean | \[string, number] * ##### optionaloptions?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L515)optionalinheritedschema **schema? : string Inherited from ConnectionOptions.schema ### [**](#schemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L668)schemaGenerator **schemaGenerator: { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } #### Type declaration * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ### [**](#seeder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L694)seeder **seeder: [SeederOptions](https://mikro-orm.io/api/core/interface/SeederOptions.md) ### [**](#serialization)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L613)serialization **serialization: { forceObject? : boolean; includePrimaryKeys? : boolean } #### Type declaration * ##### optionalforceObject?: boolean Enforce unpopulated references to be returned as objects, e.g. `{ author: { id: 1 } }` instead of `{ author: 1 }`. * ##### optionalincludePrimaryKeys?: boolean ### [**](#strict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L643)strict **strict: boolean ### [**](#subscribers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L597)subscribers **subscribers: ([EventSubscriber](https://mikro-orm.io/api/core/interface/EventSubscriber.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EventSubscriber](https://mikro-orm.io/api/core/interface/EventSubscriber.md)\>)\[] ### [**](#timezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L629)optionaltimezone **timezone? : string ### [**](#tsNode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L665)optionaltsNode **tsNode? : boolean * **@deprecated** use `preferTs` instead ### [**](#upsertManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L620)upsertManaged **upsertManaged: boolean ### [**](#useBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L632)optionaluseBatchInserts **useBatchInserts? : boolean ### [**](#useBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L633)optionaluseBatchUpdates **useBatchUpdates? : boolean ### [**](#user)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L520)optionalinheriteduser **user? : string Inherited from ConnectionOptions.user ### [**](#validate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L644)validate **validate: boolean ### [**](#validateRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L645)validateRequired **validateRequired: boolean ### [**](#verbose)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L605)verbose **verbose: boolean --- # Source: https://mikro-orm.io/api/mongodb/class/MongoConnection.md # MongoConnection ### Hierarchy * [Connection](https://mikro-orm.io/api/core/class/Connection.md) * *MongoConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**aggregate](#aggregate) * [**begin](#begin) * [**bulkUpdateMany](#bulkUpdateMany) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**countDocuments](#countDocuments) * [**createCollection](#createCollection) * [**deleteMany](#deleteMany) * [**dropCollection](#dropCollection) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**find](#find) * [**getClient](#getClient) * [**getClientUrl](#getClientUrl) * [**getCollection](#getCollection) * [**getConnectionOptions](#getConnectionOptions) * [**getDb](#getDb) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getPlatform](#getPlatform) * [**insertMany](#insertMany) * [**insertOne](#insertOne) * [**isConnected](#isConnected) * [**listCollections](#listCollections) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) * [**updateMany](#updateMany) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L49)constructor * ****new MongoConnection**(config, options, type): [MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md) - Overrides Connection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md) ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L239)aggregate * ****aggregate**\(collection, pipeline, ctx, loggerContext): Promise\ - #### Parameters * ##### collection: string * ##### pipeline: any\[] * ##### optionalctx: ClientSession * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L273)begin * ****begin**(options): Promise\ - Overrides Connection.begin #### Parameters * ##### options: { ctx?: ClientSession; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) } & TransactionOptions = {} #### Returns Promise\ ### [**](#bulkUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L231)bulkUpdateMany * ****bulkUpdateMany**\(collection, where, data, ctx, upsert, upsertOptions): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### collection: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: Partial\\[] * ##### optionalctx: ClientSession * ##### optionalupsert: boolean * ##### optionalupsertOptions: [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L92)checkConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Overrides Connection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L78)close * ****close**(force): Promise\ - Overrides Connection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L288)commit * ****commit**(ctx, eventBroadcaster): Promise\ - Overrides Connection.commit #### Parameters * ##### ctx: ClientSession * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L63)connect * ****connect**(): Promise\ - Overrides Connection.connect Establishes connection to database *** #### Returns Promise\ ### [**](#countDocuments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L252)countDocuments * ****countDocuments**\(collection, where, ctx): Promise\ - #### Parameters * ##### collection: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionalctx: ClientSession #### Returns Promise\ ### [**](#createCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L111)createCollection * ****createCollection**\(name): Promise\> - #### Parameters * ##### name: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns Promise\> ### [**](#deleteMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L235)deleteMany * ****deleteMany**\(collection, where, ctx): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### collection: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionalctx: ClientSession #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#dropCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L120)dropCollection * ****dropCollection**(name): Promise\ - #### Parameters * ##### name: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\> #### Returns Promise\ ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from Connection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L170)execute * ****execute**(query): Promise\ - Overrides Connection.execute #### Parameters * ##### query: string #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L174)find * ****find**\(collection, where, orderBy, limit, offset, fields, ctx, loggerContext): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - #### Parameters * ##### collection: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionalorderBy: [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\ | [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\\[] * ##### optionallimit: number * ##### optionaloffset: number * ##### optionalfields: string\[] * ##### optionalctx: ClientSession * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getClient)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L103)getClient * ****getClient**(): MongoClient - #### Returns MongoClient ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L158)getClientUrl * ****getClientUrl**(): string - Overrides Connection.getClientUrl #### Returns string ### [**](#getCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L107)getCollection * ****getCollection**\(name): Collection\ - #### Parameters * ##### name: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns Collection\ ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L128)getConnectionOptions * ****getConnectionOptions**(): MongoClientOptions & [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - Overrides Connection.getConnectionOptions #### Returns MongoClientOptions & [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDb)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L166)getDb * ****getDb**(): Db - #### Returns Db ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L124)getDefaultClientUrl * ****getDefaultClientUrl**(): string - Overrides Connection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from Connection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#insertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L223)insertMany * ****insertMany**\(collection, data, ctx): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### collection: string * ##### data: Partial\\[] * ##### optionalctx: ClientSession #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#insertOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L219)insertOne * ****insertOne**\(collection, data, ctx): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### collection: string * ##### data: Partial\ * ##### optionalctx: ClientSession #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L83)isConnected * ****isConnected**(): Promise\ - Overrides Connection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#listCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L115)listCollections * ****listCollections**(): Promise\ - #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L296)rollback * ****rollback**(ctx, eventBroadcaster): Promise\ - Overrides Connection.rollback #### Parameters * ##### ctx: ClientSession * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from Connection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from Connection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L256)transactional * ****transactional**\(cb, options): Promise\ - Overrides Connection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: ClientSession; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) } & TransactionOptions = {} #### Returns Promise\ ### [**](#updateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoConnection.ts#L227)updateMany * ****updateMany**\(collection, where, data, ctx, upsert, upsertOptions): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - #### Parameters * ##### collection: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: Partial\ * ##### optionalctx: ClientSession * ##### optionalupsert: boolean * ##### optionalupsertOptions: [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> --- # Source: https://mikro-orm.io/api/mongodb/interface/MongoCreateSchemaOptions.md # MongoCreateSchemaOptions ### Hierarchy * [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) * *MongoCreateSchemaOptions* ## Index[**](#Index) ### Properties * [**ensureIndexes](#ensureIndexes) * [**schema](#schema) * [**wrap](#wrap) ## Properties[**](#Properties) ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L265)optionalensureIndexes **ensureIndexes? : boolean create indexes? defaults to true ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L871)optionalinheritedschema **schema? : string Inherited from CreateSchemaOptions.schema ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L870)optionalinheritedwrap **wrap? : boolean Inherited from CreateSchemaOptions.wrap --- # Source: https://mikro-orm.io/api/mongodb/class/MongoDriver.md # MongoDriver ### Hierarchy * [DatabaseDriver](https://mikro-orm.io/api/core/class/DatabaseDriver.md)<[MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md)> * *MongoDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L41)constructor * ****new MongoDriver**(config): [MongoDriver](https://mikro-orm.io/api/mongodb/class/MongoDriver.md) - Overrides DatabaseDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MongoDriver](https://mikro-orm.io/api/mongodb/class/MongoDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L36)\[EntityManagerType] **\[EntityManagerType]: [MongoEntityManager](https://mikro-orm.io/api/mongodb/class/EntityManager.md)<[MongoDriver](https://mikro-orm.io/api/mongodb/class/MongoDriver.md)> Overrides DatabaseDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from DatabaseDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L243)aggregate * ****aggregate**(entityName, pipeline, ctx): Promise\ - Overrides DatabaseDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] * ##### optionalctx: ClientSession #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from DatabaseDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md)> - Inherited from DatabaseDriver.connect #### Returns Promise<[MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from DatabaseDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L126)count * ****count**\(entityName, where, options, ctx): Promise\ - Overrides DatabaseDriver.count #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} * ##### optionalctx: ClientSession #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L85)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from DatabaseDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L45)createEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Overrides DatabaseDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L50)find * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Overrides DatabaseDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L93)findOne * ****findOne**\(entityName, where, options): Promise\> - Overrides DatabaseDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ = ... #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L114)findVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Overrides DatabaseDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md) - Inherited from DatabaseDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from DatabaseDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from DatabaseDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L247)getPlatform * ****getPlatform**(): [MongoPlatform](https://mikro-orm.io/api/mongodb/class/MongoPlatform.md) - Overrides DatabaseDriver.getPlatform #### Returns [MongoPlatform](https://mikro-orm.io/api/mongodb/class/MongoPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L93)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from DatabaseDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### optionalwhere: any * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L463)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from DatabaseDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L116)inheritedmapResult * ****mapResult**\(result, meta, populate): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from DatabaseDriver.mapResult #### Parameters * ##### result: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L233)nativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### options: { ctx?: ClientSession } = {} * ##### optionalctx: ClientSession #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L136)nativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L142)nativeInsertMany * ****nativeInsertMany**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L156)nativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoDriver.ts#L185)nativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides DatabaseDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md)> - Inherited from DatabaseDriver.reconnect #### Returns Promise<[MongoConnection](https://mikro-orm.io/api/mongodb/class/MongoConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from DatabaseDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L97)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from DatabaseDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/class/MongoNamingStrategy.md # MongoNamingStrategy ### Hierarchy * [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) * *MongoNamingStrategy* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**aliasName](#aliasName) * [**classToMigrationName](#classToMigrationName) * [**classToTableName](#classToTableName) * [**columnNameToProperty](#columnNameToProperty) * [**enumValueToEnumProperty](#enumValueToEnumProperty) * [**getClassName](#getClassName) * [**getEntityName](#getEntityName) * [**getEnumClassName](#getEnumClassName) * [**getEnumTypeName](#getEnumTypeName) * [**indexName](#indexName) * [**inverseSideName](#inverseSideName) * [**joinColumnName](#joinColumnName) * [**joinKeyColumnName](#joinKeyColumnName) * [**joinTableName](#joinTableName) * [**propertyToColumnName](#propertyToColumnName) * [**referenceColumnName](#referenceColumnName) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MongoNamingStrategy**(): [MongoNamingStrategy](https://mikro-orm.io/api/core/class/MongoNamingStrategy.md) - Inherited from AbstractNamingStrategy.constructor #### Returns [MongoNamingStrategy](https://mikro-orm.io/api/core/class/MongoNamingStrategy.md) ## Methods[**](#Methods) ### [**](#aliasName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L85)inheritedaliasName * ****aliasName**(entityName, index): string - Inherited from AbstractNamingStrategy.aliasName Returns alias name for given entity. The alias needs to be unique across the query, which is by default ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique. *** #### Parameters * ##### entityName: string * ##### index: number #### Returns string ### [**](#classToMigrationName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L15)inheritedclassToMigrationName * ****classToMigrationName**(timestamp, customMigrationName): string - Inherited from AbstractNamingStrategy.classToMigrationName Return a migration name. This name should allow ordering. *** #### Parameters * ##### timestamp: string * ##### optionalcustomMigrationName: string #### Returns string ### [**](#classToTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L5)classToTableName * ****classToTableName**(entityName): string - Overrides AbstractNamingStrategy.classToTableName Return a table name for an entity class *** #### Parameters * ##### entityName: string #### Returns string ### [**](#columnNameToProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L56)inheritedcolumnNameToProperty * ****columnNameToProperty**(columnName): string - Inherited from AbstractNamingStrategy.columnNameToProperty Return a property for a column name (used in `EntityGenerator`). *** #### Parameters * ##### columnName: string #### Returns string ### [**](#enumValueToEnumProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L81)inheritedenumValueToEnumProperty * ****enumValueToEnumProperty**(enumValue, columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.enumValueToEnumProperty Get an enum option name for a given enum value. *** #### Parameters * ##### enumValue: string The enum value to generate a name for. * ##### columnName: string The column name which has the enum. * ##### tableName: string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string The name of the enum property that will hold the value. ### [**](#getClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L8)inheritedgetClassName * ****getClassName**(file, separator): string - Inherited from AbstractNamingStrategy.getClassName Return a name of the class based on its file name *** #### Parameters * ##### file: string * ##### separator: string = '-' #### Returns string ### [**](#getEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L51)inheritedgetEntityName * ****getEntityName**(tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEntityName Return a name of the entity class based on database table name (used in `EntityGenerator`). Default implementation ignores the schema name. *** #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getEnumClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L67)inheritedgetEnumClassName * ****getEnumClassName**(columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEnumClassName Get an enum class name. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new class name that will be used for the enum. ### [**](#getEnumTypeName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L74)inheritedgetEnumTypeName * ****getEnumTypeName**(columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEnumTypeName Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new type name that will be used for the enum. ### [**](#indexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L25)inheritedindexName * ****indexName**(tableName, columns, type): string - Inherited from AbstractNamingStrategy.indexName Returns key/constraint name for the given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name). *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | check | foreign | sequence #### Returns string ### [**](#inverseSideName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L93)inheritedinverseSideName * ****inverseSideName**(entityName, propertyName, kind): string - Inherited from AbstractNamingStrategy.inverseSideName Returns the name of the inverse side property. Used in the `EntityGenerator` with `bidirectionalRelations` option. *** #### Parameters * ##### entityName: string * ##### propertyName: string * ##### kind: [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) #### Returns string ### [**](#joinColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L9)joinColumnName * ****joinColumnName**(propertyName): string - Overrides AbstractNamingStrategy.joinColumnName Return a join column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#joinKeyColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L13)joinKeyColumnName * ****joinKeyColumnName**(entityName, referencedColumnName): string - Overrides AbstractNamingStrategy.joinKeyColumnName Return the foreign key column name for the given parameters *** #### Parameters * ##### entityName: string * ##### optionalreferencedColumnName: string #### Returns string ### [**](#joinTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L17)joinTableName * ****joinTableName**(sourceEntity, targetEntity, propertyName): string - Overrides AbstractNamingStrategy.joinTableName Return a join table name *** #### Parameters * ##### sourceEntity: string * ##### targetEntity: string * ##### propertyName: string #### Returns string ### [**](#propertyToColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L21)propertyToColumnName * ****propertyToColumnName**(propertyName): string - Overrides AbstractNamingStrategy.propertyToColumnName Return a column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L25)referenceColumnName * ****referenceColumnName**(): string - Overrides AbstractNamingStrategy.referenceColumnName Return the default reference column name *** #### Returns string --- # Source: https://mikro-orm.io/api/mongodb/class/MongoPlatform.md # MongoPlatform ### Hierarchy * [Platform](https://mikro-orm.io/api/core/class/Platform.md) * *MongoPlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getRepositoryClass](#getRepositoryClass) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MongoPlatform**(): [MongoPlatform](https://mikro-orm.io/api/mongodb/class/MongoPlatform.md) - Inherited from Platform.constructor #### Returns [MongoPlatform](https://mikro-orm.io/api/mongodb/class/MongoPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from Platform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from Platform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L109)cloneEmbeddable * ****cloneEmbeddable**\(data): T - Overrides Platform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from Platform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from Platform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from Platform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L97)convertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value): unknown - Overrides Platform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L101)convertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Overrides Platform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L93)convertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Overrides Platform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L77)denormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Overrides Platform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: string | number #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L487)inheritedescape * ****escape**(value): string - Inherited from Platform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from Platform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from Platform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L641)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): void - Inherited from Platform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns void ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from Platform.getArrayDeclarationSQL #### Returns string ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from Platform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from Platform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L208)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from Platform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L232)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from Platform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from Platform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L140)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from Platform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L144)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from Platform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from Platform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from Platform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from Platform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from Platform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from Platform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Platform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L582)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from Platform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from Platform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from Platform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from Platform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from Platform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L248)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from Platform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from Platform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L51)getExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Overrides Platform.getExtension * **@inheritDoc** *** #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L256)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from Platform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from Platform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L376)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(prop): string - Inherited from Platform.getFullTextWhereClause #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L577)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from Platform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L212)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from Platform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from Platform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from Platform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L372)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from Platform.getJsonIndexDefinition #### Parameters * ##### index: { columnNames: string\[] } * ##### columnNames: string\[] #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Platform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from Platform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L37)getNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Overrides Platform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from Platform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from Platform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L41)getRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Overrides Platform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L65)getSchemaGenerator * ****getSchemaGenerator**(driver, em): [MongoSchemaGenerator](https://mikro-orm.io/api/mongodb/class/MongoSchemaGenerator.md) - Overrides Platform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [MongoSchemaGenerator](https://mikro-orm.io/api/mongodb/class/MongoSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L82)inheritedgetSchemaHelper * ****getSchemaHelper**(): unknown - Inherited from Platform.getSchemaHelper #### Returns unknown ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L367)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from Platform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L363)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from Platform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L81)getSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Overrides Platform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from Platform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from Platform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from Platform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from Platform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L224)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from Platform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from Platform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L236)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from Platform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L86)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from Platform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L132)isAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Overrides Platform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from Platform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from Platform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from Platform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from Platform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L200)inheritedisRaw * ****isRaw**(value): boolean - Inherited from Platform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L46)lookupExtensions * ****lookupExtensions**(orm): void - Overrides Platform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L105)marshallArray * ****marshallArray**(values): string - Overrides Platform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L283)inheritednormalizeColumnType * ****normalizeColumnType**(type, options): string - Inherited from Platform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L69)normalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Overrides Platform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ | [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from Platform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from Platform.processDateProperty #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from Platform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L482)inheritedquoteValue * ****quoteValue**(value): string - Inherited from Platform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from Platform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L30)setConfig * ****setConfig**(config): void - Overrides Platform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L116)shouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude): boolean - Overrides Platform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from Platform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from Platform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from Platform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from Platform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from Platform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from Platform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from Platform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from Platform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from Platform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from Platform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from Platform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from Platform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from Platform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L85)usesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Overrides Platform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L89)usesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Overrides Platform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from Platform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L49)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from Platform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L65)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from Platform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoPlatform.ts#L124)validateMetadata * ****validateMetadata**(meta): void - Overrides Platform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/mongodb/class/MongoSchemaGenerator.md # MongoSchemaGenerator ### Hierarchy * [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md)<[MongoDriver](https://mikro-orm.io/api/mongodb/class/MongoDriver.md)> * *MongoSchemaGenerator* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clearDatabase](#clearDatabase) * [**createDatabase](#createDatabase) * [**createSchema](#createSchema) * [**dropDatabase](#dropDatabase) * [**dropIndexes](#dropIndexes) * [**dropSchema](#dropSchema) * [**ensureDatabase](#ensureDatabase) * [**ensureIndexes](#ensureIndexes) * [**execute](#execute) * [**getCreateSchemaSQL](#getCreateSchemaSQL) * [**getDropSchemaSQL](#getDropSchemaSQL) * [**getUpdateSchemaMigrationSQL](#getUpdateSchemaMigrationSQL) * [**getUpdateSchemaSQL](#getUpdateSchemaSQL) * [**refreshDatabase](#refreshDatabase) * [**updateSchema](#updateSchema) * [**register](#register) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L26)constructor * ****new MongoSchemaGenerator**(em): [MongoSchemaGenerator](https://mikro-orm.io/api/mongodb/class/MongoSchemaGenerator.md) - Inherited from AbstractSchemaGenerator.constructor #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> | [MongoDriver](https://mikro-orm.io/api/mongodb/class/MongoDriver.md) #### Returns [MongoSchemaGenerator](https://mikro-orm.io/api/mongodb/class/MongoSchemaGenerator.md) ## Methods[**](#Methods) ### [**](#clearDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L59)inheritedclearDatabase * ****clearDatabase**(options): Promise\ - Inherited from AbstractSchemaGenerator.clearDatabase #### Parameters * ##### optionaloptions: [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) #### Returns Promise\ ### [**](#createDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L106)inheritedcreateDatabase * ****createDatabase**(name): Promise\ - Inherited from AbstractSchemaGenerator.createDatabase creates new database and connects to it *** #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#createSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L21)createSchema * ****createSchema**(options): Promise\ - Overrides AbstractSchemaGenerator.createSchema #### Parameters * ##### options: [MongoCreateSchemaOptions](https://mikro-orm.io/api/mongodb/interface/MongoCreateSchemaOptions.md) = {} #### Returns Promise\ ### [**](#dropDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L110)inheriteddropDatabase * ****dropDatabase**(name): Promise\ - Inherited from AbstractSchemaGenerator.dropDatabase #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#dropIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L76)dropIndexes * ****dropIndexes**(options): Promise\ - #### Parameters * ##### optionaloptions: { collectionsWithFailedIndexes?: string\[]; skipIndexes?: { collection: string; indexName: string }\[] } * ##### optionalcollectionsWithFailedIndexes: string\[] * ##### optionalskipIndexes: { collection: string; indexName: string }\[] #### Returns Promise\ ### [**](#dropSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L46)dropSchema * ****dropSchema**(options): Promise\ - Overrides AbstractSchemaGenerator.dropSchema #### Parameters * ##### options: { dropMigrationsTable?: boolean } = {} * ##### optionaldropMigrationsTable: boolean #### Returns Promise\ ### [**](#ensureDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L66)ensureDatabase * ****ensureDatabase**(): Promise\ - Overrides AbstractSchemaGenerator.ensureDatabase Returns true if the database was created. *** #### Returns Promise\ ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L102)ensureIndexes * ****ensureIndexes**(options): Promise\ - Overrides AbstractSchemaGenerator.ensureIndexes #### Parameters * ##### options: [EnsureIndexesOptions](https://mikro-orm.io/api/mongodb/interface/EnsureIndexesOptions.md) = {} #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L114)inheritedexecute * ****execute**(query): Promise\ - Inherited from AbstractSchemaGenerator.execute #### Parameters * ##### query: string #### Returns Promise\ ### [**](#getCreateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L79)inheritedgetCreateSchemaSQL * ****getCreateSchemaSQL**(options): Promise\ - Inherited from AbstractSchemaGenerator.getCreateSchemaSQL #### Parameters * ##### optionaloptions: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) #### Returns Promise\ ### [**](#getDropSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L87)inheritedgetDropSchemaSQL * ****getDropSchemaSQL**(options): Promise\ - Inherited from AbstractSchemaGenerator.getDropSchemaSQL #### Parameters * ##### optionaloptions: Omit<[DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md), dropDb> #### Returns Promise\ ### [**](#getUpdateSchemaMigrationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L99)inheritedgetUpdateSchemaMigrationSQL * ****getUpdateSchemaMigrationSQL**(options): Promise<{ down: string; up: string }> - Inherited from AbstractSchemaGenerator.getUpdateSchemaMigrationSQL #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise<{ down: string; up: string }> ### [**](#getUpdateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L95)inheritedgetUpdateSchemaSQL * ****getUpdateSchemaSQL**(options): Promise\ - Inherited from AbstractSchemaGenerator.getUpdateSchemaSQL #### Parameters * ##### optionaloptions: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ #### Returns Promise\ ### [**](#refreshDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L70)refreshDatabase * ****refreshDatabase**(options): Promise\ - Overrides AbstractSchemaGenerator.refreshDatabase #### Parameters * ##### options: [MongoCreateSchemaOptions](https://mikro-orm.io/api/mongodb/interface/MongoCreateSchemaOptions.md) = {} #### Returns Promise\ ### [**](#updateSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L62)updateSchema * ****updateSchema**(options): Promise\ - Overrides AbstractSchemaGenerator.updateSchema #### Parameters * ##### options: [MongoCreateSchemaOptions](https://mikro-orm.io/api/mongodb/interface/MongoCreateSchemaOptions.md) = {} #### Returns Promise\ ### [**](#register)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mongodb/src/MongoSchemaGenerator.ts#L17)staticregister * ****register**(orm): void - #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void --- # Source: https://mikro-orm.io/api/mssql/class/MsSqlConnection.md # MsSqlConnection ### Hierarchy * [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * *MsSqlConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new MsSqlConnection**(config, options, type): [MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md) - Inherited from AbstractSqlConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from AbstractSqlConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from AbstractSqlConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L42)inheritedconnect * ****connect**(): void | Promise\ - Inherited from AbstractSqlConnection.connect Establishes connection to database *** #### Returns void | Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlConnection.ts#L11)createKnex * ****createKnex**(): void - Overrides AbstractSqlConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from AbstractSqlConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L118)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from AbstractSqlConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlConnection.ts#L20)getConnectionOptions * ****getConnectionOptions**(): MsSqlConnectionConfig - Overrides AbstractSqlConnection.getConnectionOptions #### Returns MsSqlConnectionConfig ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlConnection.ts#L16)getDefaultClientUrl * ****getDefaultClientUrl**(): string - Overrides AbstractSqlConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from AbstractSqlConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from AbstractSqlConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from AbstractSqlConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L197)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from AbstractSqlConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from AbstractSqlConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from AbstractSqlConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/mssql/class/MsSqlDriver.md # MsSqlDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md)> * *MsSqlDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlDriver.ts#L22)constructor * ****new MsSqlDriver**(config): [MsSqlDriver](https://mikro-orm.io/api/mssql/class/MsSqlDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MsSqlDriver](https://mikro-orm.io/api/mssql/class/MsSqlDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[MsSqlDriver](https://mikro-orm.io/api/mssql/class/MsSqlDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlDriver.ts#L26)nativeInsertMany * ****nativeInsertMany**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L720)inheritednativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[MsSqlConnection](https://mikro-orm.io/api/mssql/class/MsSqlConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/mssql/class/MsSqlExceptionConverter.md # MsSqlExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *MsSqlExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MsSqlExceptionConverter**(): [MsSqlExceptionConverter](https://mikro-orm.io/api/mssql/class/MsSqlExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [MsSqlExceptionConverter](https://mikro-orm.io/api/mssql/class/MsSqlExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlExceptionConverter.ts#L21)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/MsSqlKnexDialect.md # MsSqlKnexDialect ### Hierarchy * MsSqlDialect * *MsSqlKnexDialect* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**columnCompiler](#columnCompiler) * [**queryCompiler](#queryCompiler) * [**tableCompiler](#tableCompiler) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MsSqlKnexDialect**(): [MsSqlKnexDialect](https://mikro-orm.io/api/knex/class/MsSqlKnexDialect.md) - Inherited from MonkeyPatchable.MsSqlDialect.constructor #### Returns [MsSqlKnexDialect](https://mikro-orm.io/api/knex/class/MsSqlKnexDialect.md) ## Methods[**](#Methods) ### [**](#columnCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mssql/MsSqlKnexDialect.ts#L13)columnCompiler * ****columnCompiler**(): any - #### Returns any ### [**](#queryCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mssql/MsSqlKnexDialect.ts#L18)queryCompiler * ****queryCompiler**(): any - #### Returns any ### [**](#tableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mssql/MsSqlKnexDialect.ts#L8)tableCompiler * ****tableCompiler**(): any - #### Returns any --- # Source: https://mikro-orm.io/api/mssql/class/MsSqlPlatform.md # MsSqlPlatform ### Hierarchy * [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) * *MsSqlPlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**init](#init) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MsSqlPlatform**(): [MsSqlPlatform](https://mikro-orm.io/api/mssql/class/MsSqlPlatform.md) - Inherited from AbstractSqlPlatform.constructor #### Returns [MsSqlPlatform](https://mikro-orm.io/api/mssql/class/MsSqlPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L256)allowsComparingTuples * ****allowsComparingTuples**(): boolean - Overrides AbstractSqlPlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from AbstractSqlPlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from AbstractSqlPlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L55)convertDateToJSValue * ****convertDateToJSValue**(value): string - Overrides AbstractSqlPlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from AbstractSqlPlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from AbstractSqlPlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L64)convertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Overrides AbstractSqlPlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from AbstractSqlPlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L235)escape * ****escape**(value): string - Overrides AbstractSqlPlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from AbstractSqlPlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from AbstractSqlPlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from AbstractSqlPlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L37)inheritedgetBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Inherited from AbstractSqlPlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L105)getBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L97)getBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L232)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from AbstractSqlPlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L76)getCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Overrides AbstractSqlPlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### length: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L80)getDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from AbstractSqlPlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L85)getDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Overrides AbstractSqlPlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L144)getDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Overrides AbstractSqlPlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L582)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from AbstractSqlPlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L173)getDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Overrides AbstractSqlPlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L93)getDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L121)getEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from AbstractSqlPlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from AbstractSqlPlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L89)getFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from AbstractSqlPlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L376)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(prop): string - Inherited from AbstractSqlPlatform.getFullTextWhereClause #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L577)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from AbstractSqlPlatform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L212)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L109)getJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L100)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from AbstractSqlPlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from AbstractSqlPlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from AbstractSqlPlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L101)getRegExpOperator * ****getRegExpOperator**(): string - Overrides AbstractSqlPlatform.getRegExpOperator #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from AbstractSqlPlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from AbstractSqlPlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L43)getRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Overrides AbstractSqlPlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L47)getSavepointSQL * ****getSavepointSQL**(savepointName): string - Overrides AbstractSqlPlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L252)getSchemaGenerator * ****getSchemaGenerator**(driver, em): MsSqlSchemaGenerator - Overrides AbstractSqlPlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)>> #### Returns MsSqlSchemaGenerator ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from AbstractSqlPlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L196)getSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Overrides AbstractSqlPlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from AbstractSqlPlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from AbstractSqlPlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from AbstractSqlPlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from AbstractSqlPlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L224)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L177)getUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L113)getVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L68)indexForeignKeys * ****indexForeignKeys**(): boolean - Overrides AbstractSqlPlatform.indexForeignKeys #### Returns boolean ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L37)init * ****init**(orm): void - Overrides AbstractSqlPlatform.init * **@inheritDoc** *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from AbstractSqlPlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from AbstractSqlPlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from AbstractSqlPlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from AbstractSqlPlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from AbstractSqlPlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from AbstractSqlPlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L32)lookupExtensions * ****lookupExtensions**(orm): void - Overrides AbstractSqlPlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from AbstractSqlPlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L130)normalizeColumnType * ****normalizeColumnType**(type, options): string - Overrides AbstractSqlPlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L214)normalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Overrides AbstractSqlPlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from AbstractSqlPlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from AbstractSqlPlatform.processDateProperty #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L231)quoteIdentifier * ****quoteIdentifier**(id): string - Overrides AbstractSqlPlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * ##### toString: () => string #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L65)inheritedquoteValue * ****quoteValue**(value): string - Inherited from AbstractSqlPlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from AbstractSqlPlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from AbstractSqlPlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from AbstractSqlPlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from AbstractSqlPlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from AbstractSqlPlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from AbstractSqlPlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L223)supportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Overrides AbstractSqlPlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L227)supportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Overrides AbstractSqlPlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from AbstractSqlPlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L72)supportsSchemas * ****supportsSchemas**(): boolean - Overrides AbstractSqlPlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from AbstractSqlPlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from AbstractSqlPlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from AbstractSqlPlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from AbstractSqlPlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from AbstractSqlPlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from AbstractSqlPlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from AbstractSqlPlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from AbstractSqlPlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from AbstractSqlPlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L51)usesOutputStatement * ****usesOutputStatement**(): boolean - Overrides AbstractSqlPlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from AbstractSqlPlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L65)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from AbstractSqlPlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlPlatform.ts#L181)validateMetadata * ****validateMetadata**(meta): void - Overrides AbstractSqlPlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/mssql/class/MsSqlSchemaHelper.md # MsSqlSchemaHelper ### Hierarchy * [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) * *MsSqlSchemaHelper* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**DEFAULT\_VALUES](#DEFAULT_VALUES) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAllChecks](#getAllChecks) * [**getAllColumns](#getAllColumns) * [**getAllForeignKeys](#getAllForeignKeys) * [**getAllIndexes](#getAllIndexes) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**handleMultilineComment](#handleMultilineComment) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new MsSqlSchemaHelper**(platform): [MsSqlSchemaHelper](https://mikro-orm.io/api/mssql/class/MsSqlSchemaHelper.md) - Inherited from SchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [MsSqlSchemaHelper](https://mikro-orm.io/api/mssql/class/MsSqlSchemaHelper.md) ## Properties[**](#Properties) ### [**](#DEFAULT_VALUES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L24)staticreadonlyDEFAULT\_VALUES **DEFAULT\_VALUES: { false: string\[]; getdate(): string\[]; true: string\[] } = ... #### Type declaration * ##### false: string\[] * ##### getdate(): string\[] * ##### true: string\[] ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from SchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from SchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from SchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from SchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from SchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from SchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from SchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from SchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from SchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L427)createTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Overrides SchemaHelper.createTableColumn #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L353)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from SchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L34)disableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Overrides SchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from SchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L38)enableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Overrides SchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from SchemaHelper.finalizeTable #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAllChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L281)getAllChecks * ****getAllChecks**(connection, tablesBySchemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> ### [**](#getAllColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L82)getAllColumns * ****getAllColumns**(connection, tablesBySchemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> ### [**](#getAllForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L211)getAllForeignKeys * ****getAllForeignKeys**(connection, tablesBySchemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> ### [**](#getAllIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L156)getAllIndexes * ****getAllIndexes**(connection, tablesBySchemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from SchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from SchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L533)optionalinheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from SchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L236)inheritedgetChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Inherited from SchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L252)inheritedgetChecks * ****getChecks**(connection, tableName, schemaName, columns): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Inherited from SchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string * ##### optionalcolumns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L244)inheritedgetColumns * ****getColumns**(connection, tableName, schemaName): Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> - Inherited from SchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L318)inheritedgetCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Inherited from SchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from SchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L386)getCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Overrides SchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from SchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L42)getDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Overrides SchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from SchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from SchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L398)getDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Overrides SchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L323)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from SchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L394)getDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Overrides SchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L390)getDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Overrides SchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from SchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L240)getEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Overrides SchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### optionaltableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from SchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L271)inheritedgetForeignKeysSQL * ****getForeignKeysSQL**(tableName, schemaName): string - Inherited from SchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L248)inheritedgetIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Inherited from SchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L46)getListTablesSQL * ****getListTablesSQL**(): string - Overrides SchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L30)getManagementDbName * ****getManagementDbName**(): string - Overrides SchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L54)getNamespaces * ****getNamespaces**(connection): Promise\ - Overrides SchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L363)getPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Overrides SchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L321)getPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Overrides SchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L52)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from SchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] = \[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from SchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L419)getRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - Overrides SchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L151)inheritedgetRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Inherited from SchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L20)inheritedgetSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Inherited from SchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from SchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from SchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#handleMultilineComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L473)handleMultilineComment * ****handleMultilineComment**(comment): string - Overrides SchemaHelper.handleMultilineComment MSSQL supports `\n` in SQL and stores `\\n` literally. This method overrides the parent behavior to prevent replacing `\n` with `\\n`. *** #### Parameters * ##### comment: string #### Returns string ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from SchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L450)inferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Overrides SchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L300)loadInformationSchema * ****loadInformationSchema**(schema, connection, tables): Promise\ - Overrides SchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L200)mapForeignKeys * ****mapForeignKeys**(fks, tableName, schemaName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Overrides SchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/MsSqlSchemaHelper.ts#L60)normalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length, defaultValues, stripQuotes): string | number - Overrides SchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### length: number * ##### defaultValues: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ = {} * ##### stripQuotes: boolean = false #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from SchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from SchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L48)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from SchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/knex/class/MySqlConnection.md # MySqlConnection ### Hierarchy * [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * *MySqlConnection* * [MariaDbConnection](https://mikro-orm.io/api/mariadb/class/MariaDbConnection.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new MySqlConnection**(config, options, type): [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) - Inherited from AbstractSqlConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from AbstractSqlConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from AbstractSqlConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L42)inheritedconnect * ****connect**(): void | Promise\ - Inherited from AbstractSqlConnection.connect Establishes connection to database *** #### Returns void | Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlConnection.ts#L7)createKnex * ****createKnex**(): void - Overrides AbstractSqlConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from AbstractSqlConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L118)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from AbstractSqlConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlConnection.ts#L16)getConnectionOptions * ****getConnectionOptions**(): MySqlConnectionConfig - Overrides AbstractSqlConnection.getConnectionOptions #### Returns MySqlConnectionConfig ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlConnection.ts#L12)getDefaultClientUrl * ****getDefaultClientUrl**(): string - Overrides AbstractSqlConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from AbstractSqlConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from AbstractSqlConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from AbstractSqlConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L197)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from AbstractSqlConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from AbstractSqlConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from AbstractSqlConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/mysql/class/MySqlDriver.md # MySqlDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md), [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md)> * *MySqlDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mysql/src/MySqlDriver.ts#L19)constructor * ****new MySqlDriver**(config): [MySqlDriver](https://mikro-orm.io/api/mysql/class/MySqlDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [MySqlDriver](https://mikro-orm.io/api/mysql/class/MySqlDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[MySqlDriver](https://mikro-orm.io/api/mysql/class/MySqlDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mysql/src/MySqlDriver.ts#L40)nativeInsertMany * ****nativeInsertMany**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mysql/src/MySqlDriver.ts#L52)nativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/knex/class/MySqlExceptionConverter.md # MySqlExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *MySqlExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MySqlExceptionConverter**(): [MySqlExceptionConverter](https://mikro-orm.io/api/knex/class/MySqlExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [MySqlExceptionConverter](https://mikro-orm.io/api/knex/class/MySqlExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlExceptionConverter.ts#L15)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@link** * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/MySqlKnexDialect.md # MySqlKnexDialect ### Hierarchy * MySqlDialect * *MySqlKnexDialect* * [MariaDbKnexDialect](https://mikro-orm.io/api/knex/class/MariaDbKnexDialect.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**columnCompiler](#columnCompiler) * [**queryCompiler](#queryCompiler) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MySqlKnexDialect**(): [MySqlKnexDialect](https://mikro-orm.io/api/knex/class/MySqlKnexDialect.md) - Inherited from MonkeyPatchable.MySqlDialect.constructor #### Returns [MySqlKnexDialect](https://mikro-orm.io/api/knex/class/MySqlKnexDialect.md) ## Methods[**](#Methods) ### [**](#columnCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlKnexDialect.ts#L12)columnCompiler * ****columnCompiler**(): any - #### Returns any ### [**](#queryCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlKnexDialect.ts#L7)queryCompiler * ****queryCompiler**(): any - #### Returns any --- # Source: https://mikro-orm.io/api/knex/class/MySqlPlatform.md # MySqlPlatform ### Hierarchy * [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) * *MySqlPlatform* * [MariaDbPlatform](https://mikro-orm.io/api/mariadb/class/MariaDbPlatform.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new MySqlPlatform**(): [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) - Inherited from AbstractSqlPlatform.constructor #### Returns [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from AbstractSqlPlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from AbstractSqlPlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from AbstractSqlPlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from AbstractSqlPlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from AbstractSqlPlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from AbstractSqlPlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L52)convertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Overrides AbstractSqlPlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L388)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from AbstractSqlPlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from AbstractSqlPlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L81)inheritedescape * ****escape**(value): string - Inherited from AbstractSqlPlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from AbstractSqlPlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from AbstractSqlPlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from AbstractSqlPlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L32)getBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Overrides AbstractSqlPlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L72)getBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L232)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from AbstractSqlPlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L140)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from AbstractSqlPlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L144)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L28)getDefaultCharset * ****getDefaultCharset**(): string - Overrides AbstractSqlPlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from AbstractSqlPlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L86)getDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Overrides AbstractSqlPlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L121)getDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Overrides AbstractSqlPlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from AbstractSqlPlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L248)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from AbstractSqlPlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from AbstractSqlPlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L256)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L133)getFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Overrides AbstractSqlPlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L129)getFullTextWhereClause * ****getFullTextWhereClause**(): string - Overrides AbstractSqlPlatform.getFullTextWhereClause #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L106)getIndexName * ****getIndexName**(tableName, columns, type): string - Overrides AbstractSqlPlatform.getIndexName Returns the default name of index for the given columns cannot go past 64 character length for identifiers in MySQL *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L212)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L60)getJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Overrides AbstractSqlPlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from AbstractSqlPlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from AbstractSqlPlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from AbstractSqlPlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from AbstractSqlPlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from AbstractSqlPlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from AbstractSqlPlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from AbstractSqlPlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from AbstractSqlPlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from AbstractSqlPlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from AbstractSqlPlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from AbstractSqlPlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from AbstractSqlPlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L224)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L236)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from AbstractSqlPlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from AbstractSqlPlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from AbstractSqlPlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L94)isNumericColumn * ****isNumericColumn**(mappedType): boolean - Overrides AbstractSqlPlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from AbstractSqlPlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from AbstractSqlPlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from AbstractSqlPlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from AbstractSqlPlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from AbstractSqlPlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L76)normalizeColumnType * ****normalizeColumnType**(type, options): string - Overrides AbstractSqlPlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from AbstractSqlPlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from AbstractSqlPlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from AbstractSqlPlatform.processDateProperty #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from AbstractSqlPlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L65)inheritedquoteValue * ****quoteValue**(value): string - Inherited from AbstractSqlPlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from AbstractSqlPlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from AbstractSqlPlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from AbstractSqlPlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L125)supportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Overrides AbstractSqlPlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from AbstractSqlPlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from AbstractSqlPlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from AbstractSqlPlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from AbstractSqlPlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from AbstractSqlPlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)inheritedsupportsSchemas * ****supportsSchemas**(): boolean - Inherited from AbstractSqlPlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from AbstractSqlPlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L98)supportsUnsigned * ****supportsUnsigned**(): boolean - Overrides AbstractSqlPlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from AbstractSqlPlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from AbstractSqlPlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from AbstractSqlPlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from AbstractSqlPlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from AbstractSqlPlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from AbstractSqlPlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from AbstractSqlPlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from AbstractSqlPlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from AbstractSqlPlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L65)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from AbstractSqlPlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from AbstractSqlPlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md # MySqlSchemaHelper ### Hierarchy * [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) * *MySqlSchemaHelper* * [MariaDbSchemaHelper](https://mikro-orm.io/api/mariadb/class/MariaDbSchemaHelper.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**DEFAULT\_VALUES](#DEFAULT_VALUES) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAllChecks](#getAllChecks) * [**getAllColumns](#getAllColumns) * [**getAllEnumDefinitions](#getAllEnumDefinitions) * [**getAllForeignKeys](#getAllForeignKeys) * [**getAllIndexes](#getAllIndexes) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new MySqlSchemaHelper**(platform): [MySqlSchemaHelper](https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md) - Inherited from SchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [MySqlSchemaHelper](https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md) ## Properties[**](#Properties) ### [**](#DEFAULT_VALUES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L13)staticreadonlyDEFAULT\_VALUES **DEFAULT\_VALUES: { 0: string\[]; current\_timestamp(?): string\[]; now(): string\[] } = ... #### Type declaration * ##### 0: string\[] * ##### current\_timestamp(?): string\[] * ##### now(): string\[] ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from SchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from SchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from SchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L248)configureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Overrides SchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from SchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from SchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from SchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from SchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from SchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L222)createTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Overrides SchemaHelper.createTableColumn #### Parameters * ##### table: [MySqlTableBuilder](https://mikro-orm.io/api/knex/interface/MySqlTableBuilder.md) * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L353)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from SchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L27)disableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Overrides SchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from SchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L31)enableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Overrides SchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L35)finalizeTable * ****finalizeTable**(table, charset, collate): void - Overrides SchemaHelper.finalizeTable #### Parameters * ##### table: CreateTableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAllChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L156)getAllChecks * ****getAllChecks**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> ### [**](#getAllColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L101)getAllColumns * ****getAllColumns**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> ### [**](#getAllEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L317)getAllEnumDefinitions * ****getAllEnumDefinitions**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\>> ### [**](#getAllForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L180)getAllForeignKeys * ****getAllForeignKeys**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> ### [**](#getAllIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L67)getAllIndexes * ****getAllIndexes**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from SchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from SchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L533)optionalinheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from SchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L285)getChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Overrides SchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L353)getChecks * ****getChecks**(connection, tableName, schemaName, columns): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Overrides SchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### schemaName: string * ##### optionalcolumns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L365)getColumns * ****getColumns**(connection, tableName, schemaName): Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> - Overrides SchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L318)inheritedgetCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Inherited from SchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from SchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from SchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from SchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)inheritedgetDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Inherited from SchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from SchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from SchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L155)inheritedgetDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Inherited from SchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L323)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from SchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from SchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from SchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from SchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L359)getEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Overrides SchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from SchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L310)getForeignKeysSQL * ****getForeignKeysSQL**(tableName, schemaName): string - Overrides SchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L371)getIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Overrides SchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L44)getListTablesSQL * ****getListTablesSQL**(): string - Overrides SchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L345)inheritedgetManagementDbName * ****getManagementDbName**(): string - Inherited from SchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)inheritedgetNamespaces * ****getNamespaces**(connection): Promise\ - Inherited from SchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)inheritedgetPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Inherited from SchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L206)getPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Overrides SchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L52)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from SchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] = \[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from SchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L269)getRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to): string - Overrides SchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L277)getRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Overrides SchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L19)getSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Overrides SchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from SchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from SchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from SchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inheritedinferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Inherited from SchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L48)loadInformationSchema * ****loadInformationSchema**(schema, connection, tables): Promise\ - Overrides SchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L275)inheritedmapForeignKeys * ****mapForeignKeys**(fks, tableName, schemaName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from SchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L376)normalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length): string | number - Overrides SchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### length: number #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from SchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from SchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L48)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from SchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/knex/interface/MySqlTableBuilder.md # MySqlTableBuilder ### Hierarchy * TableBuilder * *MySqlTableBuilder* ## Index[**](#Index) ### Methods * [**bigIncrements](#bigIncrements) * [**bigint](#bigint) * [**bigInteger](#bigInteger) * [**binary](#binary) * [**boolean](#boolean) * [**check](#check) * [**comment](#comment) * [**date](#date) * [**datetime](#datetime) * [**dateTime](#dateTime) * [**decimal](#decimal) * [**double](#double) * [**dropChecks](#dropChecks) * [**dropColumn](#dropColumn) * [**dropColumns](#dropColumns) * [**dropForeign](#dropForeign) * [**dropIndex](#dropIndex) * [**dropNullable](#dropNullable) * [**dropPrimary](#dropPrimary) * [**dropTimestamps](#dropTimestamps) * [**dropUnique](#dropUnique) * [**enu](#enu) * [**enum](#enum) * [**float](#float) * [**foreign](#foreign) * [**geography](#geography) * [**geometry](#geometry) * [**increments](#increments) * [**index](#index) * [**integer](#integer) * [**json](#json) * [**jsonb](#jsonb) * [**mediumint](#mediumint) * [**point](#point) * [**primary](#primary) * [**queryContext](#queryContext) * [**renameColumn](#renameColumn) * [**setNullable](#setNullable) * [**smallint](#smallint) * [**specificType](#specificType) * [**string](#string) * [**text](#text) * [**time](#time) * [**timestamp](#timestamp) * [**timestamps](#timestamps) * [**tinyint](#tinyint) * [**unique](#unique) * [**uuid](#uuid) ## Methods[**](#Methods) ### [**](#bigIncrements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L217)bigIncrements * ****bigIncrements**(columnName, options): ColumnBuilder - Overrides Knex.TableBuilder.bigIncrements #### Parameters * ##### optionalcolumnName: string * ##### optionaloptions: [MySqlIncrementOptions](https://mikro-orm.io/api/knex.md#MySqlIncrementOptions) #### Returns ColumnBuilder ### [**](#bigint)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2436)inheritedbigint * ****bigint**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.bigint #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#bigInteger)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2437)inheritedbigInteger * ****bigInteger**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.bigInteger #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#binary)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2491)inheritedbinary * ****binary**(columnName, length): ColumnBuilder - Inherited from Knex.TableBuilder.binary #### Parameters * ##### columnName: string * ##### optionallength: number #### Returns ColumnBuilder ### [**](#boolean)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2455)inheritedboolean * ****boolean**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.boolean #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#check)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2558)inheritedcheck * ****check**(checkPredicate, bindings, constraintName): TableBuilder - Inherited from Knex.TableBuilder.check #### Parameters * ##### checkPredicate: string * ##### optionalbindings: Record\ * ##### optionalconstraintName: string #### Returns TableBuilder ### [**](#comment)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2508)inheritedcomment * ****comment**(val): void - Inherited from Knex.TableBuilder.comment #### Parameters * ##### val: string #### Returns void ### [**](#date)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2456)inheriteddate * ****date**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.date #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#datetime)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2461)inheriteddatetime * ****datetime**(columnName, options): ColumnBuilder - Inherited from Knex.TableBuilder.datetime #### Parameters * ##### columnName: string * ##### optionaloptions: Readonly<{ precision?: number; useTz?: boolean }> #### Returns ColumnBuilder ### [**](#dateTime)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2457)inheriteddateTime * ****dateTime**(columnName, options): ColumnBuilder - Inherited from Knex.TableBuilder.dateTime #### Parameters * ##### columnName: string * ##### optionaloptions: Readonly<{ precision?: number; useTz?: boolean }> #### Returns ColumnBuilder ### [**](#decimal)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2450)inheriteddecimal * ****decimal**(columnName, precision, scale): ColumnBuilder - Inherited from Knex.TableBuilder.decimal #### Parameters * ##### columnName: string * ##### optionalprecision: null | number * ##### optionalscale: number #### Returns ColumnBuilder ### [**](#double)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2445)inheriteddouble * ****double**(columnName, precision, scale): ColumnBuilder - Inherited from Knex.TableBuilder.double #### Parameters * ##### columnName: string * ##### optionalprecision: number * ##### optionalscale: number #### Returns ColumnBuilder ### [**](#dropChecks)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2577)inheriteddropChecks * ****dropChecks**(checkConstraintNames): TableBuilder - Inherited from Knex.TableBuilder.dropChecks #### Parameters * ##### checkConstraintNames: string | string\[] #### Returns TableBuilder ### [**](#dropColumn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2429)inheriteddropColumn * ****dropColumn**(columnName): TableBuilder - Inherited from Knex.TableBuilder.dropColumn #### Parameters * ##### columnName: string #### Returns TableBuilder ### [**](#dropColumns)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2430)inheriteddropColumns * ****dropColumns**(...columnNames): TableBuilder - Inherited from Knex.TableBuilder.dropColumns #### Parameters * ##### rest...columnNames: string\[] #### Returns TableBuilder ### [**](#dropForeign)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2563)inheriteddropForeign * ****dropForeign**(columnNames, foreignKeyName): TableBuilder - Inherited from Knex.TableBuilder.dropForeign #### Parameters * ##### columnNames: string | readonly string\[] * ##### optionalforeignKeyName: string #### Returns TableBuilder ### [**](#dropIndex)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2572)inheriteddropIndex * ****dropIndex**(columnNames, indexName): TableBuilder - Inherited from Knex.TableBuilder.dropIndex #### Parameters * ##### columnNames: string | readonly (string | Raw\)\[] * ##### optionalindexName: string #### Returns TableBuilder ### [**](#dropNullable)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2537)inheriteddropNullable * ****dropNullable**(column): TableBuilder - Inherited from Knex.TableBuilder.dropNullable #### Parameters * ##### column: string #### Returns TableBuilder ### [**](#dropPrimary)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2571)inheriteddropPrimary * ****dropPrimary**(constraintName): TableBuilder - Inherited from Knex.TableBuilder.dropPrimary #### Parameters * ##### optionalconstraintName: string #### Returns TableBuilder ### [**](#dropTimestamps)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2576)inheriteddropTimestamps * ****dropTimestamps**(useCamelCase): TableBuilder - Inherited from Knex.TableBuilder.dropTimestamps #### Parameters * ##### optionaluseCamelCase: boolean #### Returns TableBuilder ### [**](#dropUnique)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2567)inheriteddropUnique * ****dropUnique**(columnNames, indexName): TableBuilder - Inherited from Knex.TableBuilder.dropUnique #### Parameters * ##### columnNames: readonly (string | Raw\)\[] * ##### optionalindexName: string #### Returns TableBuilder ### [**](#enu)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2497)inheritedenu * ****enu**(columnName, values, options): ColumnBuilder - Inherited from Knex.TableBuilder.enu #### Parameters * ##### columnName: string * ##### values: null | readonly Value\[] * ##### optionaloptions: EnumOptions #### Returns ColumnBuilder ### [**](#enum)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2492)inheritedenum * ****enum**(columnName, values, options): ColumnBuilder - Inherited from Knex.TableBuilder.enum #### Parameters * ##### columnName: string * ##### values: null | readonly Value\[] * ##### optionaloptions: EnumOptions #### Returns ColumnBuilder ### [**](#float)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2440)inheritedfloat * ****float**(columnName, precision, scale): ColumnBuilder - Inherited from Knex.TableBuilder.float #### Parameters * ##### columnName: string * ##### optionalprecision: number * ##### optionalscale: number #### Returns ColumnBuilder ### [**](#foreign)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2553)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2554)inheritedforeign * ****foreign**(column, foreignKeyName): ForeignConstraintBuilder * ****foreign**(columns, foreignKeyName): MultikeyForeignConstraintBuilder - Inherited from Knex.TableBuilder.foreign #### Parameters * ##### column: string * ##### optionalforeignKeyName: string #### Returns ForeignConstraintBuilder ### [**](#geography)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2489)inheritedgeography * ****geography**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.geography #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#geometry)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2488)inheritedgeometry * ****geometry**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.geometry #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#increments)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L216)increments * ****increments**(columnName, options): ColumnBuilder - Overrides Knex.TableBuilder.increments #### Parameters * ##### optionalcolumnName: string * ##### optionaloptions: [MySqlIncrementOptions](https://mikro-orm.io/api/knex.md#MySqlIncrementOptions) #### Returns ColumnBuilder ### [**](#index)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2522)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2527)inheritedindex * ****index**(columnNames, indexName, indexType): TableBuilder * ****index**(columnNames, indexName, options): TableBuilder - Inherited from Knex.TableBuilder.index #### Parameters * ##### columnNames: string | readonly (string | Raw\)\[] * ##### optionalindexName: string * ##### optionalindexType: string #### Returns TableBuilder ### [**](#integer)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2432)inheritedinteger * ****integer**(columnName, length): ColumnBuilder - Inherited from Knex.TableBuilder.integer #### Parameters * ##### columnName: string * ##### optionallength: number #### Returns ColumnBuilder ### [**](#json)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2502)inheritedjson * ****json**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.json #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#jsonb)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2503)inheritedjsonb * ****jsonb**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.jsonb #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#mediumint)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2435)inheritedmediumint * ****mediumint**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.mediumint #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#point)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2490)inheritedpoint * ****point**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.point #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#primary)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2510)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2518)inheritedprimary * ****primary**(columnNames, options): TableBuilder * ****primary**(columnNames, constraintName): TableBuilder - Inherited from Knex.TableBuilder.primary #### Parameters * ##### columnNames: readonly string\[] * ##### optionaloptions: Readonly<{ constraintName?: string; deferrable?: deferrableType }> #### Returns TableBuilder ### [**](#queryContext)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2578)inheritedqueryContext * ****queryContext**(context): TableBuilder - Inherited from Knex.TableBuilder.queryContext #### Parameters * ##### context: any #### Returns TableBuilder ### [**](#renameColumn)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2431)inheritedrenameColumn * ****renameColumn**(from, to): TableBuilder - Inherited from Knex.TableBuilder.renameColumn #### Parameters * ##### from: string * ##### to: string #### Returns TableBuilder ### [**](#setNullable)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2536)inheritedsetNullable * ****setNullable**(column): TableBuilder - Inherited from Knex.TableBuilder.setNullable #### Parameters * ##### column: string #### Returns TableBuilder ### [**](#smallint)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2434)inheritedsmallint * ****smallint**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.smallint #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#specificType)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2509)inheritedspecificType * ****specificType**(columnName, type): ColumnBuilder - Inherited from Knex.TableBuilder.specificType #### Parameters * ##### columnName: string * ##### type: string #### Returns ColumnBuilder ### [**](#string)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2439)inheritedstring * ****string**(columnName, length): ColumnBuilder - Inherited from Knex.TableBuilder.string #### Parameters * ##### columnName: string * ##### optionallength: number #### Returns ColumnBuilder ### [**](#text)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2438)inheritedtext * ****text**(columnName, textType): ColumnBuilder - Inherited from Knex.TableBuilder.text #### Parameters * ##### columnName: string * ##### optionaltextType: string #### Returns ColumnBuilder ### [**](#time)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2465)inheritedtime * ****time**(columnName): ColumnBuilder - Inherited from Knex.TableBuilder.time #### Parameters * ##### columnName: string #### Returns ColumnBuilder ### [**](#timestamp)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2466)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2471)inheritedtimestamp * ****timestamp**(columnName, options): ColumnBuilder * ****timestamp**(columnName, withoutTz, precision): ColumnBuilder - Inherited from Knex.TableBuilder.timestamp #### Parameters * ##### columnName: string * ##### optionaloptions: Readonly<{ precision?: number; useTz?: boolean }> #### Returns ColumnBuilder ### [**](#timestamps)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2476)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2481)inheritedtimestamps * ****timestamps**(useTimestamps, defaultToNow, useCamelCase): ColumnBuilder * ****timestamps**(options): void - Inherited from Knex.TableBuilder.timestamps #### Parameters * ##### optionaluseTimestamps: boolean * ##### optionaldefaultToNow: boolean * ##### optionaluseCamelCase: boolean #### Returns ColumnBuilder ### [**](#tinyint)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2433)inheritedtinyint * ****tinyint**(columnName, length): ColumnBuilder - Inherited from Knex.TableBuilder.tinyint #### Parameters * ##### columnName: string * ##### optionallength: number #### Returns ColumnBuilder ### [**](#unique)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2538)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2549)inheritedunique * ****unique**(columnNames, options): TableBuilder * ****unique**(columnNames, indexName): TableBuilder - Inherited from Knex.TableBuilder.unique #### Parameters * ##### columnNames: string | readonly (string | Raw\)\[] * ##### optionaloptions: Readonly<{ deferrable?: deferrableType; indexName?: string; predicate?: QueryBuilder\; storageEngineIndexType?: string; useConstraint?: boolean }> #### Returns TableBuilder ### [**](#uuid)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/knex/types/index.d.ts#L2504)inheriteduuid * ****uuid**(columnName, options): ColumnBuilder - Inherited from Knex.TableBuilder.uuid #### Parameters * ##### columnName: string * ##### optionaloptions: Readonly<{ primaryKey?: boolean; useBinaryUuid?: boolean }> #### Returns ColumnBuilder --- # Source: https://mikro-orm.io/api/core/interface/NamingStrategy.md # NamingStrategy ### Implemented by * [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) ## Index[**](#Index) ### Methods * [**aliasName](#aliasName) * [**classToMigrationName](#classToMigrationName) * [**classToTableName](#classToTableName) * [**columnNameToProperty](#columnNameToProperty) * [**enumValueToEnumProperty](#enumValueToEnumProperty) * [**getClassName](#getClassName) * [**getEntityName](#getEntityName) * [**getEnumClassName](#getEnumClassName) * [**getEnumTypeName](#getEnumTypeName) * [**indexName](#indexName) * [**inverseSideName](#inverseSideName) * [**joinColumnName](#joinColumnName) * [**joinKeyColumnName](#joinKeyColumnName) * [**joinTableName](#joinTableName) * [**propertyToColumnName](#propertyToColumnName) * [**referenceColumnName](#referenceColumnName) ## Methods[**](#Methods) ### [**](#aliasName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L99)aliasName * ****aliasName**(entityName, index): string - Returns alias name for given entity. The alias needs to be unique across the query, which is by default ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique. *** #### Parameters * ##### entityName: string * ##### index: number #### Returns string ### [**](#classToMigrationName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L18)classToMigrationName * ****classToMigrationName**(timestamp, customMigrationName): string - Return a migration name. This name should allow ordering. *** #### Parameters * ##### timestamp: string * ##### optionalcustomMigrationName: string #### Returns string ### [**](#classToTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L13)classToTableName * ****classToTableName**(entityName): string - Return a table name for an entity class *** #### Parameters * ##### entityName: string #### Returns string ### [**](#columnNameToProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L68)columnNameToProperty * ****columnNameToProperty**(columnName): string - Return a property for a column name (used in `EntityGenerator`). *** #### Parameters * ##### columnName: string #### Returns string ### [**](#enumValueToEnumProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L57)enumValueToEnumProperty * ****enumValueToEnumProperty**(enumValue, columnName, tableName, schemaName): string - Get an enum option name for a given enum value. *** #### Parameters * ##### enumValue: string The enum value to generate a name for. * ##### columnName: string The column name which has the enum. * ##### tableName: string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string The name of the enum property that will hold the value. ### [**](#getClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L8)getClassName * ****getClassName**(file, separator): string - Return a name of the class based on its file name *** #### Parameters * ##### file: string * ##### optionalseparator: string #### Returns string ### [**](#getEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L63)getEntityName * ****getEntityName**(tableName, schemaName): string - Return a name of the entity class based on database table name (used in `EntityGenerator`). Default implementation ignores the schema name. *** #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getEnumClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L34)getEnumClassName * ****getEnumClassName**(columnName, tableName, schemaName): string - Get an enum class name. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new class name that will be used for the enum. ### [**](#getEnumTypeName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L45)getEnumTypeName * ****getEnumTypeName**(columnName, tableName, schemaName): string - Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new type name that will be used for the enum. ### [**](#indexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L93)indexName * ****indexName**(tableName, columns, type): string - Returns key/constraint name for the given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name). *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | check | foreign | sequence #### Returns string ### [**](#inverseSideName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L104)inverseSideName * ****inverseSideName**(entityName, propertyName, kind): string - Returns the name of the inverse side property. Used in the `EntityGenerator` with `bidirectionalRelations` option. *** #### Parameters * ##### entityName: string * ##### propertyName: string * ##### kind: [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) #### Returns string ### [**](#joinColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L78)joinColumnName * ****joinColumnName**(propertyName): string - Return a join column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#joinKeyColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L88)joinKeyColumnName * ****joinKeyColumnName**(entityName, referencedColumnName, composite): string - Return the foreign key column name for the given parameters *** #### Parameters * ##### entityName: string * ##### optionalreferencedColumnName: string * ##### optionalcomposite: boolean #### Returns string ### [**](#joinTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L83)joinTableName * ****joinTableName**(sourceEntity, targetEntity, propertyName): string - Return a join table name *** #### Parameters * ##### sourceEntity: string * ##### targetEntity: string * ##### propertyName: string #### Returns string ### [**](#propertyToColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L23)propertyToColumnName * ****propertyToColumnName**(propertyName, object): string - Return a column name for a property *** #### Parameters * ##### propertyName: string * ##### optionalobject: boolean #### Returns string ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L73)referenceColumnName * ****referenceColumnName**(): string - Return the default reference column name *** #### Returns string --- # Source: https://mikro-orm.io/api/core/interface/NativeDeleteOptions.md # NativeDeleteOptions \ ### Hierarchy * [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) * *NativeDeleteOptions* ## Index[**](#Index) ### Properties * [**ctx](#ctx) * [**filters](#filters) * [**loggerContext](#loggerContext) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L289)optionalinheritedctx **ctx? : any Inherited from DriverMethodOptions.ctx ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L278)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L291)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from DriverMethodOptions.loggerContext ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L290)optionalinheritedschema **schema? : string Inherited from DriverMethodOptions.schema --- # Source: https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md # NativeInsertUpdateManyOptions \ ### Hierarchy * [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ * *NativeInsertUpdateManyOptions* ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**loggerContext](#loggerContext) * [**processCollections](#processCollections) * [**schema](#schema) * [**upsert](#upsert) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L219)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from NativeInsertUpdateOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L220)optionalinheritedctx **ctx? : any Inherited from NativeInsertUpdateOptions.ctx ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L224)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from NativeInsertUpdateOptions.loggerContext ### [**](#processCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L228)optionalprocessCollections **processCollections? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L221)optionalinheritedschema **schema? : string Inherited from NativeInsertUpdateOptions.schema ### [**](#upsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L223)optionalinheritedupsert **upsert? : boolean Inherited from NativeInsertUpdateOptions.upsert `nativeUpdate()` only option --- # Source: https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md # NativeInsertUpdateOptions \ ### Hierarchy * *NativeInsertUpdateOptions* * [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md) ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**loggerContext](#loggerContext) * [**schema](#schema) * [**upsert](#upsert) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L219)optionalconvertCustomTypes **convertCustomTypes? : boolean ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L220)optionalctx **ctx? : any ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L224)optionalloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L221)optionalschema **schema? : string ### [**](#upsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L223)optionalupsert **upsert? : boolean `nativeUpdate()` only option --- # Source: https://mikro-orm.io/api/core/interface/Node.md # Node ## Index[**](#Index) ### Properties * [**dependencies](#dependencies) * [**hash](#hash) * [**state](#state) ## Properties[**](#Properties) ### [**](#dependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L13)dependencies **dependencies: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Edge](https://mikro-orm.io/api/core/interface/Edge.md)> ### [**](#hash)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L11)hash **hash: string ### [**](#state)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L12)state **state: [NodeState](https://mikro-orm.io/api/core/enum/NodeState.md) --- # Source: https://mikro-orm.io/api/core/enum/NodeState.md # constNodeState ## Index[**](#Index) ### Enumeration Members * [**IN\_PROGRESS](#IN_PROGRESS) * [**NOT\_VISITED](#NOT_VISITED) * [**VISITED](#VISITED) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#IN_PROGRESS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L6)IN\_PROGRESS **IN\_PROGRESS: 1 ### [**](#NOT_VISITED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L5)NOT\_VISITED **NOT\_VISITED: 0 ### [**](#VISITED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L7)VISITED **VISITED: 2 --- # Source: https://mikro-orm.io/api/core/class/NonUniqueFieldNameException.md # NonUniqueFieldNameException Exception for a non-unique/ambiguous specified field name in a statement detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *NonUniqueFieldNameException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new NonUniqueFieldNameException**(previous): [NonUniqueFieldNameException](https://mikro-orm.io/api/core/class/NonUniqueFieldNameException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [NonUniqueFieldNameException](https://mikro-orm.io/api/core/class/NonUniqueFieldNameException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/NotFoundError.md # NotFoundError \ ### Hierarchy * [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\ * *NotFoundError* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**entity](#entity) * [**message](#message) * [**name](#name) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**getEntity](#getEntity) * [**cannotCommit](#cannotCommit) * [**cannotModifyInverseCollection](#cannotModifyInverseCollection) * [**cannotModifyReadonlyCollection](#cannotModifyReadonlyCollection) * [**cannotRemoveFromCollectionWithoutOrphanRemoval](#cannotRemoveFromCollectionWithoutOrphanRemoval) * [**cannotUseGlobalContext](#cannotUseGlobalContext) * [**cannotUseGroupOperatorsInsideScalars](#cannotUseGroupOperatorsInsideScalars) * [**cannotUseOperatorsInsideEmbeddables](#cannotUseOperatorsInsideEmbeddables) * [**captureStackTrace](#captureStackTrace) * [**entityNotManaged](#entityNotManaged) * [**findExactlyOneFailed](#findExactlyOneFailed) * [**findOneFailed](#findOneFailed) * [**fromCollectionNotInitialized](#fromCollectionNotInitialized) * [**fromMergeWithoutPK](#fromMergeWithoutPK) * [**fromWrongPropertyType](#fromWrongPropertyType) * [**fromWrongRepositoryType](#fromWrongRepositoryType) * [**invalidCompositeIdentifier](#invalidCompositeIdentifier) * [**invalidEmbeddableQuery](#invalidEmbeddableQuery) * [**invalidPropertyName](#invalidPropertyName) * [**invalidType](#invalidType) * [**notDiscoveredEntity](#notDiscoveredEntity) * [**notEntity](#notEntity) * [**prepareStackTrace](#prepareStackTrace) * [**propertyRequired](#propertyRequired) * [**transactionRequired](#transactionRequired) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)constructor * ****new NotFoundError**\(message, entity): [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\ - Inherited from ValidationError.constructor #### Parameters * ##### message: string * ##### optionalentity: T #### Returns [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\ ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ValidationError.cause ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)optionalreadonlyinheritedentity **entity? : T Inherited from ValidationError.entity ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ValidationError.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ValidationError.name ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ValidationError.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ValidationError.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L17)inheritedgetEntity * ****getEntity**(): undefined | Partial\ - Inherited from ValidationError.getEntity Gets instance of entity that caused this error. *** #### Returns undefined | Partial\ ### [**](#cannotCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L116)staticinheritedcannotCommit * ****cannotCommit**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotCommit #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyInverseCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L90)staticinheritedcannotModifyInverseCollection * ****cannotModifyInverseCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyInverseCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyReadonlyCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L99)staticinheritedcannotModifyReadonlyCollection * ****cannotModifyReadonlyCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyReadonlyCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotRemoveFromCollectionWithoutOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L103)staticinheritedcannotRemoveFromCollectionWithoutOrphanRemoval * ****cannotRemoveFromCollectionWithoutOrphanRemoval**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotRemoveFromCollectionWithoutOrphanRemoval #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L120)staticinheritedcannotUseGlobalContext * ****cannotUseGlobalContext**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGlobalContext #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGroupOperatorsInsideScalars)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L128)staticinheritedcannotUseGroupOperatorsInsideScalars * ****cannotUseGroupOperatorsInsideScalars**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGroupOperatorsInsideScalars #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseOperatorsInsideEmbeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L124)staticinheritedcannotUseOperatorsInsideEmbeddables * ****cannotUseOperatorsInsideEmbeddables**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseOperatorsInsideEmbeddables #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ValidationError.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#entityNotManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L49)staticinheritedentityNotManaged * ****entityNotManaged**(entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.entityNotManaged #### Parameters * ##### entity: Partial\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#findExactlyOneFailed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L299)staticfindExactlyOneFailed * ****findExactlyOneFailed**(name, where): [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> - #### Parameters * ##### name: string * ##### where: IPrimaryKeyValue | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> ### [**](#findOneFailed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L295)staticfindOneFailed * ****findOneFailed**(name, where): [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> - #### Parameters * ##### name: string * ##### where: IPrimaryKeyValue | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md)\> ### [**](#fromCollectionNotInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L34)staticinheritedfromCollectionNotInitialized * ****fromCollectionNotInitialized**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromCollectionNotInitialized #### Parameters * ##### entity: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromMergeWithoutPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L41)staticinheritedfromMergeWithoutPK * ****fromMergeWithoutPK**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromMergeWithoutPK #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongPropertyType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L21)staticinheritedfromWrongPropertyType * ****fromWrongPropertyType**(entity, property, expectedType, givenType, givenValue): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongPropertyType #### Parameters * ##### entity: Partial\ * ##### property: string * ##### expectedType: string * ##### givenType: string * ##### givenValue: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L28)staticinheritedfromWrongRepositoryType * ****fromWrongRepositoryType**(entityName, repoType, method): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongRepositoryType #### Parameters * ##### entityName: string * ##### repoType: string * ##### method: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidCompositeIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L112)staticinheritedinvalidCompositeIdentifier * ****invalidCompositeIdentifier**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidCompositeIdentifier #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidEmbeddableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L132)staticinheritedinvalidEmbeddableQuery * ****invalidEmbeddableQuery**(className, propName, embeddableType): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidEmbeddableQuery #### Parameters * ##### className: string * ##### propName: string * ##### embeddableType: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidPropertyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L71)staticinheritedinvalidPropertyName * ****invalidPropertyName**(entityName, invalid): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidPropertyName #### Parameters * ##### entityName: string * ##### invalid: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L75)staticinheritedinvalidType * ****invalidType**(type, value, mode): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidType #### Parameters * ##### type: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ * ##### value: any * ##### mode: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notDiscoveredEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L58)staticinheritednotDiscoveredEntity * ****notDiscoveredEntity**(data, meta, action): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notDiscoveredEntity #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### action: string = 'persist' #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L53)staticinheritednotEntity * ****notEntity**(owner, prop, data): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notEntity #### Parameters * ##### owner: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### data: any #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ValidationError.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any ### [**](#propertyRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L85)staticinheritedpropertyRequired * ****propertyRequired**(entity, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.propertyRequired #### Parameters * ##### entity: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#transactionRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L45)staticinheritedtransactionRequired * ****transactionRequired**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.transactionRequired #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> --- # Source: https://mikro-orm.io/api/core/class/NotNullConstraintViolationException.md # NotNullConstraintViolationException Exception for a NOT NULL constraint violation detected in the driver. ### Hierarchy * [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) * *NotNullConstraintViolationException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new NotNullConstraintViolationException**(previous): [NotNullConstraintViolationException](https://mikro-orm.io/api/core/class/NotNullConstraintViolationException.md) - Inherited from ConstraintViolationException.constructor #### Parameters * ##### previous: Error #### Returns [NotNullConstraintViolationException](https://mikro-orm.io/api/core/class/NotNullConstraintViolationException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ConstraintViolationException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ConstraintViolationException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ConstraintViolationException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ConstraintViolationException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ConstraintViolationException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ConstraintViolationException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ConstraintViolationException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ConstraintViolationException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ConstraintViolationException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ConstraintViolationException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ConstraintViolationException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ConstraintViolationException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/NullCacheAdapter.md # NullCacheAdapter ### Implements * [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clear](#clear) * [**get](#get) * [**remove](#remove) * [**set](#set) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new NullCacheAdapter**(): [NullCacheAdapter](https://mikro-orm.io/api/core/class/NullCacheAdapter.md) - #### Returns [NullCacheAdapter](https://mikro-orm.io/api/core/class/NullCacheAdapter.md) ## Methods[**](#Methods) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/NullCacheAdapter.ts#L29)clear * ****clear**(): void - Implementation of SyncCacheAdapter.clear Clears all items stored in the cache. *** #### Returns void ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/NullCacheAdapter.ts#L8)get * ****get**(name): any - Implementation of SyncCacheAdapter.get Gets the items under `name` key from the cache. *** #### Parameters * ##### name: string #### Returns any ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/NullCacheAdapter.ts#L22)remove * ****remove**(name): void - Implementation of SyncCacheAdapter.remove Removes the item from cache. *** #### Parameters * ##### name: string #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/NullCacheAdapter.ts#L15)set * ****set**(name, data, origin): void - Implementation of SyncCacheAdapter.set Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. *** #### Parameters * ##### name: string * ##### data: any * ##### origin: string #### Returns void --- # Source: https://mikro-orm.io/api/core/class/NullHighlighter.md # NullHighlighter ### Implements * [Highlighter](https://mikro-orm.io/api/core/interface/Highlighter.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**highlight](#highlight) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new NullHighlighter**(): [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md) - #### Returns [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md) ## Methods[**](#Methods) ### [**](#highlight)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/NullHighlighter.ts#L5)highlight * ****highlight**(text): string - Implementation of Highlighter.highlight #### Parameters * ##### text: string #### Returns string --- # Source: https://mikro-orm.io/api/core/class/ObjectHydrator.md # ObjectHydrator ### Hierarchy * [Hydrator](https://mikro-orm.io/api/core/class/Hydrator.md) * *ObjectHydrator* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**hydrate](#hydrate) * [**hydrateReference](#hydrateReference) * [**isRunning](#isRunning) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L12)constructor * ****new ObjectHydrator**(metadata, platform, config): [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md) - Inherited from Hydrator.constructor #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md) ## Methods[**](#Methods) ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/ObjectHydrator.ts#L26)hydrate * ****hydrate**\(entity, meta, data, factory, type, newEntity, convertCustomTypes, schema, parentSchema, normalizeAccessors): void - Overrides Hydrator.hydrate * **@inheritDoc** *** #### Parameters * ##### entity: T * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### factory: [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) * ##### type: full | reference * ##### newEntity: boolean = false * ##### convertCustomTypes: boolean = false * ##### optionalschema: string * ##### optionalparentSchema: string * ##### optionalnormalizeAccessors: boolean #### Returns void ### [**](#hydrateReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/ObjectHydrator.ts#L39)hydrateReference * ****hydrateReference**\(entity, meta, data, factory, convertCustomTypes, schema, parentSchema, normalizeAccessors): void - Overrides Hydrator.hydrateReference * **@inheritDoc** *** #### Parameters * ##### entity: T * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### factory: [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) * ##### convertCustomTypes: boolean = false * ##### optionalschema: string * ##### optionalparentSchema: string * ##### optionalnormalizeAccessors: boolean #### Returns void ### [**](#isRunning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L42)inheritedisRunning * ****isRunning**(): boolean - Inherited from Hydrator.isRunning #### Returns boolean --- # Source: https://mikro-orm.io/api/mongodb/class/ObjectId.md # publicObjectId A class representation of the BSON ObjectId type. ### Hierarchy * BSONValue * *ObjectId* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cacheHexString](#cacheHexString) ### Accessors * [**\_bsontype](#_bsontype) * [**id](#id) ### Methods * [**equals](#equals) * [**getTimestamp](#getTimestamp) * [**inspect](#inspect) * [**toHexString](#toHexString) * [**toJSON](#toJSON) * [**toString](#toString) * [**createFromBase64](#createFromBase64) * [**createFromHexString](#createFromHexString) * [**createFromTime](#createFromTime) * [**generate](#generate) * [**isValid](#isValid) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1354)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1360)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1366)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1372)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1378)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1380)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1386)constructor * ****new ObjectId**(inputId): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) * ****new ObjectId**(inputId): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) * ****new ObjectId**(inputId): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) * ****new ObjectId**(inputId): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) * ****new ObjectId**(inputId): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) * ****new ObjectId**(): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) * ****new ObjectId**(inputId): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) - Overrides BSONValue.constructor Create ObjectId from a number. * **@deprecated** Instead, use `static createFromTime()` to set a numeric value for the new ObjectId. *** #### Parameters * ##### inputId: number A number. #### Returns [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) ## Properties[**](#Properties) ### [**](#cacheHexString)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1346)staticcacheHexString **cacheHexString: boolean ## Accessors[**](#Accessors) ### [**](#_bsontype)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1344)\_bsontype * **get \_bsontype(): ObjectId - Overrides BSONValue.\_bsontype #### Returns ObjectId ### [**](#id)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1391)id * **get id(): Uint8Array\ - The ObjectId bytes *** #### Returns Uint8Array\ ## Methods[**](#Methods) ### [**](#equals)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1416)equals * ****equals**(otherId): boolean - Compares the equality of this ObjectId with `otherID`. *** #### Parameters * ##### otherId: undefined | null | string | [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) | ObjectIdLike ObjectId instance to compare against. #### Returns boolean ### [**](#getTimestamp)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1418)getTimestamp * ****getTimestamp**(): Date - Returns the generation date (accurate up to the second) that this ID was generated. *** #### Returns Date ### [**](#inspect)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1448)inspect * ****inspect**(depth, options, inspect): string - Overrides BSONValue.inspect Converts to a string representation of this Id. *** #### Parameters * ##### optionaldepth: number * ##### optionaloptions: unknown * ##### optionalinspect: InspectFn #### Returns string return the 24 character hex string representation. ### [**](#toHexString)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1395)toHexString * ****toHexString**(): string - Returns the ObjectId id as a 24 lowercase character hex string representation *** #### Returns string ### [**](#toJSON)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1409)toJSON * ****toJSON**(): string - Converts to its JSON the 24 character hex string representation. *** #### Returns string ### [**](#toString)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1407)toString * ****toString**(encoding): string - Converts the id into a 24 character hex string for printing, unless encoding is provided. *** #### Parameters * ##### optionalencoding: base64 | hex hex or base64 #### Returns string ### [**](#createFromBase64)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1434)staticcreateFromBase64 * ****createFromBase64**(base64): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) - Creates an ObjectId instance from a base64 string *** #### Parameters * ##### base64: string #### Returns [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) ### [**](#createFromHexString)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1432)staticcreateFromHexString * ****createFromHexString**(hexString): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) - Creates an ObjectId from a hex string representation of an ObjectId. *** #### Parameters * ##### hexString: string create a ObjectId from a passed in 24 character hexstring. #### Returns [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) ### [**](#createFromTime)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1426)staticcreateFromTime * ****createFromTime**(time): [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) - Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId. *** #### Parameters * ##### time: number an integer number representing a number of seconds. #### Returns [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) ### [**](#generate)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1402)staticgenerate * ****generate**(time): Uint8Array\ - Generate a 12 byte id buffer used in ObjectId's *** #### Parameters * ##### optionaltime: number pass in a second based timestamp. #### Returns Uint8Array\ ### [**](#isValid)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/bson/bson.d.ts#L1439)staticisValid * ****isValid**(id): boolean - Checks if a value can be used to create a valid bson ObjectId *** #### Parameters * ##### id: string | number | Uint8Array\ | [ObjectId](https://mikro-orm.io/api/mongodb/class/ObjectId.md) | ObjectIdLike any JS value #### Returns boolean --- # Source: https://mikro-orm.io/api/core/function/OnInit.md # OnInit ### Callable * ****OnInit**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/OnLoad.md # OnLoad ### Callable * ****OnLoad**(): (target, method) => void *** * #### Returns (target, method) => void * * **(target, method): void - #### Parameters * ##### target: any * ##### method: string #### Returns void --- # Source: https://mikro-orm.io/api/core/function/OneToMany.md # OneToMany ### Callable * ****OneToMany**\(entity, mappedBy, options): (target, propertyName) => void * ****OneToMany**\(options): (target, propertyName) => void *** * #### Parameters * ##### entity: string | (e) => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### mappedBy: (string & keyof Target) | (e) => any * ##### optionaloptions: Partial<[OneToManyOptions](https://mikro-orm.io/api/core/interface/OneToManyOptions.md)\> #### Returns (target, propertyName) => void * * **(target, propertyName): void - #### Parameters * ##### target: [AnyEntity](https://mikro-orm.io/api/core.md#AnyEntity) * ##### propertyName: string #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/OneToManyOptions.md # OneToManyOptions \ ### Hierarchy * [ReferenceOptions](https://mikro-orm.io/api/core/interface/ReferenceOptions.md)\ * *OneToManyOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**eager](#eager) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**inverseJoinColumn](#inverseJoinColumn) * [**inverseJoinColumns](#inverseJoinColumns) * [**joinColumn](#joinColumn) * [**joinColumns](#joinColumns) * [**lazy](#lazy) * [**length](#length) * [**mappedBy](#mappedBy) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**orderBy](#orderBy) * [**orphanRemoval](#orphanRemoval) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**referenceColumnName](#referenceColumnName) * [**referencedColumnNames](#referencedColumnNames) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) * [**where](#where) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof Owner Inherited from ReferenceOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from ReferenceOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L336)optionalinheritedcascade **cascade? : [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md)\[] Inherited from ReferenceOptions.cascade Set what actions on owning entity should be cascaded to the relationship. Defaults to \[Cascade.PERSIST, Cascade.MERGE] (see [cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from ReferenceOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from ReferenceOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from ReferenceOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from ReferenceOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from ReferenceOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from ReferenceOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from ReferenceOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from ReferenceOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#eager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L339)optionalinheritedeager **eager? : boolean Inherited from ReferenceOptions.eager Always load the relationship. Discouraged for use with to-many relations for performance reasons. ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L333)optionalinheritedentity **entity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ Inherited from ReferenceOptions.entity Set target entity type. ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from ReferenceOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from ReferenceOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from ReferenceOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L345)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from ReferenceOptions.filters Control filter parameters for the relation. This will serve as a default value when processing filters on this relation. It's value can be overridden via `em.fork()` or `FindOptions`. ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from ReferenceOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from ReferenceOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from ReferenceOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof Owner Inherited from ReferenceOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from ReferenceOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from ReferenceOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from ReferenceOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from ReferenceOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from ReferenceOptions.index Explicitly specify index on a property. ### [**](#inverseJoinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L57)optionalinverseJoinColumn **inverseJoinColumn? : string Override the default database column name on the inverse side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#inverseJoinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L60)optionalinverseJoinColumns **inverseJoinColumns? : string\[] Override the default database column name on the inverse side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#joinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L51)optionaljoinColumn **joinColumn? : string Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#joinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L54)optionaljoinColumns **joinColumns? : string\[] Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from ReferenceOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from ReferenceOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#mappedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L69)mappedBy **mappedBy: (string & keyof Target) | (e) => any Point to the owning side property name. ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from ReferenceOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from ReferenceOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from ReferenceOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from ReferenceOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L45)optionalorderBy **orderBy? : [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\ | [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap)\\[] Set default ordering. ### [**](#orphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L42)optionalorphanRemoval **orphanRemoval? : boolean Remove the entity when it gets disconnected from the relationship (see [Cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from ReferenceOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from ReferenceOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from ReferenceOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from ReferenceOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L63)optionalreferenceColumnName **referenceColumnName? : string Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#referencedColumnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L66)optionalreferencedColumnNames **referencedColumnNames? : string\[] Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from ReferenceOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from ReferenceOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from ReferenceOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from ReferenceOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from ReferenceOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from ReferenceOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from ReferenceOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L342)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from ReferenceOptions.strategy Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from ReferenceOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from ReferenceOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from ReferenceOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from ReferenceOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from ReferenceOptions.version Set to true to enable Locking via version field. (SQL only) ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L48)optionalwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ Condition for [Declarative partial loading](https://mikro-orm.io/docs/collections.md#declarative-partial-loading). --- # Source: https://mikro-orm.io/api/core/function/OneToOne.md # OneToOne ### Callable * ****OneToOne**\(entity, mappedByOrOptions, options): (target, propertyName) => any *** * #### Parameters * ##### optionalentity: string | [OneToOneOptions](https://mikro-orm.io/api/core/interface/OneToOneOptions.md)\ | (e) => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ * ##### optionalmappedByOrOptions: (string & keyof Target) | (e) => any | Partial<[OneToOneOptions](https://mikro-orm.io/api/core/interface/OneToOneOptions.md)\> * ##### options: Partial<[OneToOneOptions](https://mikro-orm.io/api/core/interface/OneToOneOptions.md)\> = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/OneToOneOptions.md # OneToOneOptions \ ### Hierarchy * Partial\, orderBy>> * *OneToOneOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**createForeignKeyConstraint](#createForeignKeyConstraint) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**deferMode](#deferMode) * [**deleteRule](#deleteRule) * [**eager](#eager) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**foreignKeyName](#foreignKeyName) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**inversedBy](#inversedBy) * [**inverseJoinColumn](#inverseJoinColumn) * [**inverseJoinColumns](#inverseJoinColumns) * [**joinColumn](#joinColumn) * [**joinColumns](#joinColumns) * [**lazy](#lazy) * [**length](#length) * [**mappedBy](#mappedBy) * [**mapToPk](#mapToPk) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**orphanRemoval](#orphanRemoval) * [**ownColumns](#ownColumns) * [**owner](#owner) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**referenceColumnName](#referenceColumnName) * [**referencedColumnNames](#referencedColumnNames) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**updateRule](#updateRule) * [**version](#version) * [**where](#where) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof Owner Inherited from Partial.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from Partial.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L336)optionalinheritedcascade **cascade? : [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md)\[] Inherited from Partial.cascade Set what actions on owning entity should be cascaded to the relationship. Defaults to \[Cascade.PERSIST, Cascade.MERGE] (see [cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from Partial.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from Partial.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from Partial.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from Partial.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from Partial.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#createForeignKeyConstraint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L47)optionalcreateForeignKeyConstraint **createForeignKeyConstraint? : boolean Enable/disable foreign key constraint creation on this relation ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from Partial.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from Partial.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from Partial.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#deferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L41)optionaldeferMode **deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) | immediate | deferred Set the constraint type. Immediate constraints are checked for each statement, while deferred ones are only checked at the end of the transaction. Only for postgres unique constraints. ### [**](#deleteRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L35)optionaldeleteRule **deleteRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default What to do when the target entity gets deleted. ### [**](#eager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L339)optionalinheritedeager **eager? : boolean Inherited from Partial.eager Always load the relationship. Discouraged for use with to-many relations for performance reasons. ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L333)optionalinheritedentity **entity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ Inherited from Partial.entity Set target entity type. ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from Partial.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from Partial.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from Partial.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L345)optionalinheritedfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Inherited from Partial.filters Control filter parameters for the relation. This will serve as a default value when processing filters on this relation. It's value can be overridden via `em.fork()` or `FindOptions`. ### [**](#foreignKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L44)optionalforeignKeyName **foreignKeyName? : string Set a custom foreign key constraint name, overriding NamingStrategy.indexName(). ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from Partial.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from Partial.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from Partial.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof Owner Inherited from Partial.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from Partial.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from Partial.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from Partial.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from Partial.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from Partial.index Explicitly specify index on a property. ### [**](#inversedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L20)optionalinversedBy **inversedBy? : (string & keyof Target) | (e) => any Point to the inverse side property name. ### [**](#inverseJoinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L57)optionalinheritedinverseJoinColumn **inverseJoinColumn? : string Inherited from Partial.inverseJoinColumn Override the default database column name on the inverse side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#inverseJoinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L60)optionalinheritedinverseJoinColumns **inverseJoinColumns? : string\[] Inherited from Partial.inverseJoinColumns Override the default database column name on the inverse side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#joinColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L51)optionalinheritedjoinColumn **joinColumn? : string Inherited from Partial.joinColumn Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#joinColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L54)optionalinheritedjoinColumns **joinColumns? : string\[] Inherited from Partial.joinColumns Override the default database column name on the owning side (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from Partial.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from Partial.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#mappedBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L69)optionalinheritedmappedBy **mappedBy? : (string & keyof Target) | (e) => any Inherited from Partial.mappedBy Point to the owning side property name. ### [**](#mapToPk)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L29)optionalmapToPk **mapToPk? : boolean Map this relation to the primary key value instead of an entity. ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from Partial.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from Partial.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from Partial.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from Partial.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#orphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L42)optionalinheritedorphanRemoval **orphanRemoval? : boolean Inherited from Partial.orphanRemoval Remove the entity when it gets disconnected from the relationship (see [Cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#ownColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L32)optionalownColumns **ownColumns? : string\[] When a part of a composite column is shared in other properties, use this option to specify what columns are considered as owned by this property. This is useful when your composite property is nullable, but parts of it are not. ### [**](#owner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L17)optionalowner **owner? : boolean Set this side as owning. Owning side is where the foreign key is defined. This option is not required if you use `inversedBy` or `mappedBy` to distinguish owning and inverse side. ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from Partial.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from Partial.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L26)optionalprimary **primary? : boolean Overrides Partial.primary Use this relation as a primary key. ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L23)optionalref **ref? : boolean Overrides Partial.ref Wrap the entity in [Reference](https://mikro-orm.io/api/core/class/Reference.md) wrapper. ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L63)optionalinheritedreferenceColumnName **referenceColumnName? : string Inherited from Partial.referenceColumnName Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is only for simple properties represented by a single column. ### [**](#referencedColumnNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L66)optionalinheritedreferencedColumnNames **referencedColumnNames? : string\[] Inherited from Partial.referencedColumnNames Override the default database column name on the target entity (see [Naming Strategy](https://mikro-orm.io/docs/naming-strategy.md)). This option is suitable for composite keys, where one property is represented by multiple columns. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from Partial.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from Partial.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from Partial.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from Partial.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from Partial.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from Partial.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from Partial.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L342)optionalinheritedstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Inherited from Partial.strategy Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from Partial.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from Partial.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from Partial.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from Partial.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#updateRule)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L38)optionalupdateRule **updateRule? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | cascade | no action | set null | set default What to do when the reference to the target entity gets updated. ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from Partial.version Set to true to enable Locking via version field. (SQL only) ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToMany.ts#L48)optionalinheritedwhere **where? : [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ Inherited from Partial.where Condition for [Declarative partial loading](https://mikro-orm.io/docs/collections.md#declarative-partial-loading). --- # Source: https://mikro-orm.io/api/core/namespace/Opt.md # Opt ## Index[**](#Index) ### Interfaces * [**Brand](https://mikro-orm.io/api/core/namespace/Opt.md#Brand) ### Variables * [**\_\_optional](https://mikro-orm.io/api/core/namespace/Opt.md#__optional) ## Interfaces[**](#Interfaces) ### [**](#Brand)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L82)Brand **Brand: ### [**](#\[___optional])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L83)optional\[\_\_\_optional] **\[\_\_\_optional]? : 1 ## Variables[**](#Variables) ### [**](#__optional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L81)const\_\_optional **\_\_optional: unique symbol --- # Source: https://mikro-orm.io/api/core/class/OptimisticLockError.md # OptimisticLockError \ ### Hierarchy * [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\ * *OptimisticLockError* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**entity](#entity) * [**message](#message) * [**name](#name) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**getEntity](#getEntity) * [**cannotCommit](#cannotCommit) * [**cannotModifyInverseCollection](#cannotModifyInverseCollection) * [**cannotModifyReadonlyCollection](#cannotModifyReadonlyCollection) * [**cannotRemoveFromCollectionWithoutOrphanRemoval](#cannotRemoveFromCollectionWithoutOrphanRemoval) * [**cannotUseGlobalContext](#cannotUseGlobalContext) * [**cannotUseGroupOperatorsInsideScalars](#cannotUseGroupOperatorsInsideScalars) * [**cannotUseOperatorsInsideEmbeddables](#cannotUseOperatorsInsideEmbeddables) * [**captureStackTrace](#captureStackTrace) * [**entityNotManaged](#entityNotManaged) * [**fromCollectionNotInitialized](#fromCollectionNotInitialized) * [**fromMergeWithoutPK](#fromMergeWithoutPK) * [**fromWrongPropertyType](#fromWrongPropertyType) * [**fromWrongRepositoryType](#fromWrongRepositoryType) * [**invalidCompositeIdentifier](#invalidCompositeIdentifier) * [**invalidEmbeddableQuery](#invalidEmbeddableQuery) * [**invalidPropertyName](#invalidPropertyName) * [**invalidType](#invalidType) * [**lockFailed](#lockFailed) * [**lockFailedVersionMismatch](#lockFailedVersionMismatch) * [**notDiscoveredEntity](#notDiscoveredEntity) * [**notEntity](#notEntity) * [**notVersioned](#notVersioned) * [**prepareStackTrace](#prepareStackTrace) * [**propertyRequired](#propertyRequired) * [**transactionRequired](#transactionRequired) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)constructor * ****new OptimisticLockError**\(message, entity): [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\ - Inherited from ValidationError.constructor #### Parameters * ##### message: string * ##### optionalentity: T #### Returns [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\ ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ValidationError.cause ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)optionalreadonlyinheritedentity **entity? : T Inherited from ValidationError.entity ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ValidationError.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ValidationError.name ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ValidationError.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ValidationError.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L17)inheritedgetEntity * ****getEntity**(): undefined | Partial\ - Inherited from ValidationError.getEntity Gets instance of entity that caused this error. *** #### Returns undefined | Partial\ ### [**](#cannotCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L116)staticinheritedcannotCommit * ****cannotCommit**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotCommit #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyInverseCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L90)staticinheritedcannotModifyInverseCollection * ****cannotModifyInverseCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyInverseCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyReadonlyCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L99)staticinheritedcannotModifyReadonlyCollection * ****cannotModifyReadonlyCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyReadonlyCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotRemoveFromCollectionWithoutOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L103)staticinheritedcannotRemoveFromCollectionWithoutOrphanRemoval * ****cannotRemoveFromCollectionWithoutOrphanRemoval**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotRemoveFromCollectionWithoutOrphanRemoval #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L120)staticinheritedcannotUseGlobalContext * ****cannotUseGlobalContext**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGlobalContext #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGroupOperatorsInsideScalars)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L128)staticinheritedcannotUseGroupOperatorsInsideScalars * ****cannotUseGroupOperatorsInsideScalars**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGroupOperatorsInsideScalars #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseOperatorsInsideEmbeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L124)staticinheritedcannotUseOperatorsInsideEmbeddables * ****cannotUseOperatorsInsideEmbeddables**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseOperatorsInsideEmbeddables #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ValidationError.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#entityNotManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L49)staticinheritedentityNotManaged * ****entityNotManaged**(entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.entityNotManaged #### Parameters * ##### entity: Partial\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromCollectionNotInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L34)staticinheritedfromCollectionNotInitialized * ****fromCollectionNotInitialized**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromCollectionNotInitialized #### Parameters * ##### entity: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromMergeWithoutPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L41)staticinheritedfromMergeWithoutPK * ****fromMergeWithoutPK**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromMergeWithoutPK #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongPropertyType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L21)staticinheritedfromWrongPropertyType * ****fromWrongPropertyType**(entity, property, expectedType, givenType, givenValue): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongPropertyType #### Parameters * ##### entity: Partial\ * ##### property: string * ##### expectedType: string * ##### givenType: string * ##### givenValue: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L28)staticinheritedfromWrongRepositoryType * ****fromWrongRepositoryType**(entityName, repoType, method): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongRepositoryType #### Parameters * ##### entityName: string * ##### repoType: string * ##### method: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidCompositeIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L112)staticinheritedinvalidCompositeIdentifier * ****invalidCompositeIdentifier**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidCompositeIdentifier #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidEmbeddableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L132)staticinheritedinvalidEmbeddableQuery * ****invalidEmbeddableQuery**(className, propName, embeddableType): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidEmbeddableQuery #### Parameters * ##### className: string * ##### propName: string * ##### embeddableType: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidPropertyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L71)staticinheritedinvalidPropertyName * ****invalidPropertyName**(entityName, invalid): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidPropertyName #### Parameters * ##### entityName: string * ##### invalid: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L75)staticinheritedinvalidType * ****invalidType**(type, value, mode): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidType #### Parameters * ##### type: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ * ##### value: any * ##### mode: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#lockFailed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L156)staticlockFailed * ****lockFailed**(entityOrName): [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\> - #### Parameters * ##### entityOrName: string | Partial\ #### Returns [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\> ### [**](#lockFailedVersionMismatch)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L163)staticlockFailedVersionMismatch * ****lockFailedVersionMismatch**(entity, expectedLockVersion, actualLockVersion): [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\> - #### Parameters * ##### entity: Partial\ * ##### expectedLockVersion: number | Date * ##### actualLockVersion: number | Date #### Returns [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\> ### [**](#notDiscoveredEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L58)staticinheritednotDiscoveredEntity * ****notDiscoveredEntity**(data, meta, action): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notDiscoveredEntity #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### action: string = 'persist' #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L53)staticinheritednotEntity * ****notEntity**(owner, prop, data): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notEntity #### Parameters * ##### owner: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### data: any #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notVersioned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L152)staticnotVersioned * ****notVersioned**(meta): [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md)\> ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ValidationError.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any ### [**](#propertyRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L85)staticinheritedpropertyRequired * ****propertyRequired**(entity, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.propertyRequired #### Parameters * ##### entity: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#transactionRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L45)staticinheritedtransactionRequired * ****transactionRequired**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.transactionRequired #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> --- # Source: https://mikro-orm.io/api/core/class/PlainObject.md # abstractPlainObject ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new PlainObject**(): [PlainObject](https://mikro-orm.io/api/core/class/PlainObject.md) - #### Returns [PlainObject](https://mikro-orm.io/api/core/class/PlainObject.md) --- # Source: https://mikro-orm.io/api/core/class/Platform.md # abstractPlatform ### Hierarchy * *Platform* * [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) * [MongoPlatform](https://mikro-orm.io/api/mongodb/class/MongoPlatform.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getRepositoryClass](#getRepositoryClass) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new Platform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)allowsComparingTuples * ****allowsComparingTuples**(): boolean - #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)allowsMultiInsert * ****allowsMultiInsert**(): boolean - #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)cloneEmbeddable * ****cloneEmbeddable**\(data): T - #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)convertDateToJSValue * ****convertDateToJSValue**(value): string - #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)convertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)convertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)convertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)convertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L388)convertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)denormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L487)escape * ****escape**(value): string - #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)extractSimpleType * ****extractSimpleType**(type): string - #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)formatQuery * ****formatQuery**(sql, params): string - #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L641)generateCustomOrder * ****generateCustomOrder**(escapedColumn, values): void - Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns void ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)getArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - #### Returns string ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)getBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)getBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L208)getBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L232)getCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)getConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L140)getCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L144)getDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)getDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)getDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)getDefaultCharLength * ****getDefaultCharLength**(): number - #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)getDefaultCharset * ****getDefaultCharset**(): string - #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)getDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)getDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L582)getDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)getDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)getDefaultVarcharLength * ****getDefaultVarcharLength**(): number - #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)getDefaultVersionLength * ****getDefaultVersionLength**(): number - #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)getDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L248)getEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)getExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)getExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L256)getFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)getFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L376)getFullTextWhereClause * ****getFullTextWhereClause**(prop): string - #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L577)getIndexName * ****getIndexName**(tableName, columns, type): string - Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L212)getIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)getIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)getJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L372)getJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - #### Parameters * ##### index: { columnNames: string\[] } * ##### columnNames: string\[] #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)getMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)getMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)getNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)getRegExpOperator * ****getRegExpOperator**(val, flags): string - #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)getRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L423)getRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L470)getSchemaGenerator * ****getSchemaGenerator**(driver, em): [ISchemaGenerator](https://mikro-orm.io/api/core/interface/ISchemaGenerator.md) - #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [ISchemaGenerator](https://mikro-orm.io/api/core/interface/ISchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L82)getSchemaHelper * ****getSchemaHelper**(): unknown - #### Returns unknown ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L367)getSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L363)getSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)getSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)getSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)getTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)getTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)getTimezone * ****getTimezone**(): undefined | string - #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L224)getTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)getUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L236)getVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L86)indexForeignKeys * ****indexForeignKeys**(): boolean - #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)isAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)isBigIntProperty * ****isBigIntProperty**(prop): boolean - #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)isNumericColumn * ****isNumericColumn**(mappedType): boolean - #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)isNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)isPopulated * ****isPopulated**\(key, populate): boolean - #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L200)isRaw * ****isRaw**(value): boolean - #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L438)lookupExtensions * ****lookupExtensions**(orm): void - Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)marshallArray * ****marshallArray**(values): string - #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L283)normalizeColumnType * ****normalizeColumnType**(type, options): string - This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)normalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)parseDate * ****parseDate**(value): Date - #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)processDateProperty * ****processDateProperty**(value): string | number | Date - #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)quoteIdentifier * ****quoteIdentifier**(id, quote): string - #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L482)quoteValue * ****quoteValue**(value): string - #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)quoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)setConfig * ****setConfig**(config): void - #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)shouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)supportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)supportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)supportsDownMigrations * ****supportsDownMigrations**(): boolean - Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)supportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)supportsMultipleStatements * ****supportsMultipleStatements**(): boolean - #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)supportsNativeEnums * ****supportsNativeEnums**(): boolean - for postgres native enums *** #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)supportsTransactions * ****supportsTransactions**(): boolean - #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)supportsUnsigned * ****supportsUnsigned**(): boolean - #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)unmarshallArray * ****unmarshallArray**(value): string\[] - #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)usesBatchInserts * ****usesBatchInserts**(): boolean - Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)usesBatchUpdates * ****usesBatchUpdates**(): boolean - Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)usesCascadeStatement * ****usesCascadeStatement**(): boolean - #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)usesDefaultKeyword * ****usesDefaultKeyword**(): boolean - #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)usesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)usesImplicitTransactions * ****usesImplicitTransactions**(): boolean - #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)usesOutputStatement * ****usesOutputStatement**(): boolean - #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L49)usesPivotTable * ****usesPivotTable**(): boolean - #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L65)usesReturningStatement * ****usesReturningStatement**(): boolean - #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)validateMetadata * ****validateMetadata**(meta): void - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/PoolConfig.md # PoolConfig ## Index[**](#Index) ### Properties * [**acquireTimeoutMillis](#acquireTimeoutMillis) * [**afterCreate](#afterCreate) * [**createRetryIntervalMillis](#createRetryIntervalMillis) * [**createTimeoutMillis](#createTimeoutMillis) * [**destroyTimeoutMillis](#destroyTimeoutMillis) * [**idleTimeoutMillis](#idleTimeoutMillis) * [**log](#log) * [**max](#max) * [**min](#min) * [**name](#name) * [**priorityRange](#priorityRange) * [**propagateCreateError](#propagateCreateError) * [**reapIntervalMillis](#reapIntervalMillis) * [**refreshIdle](#refreshIdle) * [**returnToHead](#returnToHead) ## Properties[**](#Properties) ### [**](#acquireTimeoutMillis)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L574)optionalacquireTimeoutMillis **acquireTimeoutMillis? : number ### [**](#afterCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L559)optionalafterCreate **afterCreate? : Function ### [**](#createRetryIntervalMillis)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L571)optionalcreateRetryIntervalMillis **createRetryIntervalMillis? : number ### [**](#createTimeoutMillis)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L572)optionalcreateTimeoutMillis **createTimeoutMillis? : number ### [**](#destroyTimeoutMillis)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L573)optionaldestroyTimeoutMillis **destroyTimeoutMillis? : number ### [**](#idleTimeoutMillis)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L563)optionalidleTimeoutMillis **idleTimeoutMillis? : number ### [**](#log)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L567)optionallog **log? : (message, logLevel) => void #### Type declaration * * **(message, logLevel): void - #### Parameters * ##### message: string * ##### logLevel: string #### Returns void ### [**](#max)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L561)optionalmax **max? : number ### [**](#min)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L560)optionalmin **min? : number ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L558)optionalname **name? : string ### [**](#priorityRange)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L566)optionalpriorityRange **priorityRange? : number ### [**](#propagateCreateError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L570)optionalpropagateCreateError **propagateCreateError? : boolean ### [**](#reapIntervalMillis)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L564)optionalreapIntervalMillis **reapIntervalMillis? : number ### [**](#refreshIdle)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L562)optionalrefreshIdle **refreshIdle? : boolean ### [**](#returnToHead)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L565)optionalreturnToHead **returnToHead? : boolean --- # Source: https://mikro-orm.io/api/core/enum/PopulateHint.md # PopulateHint ## Index[**](#Index) ### Enumeration Members * [**ALL](#ALL) * [**INFER](#INFER) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#ALL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L16)ALL **ALL: all ### [**](#INFER)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L15)INFER **INFER: infer --- # Source: https://mikro-orm.io/api/core/enum/PopulatePath.md # PopulatePath ## Index[**](#Index) ### Enumeration Members * [**ALL](#ALL) * [**INFER](#INFER) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#ALL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L21)ALL **ALL: \* ### [**](#INFER)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L20)INFER **INFER: $infer --- # Source: https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md # PostgreSqlConnection ### Hierarchy * [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * *PostgreSqlConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new PostgreSqlConnection**(config, options, type): [PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md) - Inherited from AbstractSqlConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from AbstractSqlConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from AbstractSqlConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L42)inheritedconnect * ****connect**(): void | Promise\ - Inherited from AbstractSqlConnection.connect Establishes connection to database *** #### Returns void | Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlConnection.ts#L7)createKnex * ****createKnex**(): void - Overrides AbstractSqlConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from AbstractSqlConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L118)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from AbstractSqlConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlConnection.ts#L17)getConnectionOptions * ****getConnectionOptions**(): PgConnectionConfig - Overrides AbstractSqlConnection.getConnectionOptions #### Returns PgConnectionConfig ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlConnection.ts#L13)getDefaultClientUrl * ****getDefaultClientUrl**(): string - Overrides AbstractSqlConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from AbstractSqlConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from AbstractSqlConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from AbstractSqlConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L197)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from AbstractSqlConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from AbstractSqlConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from AbstractSqlConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from AbstractSqlConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/postgresql/class/PostgreSqlDriver.md # PostgreSqlDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md)> * *PostgreSqlDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlDriver.ts#L8)constructor * ****new PostgreSqlDriver**(config): [PostgreSqlDriver](https://mikro-orm.io/api/postgresql/class/PostgreSqlDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [PostgreSqlDriver](https://mikro-orm.io/api/postgresql/class/PostgreSqlDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[PostgreSqlDriver](https://mikro-orm.io/api/postgresql/class/PostgreSqlDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L511)inheritednativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L720)inheritednativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[PostgreSqlConnection](https://mikro-orm.io/api/postgresql/class/PostgreSqlConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/postgresql/class/PostgreSqlExceptionConverter.md # PostgreSqlExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *PostgreSqlExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new PostgreSqlExceptionConverter**(): [PostgreSqlExceptionConverter](https://mikro-orm.io/api/postgresql/class/PostgreSqlExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [PostgreSqlExceptionConverter](https://mikro-orm.io/api/postgresql/class/PostgreSqlExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlExceptionConverter.ts#L14)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/PostgreSqlKnexDialect.md # PostgreSqlKnexDialect ### Hierarchy * PostgresDialect * *PostgreSqlKnexDialect* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**ormConfig](#ormConfig) ### Methods * [**queryCompiler](#queryCompiler) * [**tableCompiler](#tableCompiler) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new PostgreSqlKnexDialect**(): [PostgreSqlKnexDialect](https://mikro-orm.io/api/knex/class/PostgreSqlKnexDialect.md) - Inherited from MonkeyPatchable.PostgresDialect.constructor #### Returns [PostgreSqlKnexDialect](https://mikro-orm.io/api/knex/class/PostgreSqlKnexDialect.md) ## Properties[**](#Properties) ### [**](#ormConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/postgresql/PostgreSqlKnexDialect.ts#L8)ormConfig **ormConfig: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ## Methods[**](#Methods) ### [**](#queryCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/postgresql/PostgreSqlKnexDialect.ts#L18)queryCompiler * ****queryCompiler**(): any - #### Returns any ### [**](#tableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/postgresql/PostgreSqlKnexDialect.ts#L10)tableCompiler * ****tableCompiler**(): any - #### Returns any --- # Source: https://mikro-orm.io/api/postgresql/class/PostgreSqlPlatform.md # PostgreSqlPlatform ### Hierarchy * [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) * *PostgreSqlPlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**castColumn](#castColumn) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new PostgreSqlPlatform**(): [PostgreSqlPlatform](https://mikro-orm.io/api/postgresql/class/PostgreSqlPlatform.md) - Inherited from AbstractSqlPlatform.constructor #### Returns [PostgreSqlPlatform](https://mikro-orm.io/api/postgresql/class/PostgreSqlPlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from AbstractSqlPlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from AbstractSqlPlatform.allowsMultiInsert #### Returns boolean ### [**](#castColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L467)castColumn * ****castColumn**(prop): string - Overrides AbstractSqlPlatform.castColumn * **@inheritDoc** *** #### Parameters * ##### optionalprop: { columnTypes?: string\[] } * ##### optionalcolumnTypes: string\[] #### Returns string ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from AbstractSqlPlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from AbstractSqlPlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L66)convertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Overrides AbstractSqlPlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: IPostgresInterval #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L62)convertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Overrides AbstractSqlPlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from AbstractSqlPlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L388)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from AbstractSqlPlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from AbstractSqlPlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L339)escape * ****escape**(value): string - Overrides AbstractSqlPlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from AbstractSqlPlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from AbstractSqlPlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from AbstractSqlPlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L201)getArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L230)getBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Overrides AbstractSqlPlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L86)getBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean } * ##### optionalautoincrement: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L283)getBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L208)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from AbstractSqlPlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L272)getCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from AbstractSqlPlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L49)getCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Overrides AbstractSqlPlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### length: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L53)getDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from AbstractSqlPlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from AbstractSqlPlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L58)getDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Overrides AbstractSqlPlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L404)getDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Overrides AbstractSqlPlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L454)getDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Overrides AbstractSqlPlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L436)getDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Overrides AbstractSqlPlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from AbstractSqlPlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L209)getDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L213)getEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { fieldNames: string\[]; items?: unknown\[]; nativeEnumName?: string } * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionalnativeEnumName: string #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from AbstractSqlPlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from AbstractSqlPlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L205)getFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L120)getFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Overrides AbstractSqlPlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L103)getFullTextWhereClause * ****getFullTextWhereClause**(prop): string - Overrides AbstractSqlPlatform.getFullTextWhereClause #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L444)getIndexName * ****getIndexName**(tableName, columns, type): string - Overrides AbstractSqlPlatform.getIndexName Returns the default name of index for the given columns cannot go past 63 character length for identifiers in MySQL *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L78)getIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; generated?: string; length?: number } * ##### optionalautoincrement: boolean * ##### optionalgenerated: string * ##### optionallength: number #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L279)getIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L287)getJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L316)getJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Overrides AbstractSqlPlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L171)getMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Overrides AbstractSqlPlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from AbstractSqlPlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L178)getRegExpOperator * ****getRegExpOperator**(val, flags): string - Overrides AbstractSqlPlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L187)getRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Overrides AbstractSqlPlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from AbstractSqlPlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from AbstractSqlPlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from AbstractSqlPlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from AbstractSqlPlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from AbstractSqlPlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L291)getSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Overrides AbstractSqlPlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: undefined | string | [Type](https://mikro-orm.io/api/core/class/Type.md)\ * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from AbstractSqlPlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from AbstractSqlPlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L216)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from AbstractSqlPlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from AbstractSqlPlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L74)getTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(): string - Overrides AbstractSqlPlatform.getTimeTypeDeclarationSQL #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from AbstractSqlPlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L95)getTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L99)getUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L265)getVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Overrides AbstractSqlPlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L400)indexForeignKeys * ****indexForeignKeys**(): boolean - Overrides AbstractSqlPlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from AbstractSqlPlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L197)isBigIntProperty * ****isBigIntProperty**(prop): boolean - Overrides AbstractSqlPlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from AbstractSqlPlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from AbstractSqlPlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from AbstractSqlPlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from AbstractSqlPlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from AbstractSqlPlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L242)marshallArray * ****marshallArray**(values): string - Overrides AbstractSqlPlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L133)normalizeColumnType * ****normalizeColumnType**(type, options): string - Overrides AbstractSqlPlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { autoincrement?: boolean; length?: number; precision?: number; scale?: number } = {} * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from AbstractSqlPlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L478)parseDate * ****parseDate**(value): Date - Overrides AbstractSqlPlatform.parseDate * **@inheritDoc** *** #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L474)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from AbstractSqlPlatform.processDateProperty #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L335)quoteIdentifier * ****quoteIdentifier**(id, quote): string - Overrides AbstractSqlPlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '"' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L65)inheritedquoteValue * ****quoteValue**(value): string - Inherited from AbstractSqlPlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L184)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from AbstractSqlPlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L25)setConfig * ****setConfig**(config): void - Overrides AbstractSqlPlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from AbstractSqlPlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L116)supportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Overrides AbstractSqlPlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L45)supportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Overrides AbstractSqlPlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L629)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from AbstractSqlPlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from AbstractSqlPlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L226)supportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Overrides AbstractSqlPlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L41)supportsNativeEnums * ****supportsNativeEnums**(): boolean - Overrides AbstractSqlPlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L432)supportsSchemas * ****supportsSchemas**(): boolean - Overrides AbstractSqlPlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from AbstractSqlPlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from AbstractSqlPlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L247)unmarshallArray * ****unmarshallArray**(value): string\[] - Overrides AbstractSqlPlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from AbstractSqlPlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from AbstractSqlPlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L37)usesCascadeStatement * ****usesCascadeStatement**(): boolean - Overrides AbstractSqlPlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L108)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from AbstractSqlPlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from AbstractSqlPlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from AbstractSqlPlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from AbstractSqlPlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from AbstractSqlPlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlPlatform.ts#L33)usesReturningStatement * ****usesReturningStatement**(): boolean - Overrides AbstractSqlPlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from AbstractSqlPlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/postgresql/class/PostgreSqlSchemaHelper.md # PostgreSqlSchemaHelper ### Hierarchy * [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) * *PostgreSqlSchemaHelper* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**DEFAULT\_VALUES](#DEFAULT_VALUES) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAllChecks](#getAllChecks) * [**getAllColumns](#getAllColumns) * [**getAllForeignKeys](#getAllForeignKeys) * [**getAllIndexes](#getAllIndexes) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getNativeEnumDefinitions](#getNativeEnumDefinitions) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new PostgreSqlSchemaHelper**(platform): [PostgreSqlSchemaHelper](https://mikro-orm.io/api/postgresql/class/PostgreSqlSchemaHelper.md) - Inherited from SchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [PostgreSqlSchemaHelper](https://mikro-orm.io/api/postgresql/class/PostgreSqlSchemaHelper.md) ## Properties[**](#Properties) ### [**](#DEFAULT_VALUES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L18)staticreadonlyDEFAULT\_VALUES **DEFAULT\_VALUES: { ('now'::text)::timestamp(?) with time zone: string\[]; ('now'::text)::timestamp(?) without time zone: string\[]; current\_timestamp(?): string\[]; now(): string\[]; null::character varying: string\[]; null::timestamp with time zone: string\[]; null::timestamp without time zone: string\[] } = ... #### Type declaration * ##### ('now'::text)::timestamp(?) with time zone: string\[] * ##### ('now'::text)::timestamp(?) without time zone: string\[] * ##### current\_timestamp(?): string\[] * ##### now(): string\[] * ##### null::character varying: string\[] * ##### null::timestamp with time zone: string\[] * ##### null::timestamp without time zone: string\[] ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from SchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from SchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L492)configureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Overrides SchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from SchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from SchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from SchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from SchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from SchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from SchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L414)createTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Overrides SchemaHelper.createTableColumn #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L353)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from SchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L625)disableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Overrides SchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from SchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L629)enableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Overrides SchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from SchemaHelper.finalizeTable #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAllChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L226)getAllChecks * ****getAllChecks**(connection, tablesBySchemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]>> ### [**](#getAllColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L143)getAllColumns * ****getAllColumns**(connection, tablesBySchemas, nativeEnums): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ * ##### optionalnativeEnums: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<{ items: string\[]; name: string; schema?: string }> #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]>> ### [**](#getAllForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L247)getAllForeignKeys * ****getAllForeignKeys**(connection, tablesBySchemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tablesBySchemas: Map\ #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)>>> ### [**](#getAllIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L106)getAllIndexes * ****getAllIndexes**(connection, tables): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]>> ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L570)getAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Overrides SchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L355)getAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Overrides SchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L533)optionalinheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from SchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L589)getChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Overrides SchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L669)getChecks * ****getChecks**(connection, tableName, schemaName, columns): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Overrides SchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### schemaName: string * ##### optionalcolumns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L675)getColumns * ****getColumns**(connection, tableName, schemaName): Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> - Overrides SchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L36)getCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Overrides SchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from SchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from SchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L339)getCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Overrides SchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L613)getDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Overrides SchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L617)getDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Overrides SchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from SchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L155)inheritedgetDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Inherited from SchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L323)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from SchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from SchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from SchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L347)getDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Overrides SchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L375)getEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Overrides SchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### optionaltableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from SchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L271)inheritedgetForeignKeysSQL * ****getForeignKeysSQL**(tableName, schemaName): string - Inherited from SchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L681)getIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Overrides SchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L40)getListTablesSQL * ****getListTablesSQL**(): string - Overrides SchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L621)getManagementDbName * ****getManagementDbName**(): string - Overrides SchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L51)getNamespaces * ****getNamespaces**(connection): Promise\ - Overrides SchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getNativeEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L305)getNativeEnumDefinitions * ****getNativeEnumDefinitions**(connection, schemas): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<{ items: string\[]; name: string; schema? : string }>> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### schemas: string\[] #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<{ items: string\[]; name: string; schema?: string }>> ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L544)getPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Overrides SchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L504)getPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Overrides SchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L52)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from SchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] = \[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from SchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L119)inheritedgetRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - Inherited from SchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L633)getRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Overrides SchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L28)getSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Overrides SchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from SchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from SchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from SchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L686)inferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Overrides SchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L78)loadInformationSchema * ****loadInformationSchema**(schema, connection, tables, schemas): Promise\ - Overrides SchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalschemas: string\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L275)inheritedmapForeignKeys * ****mapForeignKeys**(fks, tableName, schemaName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from SchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/postgresql/src/PostgreSqlSchemaHelper.ts#L595)normalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length): string | number - Overrides SchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### length: number #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from SchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from SchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L48)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from SchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/core/function/PrimaryKey.md # PrimaryKey ### Callable * ****PrimaryKey**\(options): (target, propertyName) => any *** * #### Parameters * ##### options: [PrimaryKeyOptions](https://mikro-orm.io/api/core/interface/PrimaryKeyOptions.md)\ = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/PrimaryKeyOptions.md # PrimaryKeyOptions \ ### Hierarchy * [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ * *PrimaryKeyOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof T Inherited from PropertyOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from PropertyOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from PropertyOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from PropertyOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from PropertyOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from PropertyOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from PropertyOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from PropertyOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from PropertyOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from PropertyOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from PropertyOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from PropertyOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from PropertyOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from PropertyOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from PropertyOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from PropertyOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof T Inherited from PropertyOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from PropertyOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from PropertyOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from PropertyOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from PropertyOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from PropertyOptions.index Explicitly specify index on a property. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from PropertyOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from PropertyOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from PropertyOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from PropertyOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from PropertyOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from PropertyOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from PropertyOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from PropertyOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from PropertyOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from PropertyOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from PropertyOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from PropertyOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from PropertyOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from PropertyOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from PropertyOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from PropertyOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from PropertyOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from PropertyOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from PropertyOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from PropertyOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from PropertyOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from PropertyOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/core/function/Property.md # Property ### Callable * ****Property**\(options): (target, propertyName) => any *** * #### Parameters * ##### options: [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: any * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/PropertyOptions.md # PropertyOptions \ ### Hierarchy * *PropertyOptions* * [PrimaryKeyOptions](https://mikro-orm.io/api/core/interface/PrimaryKeyOptions.md) * [SerializedPrimaryKeyOptions](https://mikro-orm.io/api/core/interface/SerializedPrimaryKeyOptions.md) * [ReferenceOptions](https://mikro-orm.io/api/core/interface/ReferenceOptions.md) * [EnumOptions](https://mikro-orm.io/api/core/interface/EnumOptions.md) * [FormulaOptions](https://mikro-orm.io/api/core/interface/FormulaOptions.md) * [EmbeddedOptions](https://mikro-orm.io/api/core/interface/EmbeddedOptions.md) ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalaccessor **accessor? : boolean | keyof Owner When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalautoincrement **autoincrement? : boolean Explicitly specify the auto increment of the primary key. ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalcomment **comment? : string Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalconcurrencyCheck **concurrencyCheck? : boolean Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionaldefault **default? : null | string | number | boolean | string\[] | number\[] Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionaldefaultRaw **defaultRaw? : string Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalextra **extra? : string mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalfieldName **fieldName? : string Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalfieldNames **fieldNames? : string\[] Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalformula **formula? : string | (alias) => string Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalgenerated **generated? : string | GeneratedColumnCallback\ For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalgetter **getter? : boolean Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalgetterName **getterName? : keyof Owner When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalgroups **groups? : string\[] Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalhidden **hidden? : boolean Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalhydrate **hydrate? : boolean Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalindex **index? : string | boolean Explicitly specify index on a property. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionallazy **lazy? : boolean Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionallength **length? : number Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalname **name? : string Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalnullable **nullable? : boolean Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalonCreate **onCreate? : (entity, em) => any Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalonUpdate **onUpdate? : (entity, em) => any Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalpersist **persist? : boolean Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalprecision **precision? : number Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalprimary **primary? : boolean Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalref **ref? : boolean Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalreturning **returning? : boolean Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalruntimeType **runtimeType? : string Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalscale **scale? : number Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalserializedName **serializedName? : string Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalserializedPrimaryKey **serializedPrimaryKey? : boolean Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalserializer **serializer? : (value, options) => any Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalsetter **setter? : boolean Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionaltrackChanges **trackChanges? : boolean Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionaltype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalunique **unique? : string | boolean Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalunsigned **unsigned? : boolean Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalversion **version? : boolean Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/knex/class/QueryBuilder.md # QueryBuilder \ SQL query builder with fluent interface. ``` const qb = orm.em.createQueryBuilder(Publisher); qb.select('*') .where({ name: 'test 123', type: PublisherType.GLOBAL, }) .orderBy({ name: QueryOrder.DESC, type: QueryOrder.ASC, }) .limit(2, 1); const publisher = await qb.getSingleResult(); ``` ### Hierarchy * *QueryBuilder* * [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md) * [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md) ## Index[**](#Index) ### Accessors * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResult](#getResult) * [**getResultAndCount](#getResultAndCount) * [**getResultList](#getResultList) * [**getSingleResult](#getSingleResult) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Accessors[**](#Accessors) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)alias * **get alias(): string - #### Returns string ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)helper * **get helper(): QueryBuilderHelper - #### Returns QueryBuilderHelper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)mainAlias * **get mainAlias(): [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ - #### Returns [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)addSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)andHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)andWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)applyFilters * ****applyFilters**(filterOptions): Promise\ - Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)as * ****as**(alias): QueryBuilder\ - Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)cache * ****cache**(config): this - #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)clone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)comment * ****comment**(comment): this - Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)count * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)delete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)distinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)distinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L990)execute * ****execute**\(method, options): Promise\ - Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionaloptions: boolean | [ExecuteOptions](https://mikro-orm.io/api/knex/interface/ExecuteOptions.md) #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)from * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)getCount * ****getCount**(field, distinct): Promise\ - Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)getFormattedQuery * ****getFormattedQuery**(): string - Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)getKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)getKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)getLoggerContext * ****getLoggerContext**\(): T - Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)getParams * ****getParams**(): readonly Value\[] - Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)getQuery * ****getQuery**(): string - Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1054)getResult * ****getResult**(): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Alias for `qb.getResultList()` *** #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)getResultAndCount * ****getResultAndCount**(): Promise<\[Entity\[], number]> - Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[Entity\[], number]> ### [**](#getResultList)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1061)getResultList * ****getResultList**(limit): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Executes the query, returning array of results *** #### Parameters * ##### optionallimit: number #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#getSingleResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1097)getSingleResult * ****getSingleResult**(): Promise\ - Executes the query, returning the first result or null *** #### Returns Promise\ ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)groupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)hasFlag * ****hasFlag**(flag): boolean - #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)having * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)hintComment * ****hintComment**(comment): this - Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)ignore * ****ignore**(): this - #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)indexHint * ****indexHint**(sql): this - Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)innerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> - #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)innerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)innerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)innerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)insert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)join * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> - #### Parameters * ##### field: QueryBuilder\ | Field | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)joinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)leftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> - #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)leftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)leftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)leftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)limit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)merge * ****merge**(data): this - #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)offset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)onConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)orderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)orHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)orWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)returning * ****returning**(fields): this - #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)select * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)setFlag * ****setFlag**(flag): this - #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)setFlushMode * ****setFlushMode**(flushMode): this - #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)setLockMode * ****setLockMode**(mode, tables): this - #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)setLoggerContext * ****setLoggerContext**(context): void - Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1137)then * ****then**\(onfulfilled, onrejected): Promise\\[] | [QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise\\[] | [QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)toQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)truncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)unsetFlag * ****unsetFlag**(flag): this - #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)update * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L532)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L533)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L534)where * ****where**(cond, operator): this * ****where**(cond, params, operator): this - #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)withSchema * ****withSchema**(schema): this - #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)withSubQuery * ****withSubQuery**(subQuery, alias): this - #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/enum/QueryFlag.md # QueryFlag ## Index[**](#Index) ### Enumeration Members * [**AUTO\_JOIN\_ONE\_TO\_ONE\_OWNER](#AUTO_JOIN_ONE_TO_ONE_OWNER) * [**CONVERT\_CUSTOM\_TYPES](#CONVERT_CUSTOM_TYPES) * [**DELETE\_SUB\_QUERY](#DELETE_SUB_QUERY) * [**DISABLE\_NESTED\_INNER\_JOIN](#DISABLE_NESTED_INNER_JOIN) * [**DISABLE\_PAGINATE](#DISABLE_PAGINATE) * [**DISTINCT](#DISTINCT) * [**IDENTITY\_INSERT](#IDENTITY_INSERT) * [**INCLUDE\_LAZY\_FORMULAS](#INCLUDE_LAZY_FORMULAS) * [**INFER\_POPULATE](#INFER_POPULATE) * [**PAGINATE](#PAGINATE) * [**UPDATE\_SUB\_QUERY](#UPDATE_SUB_QUERY) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#AUTO_JOIN_ONE_TO_ONE_OWNER)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L114)AUTO\_JOIN\_ONE\_TO\_ONE\_OWNER **AUTO\_JOIN\_ONE\_TO\_ONE\_OWNER: AUTO\_JOIN\_ONE\_TO\_ONE\_OWNER ### [**](#CONVERT_CUSTOM_TYPES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L112)CONVERT\_CUSTOM\_TYPES **CONVERT\_CUSTOM\_TYPES: CONVERT\_CUSTOM\_TYPES ### [**](#DELETE_SUB_QUERY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L111)DELETE\_SUB\_QUERY **DELETE\_SUB\_QUERY: DELETE\_SUB\_QUERY ### [**](#DISABLE_NESTED_INNER_JOIN)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L116)DISABLE\_NESTED\_INNER\_JOIN **DISABLE\_NESTED\_INNER\_JOIN: DISABLE\_NESTED\_INNER\_JOIN ### [**](#DISABLE_PAGINATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L109)DISABLE\_PAGINATE **DISABLE\_PAGINATE: DISABLE\_PAGINATE ### [**](#DISTINCT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L107)DISTINCT **DISTINCT: DISTINCT ### [**](#IDENTITY_INSERT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L117)IDENTITY\_INSERT **IDENTITY\_INSERT: IDENTITY\_INSERT ### [**](#INCLUDE_LAZY_FORMULAS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L113)INCLUDE\_LAZY\_FORMULAS **INCLUDE\_LAZY\_FORMULAS: INCLUDE\_LAZY\_FORMULAS ### [**](#INFER_POPULATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L115)INFER\_POPULATE **INFER\_POPULATE: INFER\_POPULATE ### [**](#PAGINATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L108)PAGINATE **PAGINATE: PAGINATE ### [**](#UPDATE_SUB_QUERY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L110)UPDATE\_SUB\_QUERY **UPDATE\_SUB\_QUERY: UPDATE\_SUB\_QUERY --- # Source: https://mikro-orm.io/api/core/enum/QueryOperator.md # QueryOperator ## Index[**](#Index) ### Enumeration Members * [**$contained](#$contained) * [**$contains](#$contains) * [**$eq](#$eq) * [**$every](#$every) * [**$exists](#$exists) * [**$fulltext](#$fulltext) * [**$gt](#$gt) * [**$gte](#$gte) * [**$hasKey](#$hasKey) * [**$hasKeys](#$hasKeys) * [**$hasSomeKeys](#$hasSomeKeys) * [**$ilike](#$ilike) * [**$in](#$in) * [**$like](#$like) * [**$lt](#$lt) * [**$lte](#$lte) * [**$ne](#$ne) * [**$nin](#$nin) * [**$none](#$none) * [**$not](#$not) * [**$overlap](#$overlap) * [**$re](#$re) * [**$some](#$some) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#$contained)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L46)$contained **$contained: <@ ### [**](#$contains)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L45)$contains **$contains: @> ### [**](#$eq)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L30)$eq **$eq: = ### [**](#$every)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L49)$every **$every: every ### [**](#$exists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L42)$exists **$exists: not null ### [**](#$fulltext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L41)$fulltext **$fulltext: fulltext ### [**](#$gt)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L33)$gt **$gt: > ### [**](#$gte)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L34)$gte **$gte: >= ### [**](#$hasKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L50)$hasKey **$hasKey: ? ### [**](#$hasKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L51)$hasKeys **$hasKeys: ?& ### [**](#$hasSomeKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L52)$hasSomeKeys **$hasSomeKeys: ?| ### [**](#$ilike)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L43)$ilike **$ilike: ilike ### [**](#$in)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L31)$in **$in: in ### [**](#$like)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L39)$like **$like: like ### [**](#$lt)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L35)$lt **$lt: < ### [**](#$lte)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L36)$lte **$lte: <= ### [**](#$ne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L37)$ne **$ne: != ### [**](#$nin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L32)$nin **$nin: not in ### [**](#$none)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L47)$none **$none: none ### [**](#$not)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L38)$not **$not: not ### [**](#$overlap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L44)$overlap **$overlap: && ### [**](#$re)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L40)$re **$re: regexp ### [**](#$some)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L48)$some **$some: some --- # Source: https://mikro-orm.io/api/core/enum/QueryOrder.md # QueryOrder ## Index[**](#Index) ### Enumeration Members * [**asc](#asc) * [**ASC](#ASC) * [**asc\_nulls\_first](#asc_nulls_first) * [**ASC\_NULLS\_FIRST](#ASC_NULLS_FIRST) * [**asc\_nulls\_last](#asc_nulls_last) * [**ASC\_NULLS\_LAST](#ASC_NULLS_LAST) * [**desc](#desc) * [**DESC](#DESC) * [**desc\_nulls\_first](#desc_nulls_first) * [**DESC\_NULLS\_FIRST](#DESC_NULLS_FIRST) * [**desc\_nulls\_last](#desc_nulls_last) * [**DESC\_NULLS\_LAST](#DESC_NULLS_LAST) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#asc)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L80)asc **asc: asc ### [**](#ASC)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L74)ASC **ASC: ASC ### [**](#asc_nulls_first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L82)asc\_nulls\_first **asc\_nulls\_first: asc nulls first ### [**](#ASC_NULLS_FIRST)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L76)ASC\_NULLS\_FIRST **ASC\_NULLS\_FIRST: ASC NULLS FIRST ### [**](#asc_nulls_last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L81)asc\_nulls\_last **asc\_nulls\_last: asc nulls last ### [**](#ASC_NULLS_LAST)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L75)ASC\_NULLS\_LAST **ASC\_NULLS\_LAST: ASC NULLS LAST ### [**](#desc)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L83)desc **desc: desc ### [**](#DESC)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L77)DESC **DESC: DESC ### [**](#desc_nulls_first)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L85)desc\_nulls\_first **desc\_nulls\_first: desc nulls first ### [**](#DESC_NULLS_FIRST)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L79)DESC\_NULLS\_FIRST **DESC\_NULLS\_FIRST: DESC NULLS FIRST ### [**](#desc_nulls_last)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L84)desc\_nulls\_last **desc\_nulls\_last: desc nulls last ### [**](#DESC_NULLS_LAST)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L78)DESC\_NULLS\_LAST **DESC\_NULLS\_LAST: DESC NULLS LAST --- # Source: https://mikro-orm.io/api/core/enum/QueryOrderNumeric.md # QueryOrderNumeric ## Index[**](#Index) ### Enumeration Members * [**ASC](#ASC) * [**DESC](#DESC) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#ASC)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L89)ASC **ASC: 1 ### [**](#DESC)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L90)DESC **DESC: -1 --- # Source: https://mikro-orm.io/api/core/interface/QueryResult.md # QueryResult \ ## Index[**](#Index) ### Properties * [**affectedRows](#affectedRows) * [**insertedIds](#insertedIds) * [**insertId](#insertId) * [**row](#row) * [**rows](#rows) ## Properties[**](#Properties) ### [**](#affectedRows)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L175)affectedRows **affectedRows: number ### [**](#insertedIds)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L179)optionalinsertedIds **insertedIds? : [Primary](https://mikro-orm.io/api/core.md#Primary)\\[] ### [**](#insertId)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L176)insertId **insertId: [Primary](https://mikro-orm.io/api/core.md#Primary)\ ### [**](#row)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L177)optionalrow **row? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#rows)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L178)optionalrows **rows? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\[] --- # Source: https://mikro-orm.io/api/knex/enum/QueryType.md # QueryType ## Index[**](#Index) ### Enumeration Members * [**COUNT](#COUNT) * [**DELETE](#DELETE) * [**INSERT](#INSERT) * [**SELECT](#SELECT) * [**TRUNCATE](#TRUNCATE) * [**UPDATE](#UPDATE) * [**UPSERT](#UPSERT) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#COUNT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L4)COUNT **COUNT: COUNT ### [**](#DELETE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L7)DELETE **DELETE: DELETE ### [**](#INSERT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L5)INSERT **INSERT: INSERT ### [**](#SELECT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L3)SELECT **SELECT: SELECT ### [**](#TRUNCATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L2)TRUNCATE **TRUNCATE: TRUNCATE ### [**](#UPDATE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L6)UPDATE **UPDATE: UPDATE ### [**](#UPSERT)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L8)UPSERT **UPSERT: UPSERT --- # Source: https://mikro-orm.io/api/core/class/RawQueryFragment.md # RawQueryFragment ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**params](#params) * [**sql](#sql) * [**cloneRegistry](#cloneRegistry) ### Methods * [**as](#as) * [**clone](#clone) * [**toJSON](#toJSON) * [**toString](#toString) * [**valueOf](#valueOf) * [**getKnownFragment](#getKnownFragment) * [**isKnownFragment](#isKnownFragment) * [**remove](#remove) * [**run](#run) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L17)constructor * ****new RawQueryFragment**(sql, params): [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) - #### Parameters * ##### sql: string * ##### params: unknown\[] = \[] #### Returns [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ## Properties[**](#Properties) ### [**](#params)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L19)readonlyparams **params: unknown\[] = \[] ### [**](#sql)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L18)readonlysql **sql: string ### [**](#cloneRegistry)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L11)staticoptionalcloneRegistry **cloneRegistry? : Set\ ## Methods[**](#Methods) ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L24)as * ****as**(alias): [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) - #### Parameters * ##### alias: string #### Returns [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L57)clone * ****clone**(): [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) - #### Returns [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L38)toJSON * ****toJSON**(): string - #### Returns string ### [**](#toString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L42)toString * ****toString**(): string - #### Returns string ### [**](#valueOf)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L34)valueOf * ****valueOf**(): string - #### Returns string ### [**](#getKnownFragment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L86)staticgetKnownFragment * ****getKnownFragment**(key, cleanup): undefined | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) - #### Parameters * ##### key: string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) * ##### cleanup: boolean = true #### Returns undefined | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ### [**](#isKnownFragment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L78)staticisKnownFragment * ****isKnownFragment**(key): boolean - #### Parameters * ##### key: string | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) #### Returns boolean ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L100)staticremove * ****remove**(key): void - #### Parameters * ##### key: string #### Returns void ### [**](#run)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L62)staticrun * ****run**\(cb): Promise\ - #### Parameters * ##### cb: (...args) => Promise\ #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/class/ReadOnlyException.md # ReadOnlyException Exception for a write operation attempt on a read-only database element detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *ReadOnlyException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new ReadOnlyException**(previous): [ReadOnlyException](https://mikro-orm.io/api/core/class/ReadOnlyException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [ReadOnlyException](https://mikro-orm.io/api/core/class/ReadOnlyException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/Reference.md # Reference \ ### Hierarchy * *Reference* * [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**getEntity](#getEntity) * [**getProperty](#getProperty) * [**isInitialized](#isInitialized) * [**load](#load) * [**loadOrFail](#loadOrFail) * [**loadProperty](#loadProperty) * [**populated](#populated) * [**toJSON](#toJSON) * [**unwrap](#unwrap) * [**create](#create) * [**createFromPK](#createFromPK) * [**createNakedFromPK](#createNakedFromPK) * [**isReference](#isReference) * [**unwrapReference](#unwrapReference) * [**wrapReference](#wrapReference) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L25)constructor * ****new Reference**\(entity): [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ - #### Parameters * ##### entity: T #### Returns [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L169)getEntity * ****getEntity**(): T - #### Returns T ### [**](#getProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L177)getProperty * ****getProperty**\(prop): T\[K] - #### Parameters * ##### prop: K #### Returns T\[K] ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L186)isInitialized * ****isInitialized**(): boolean - #### Returns boolean ### [**](#load)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L117)load * ****load**\(options): Promise\> - Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity. If the entity is not found in the database (e.g. it was deleted in the meantime, or currently active filters disallow loading of it) the method returns `null`. Use `loadOrFail()` if you want an error to be thrown in such a case. *** #### Parameters * ##### options: [LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md)\ = {} #### Returns Promise\> ### [**](#loadOrFail)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L146)loadOrFail * ****loadOrFail**\(options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). *** #### Parameters * ##### options: [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md)\ = {} #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#loadProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L181)loadProperty * ****loadProperty**\(prop, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[K]> - #### Parameters * ##### prop: K * ##### optionaloptions: [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md)\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[K]> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L190)populated * ****populated**(populated): void - #### Parameters * ##### optionalpopulated: boolean #### Returns void ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L194)toJSON * ****toJSON**(...args): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - #### Parameters * ##### rest...args: any\[] #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#unwrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L165)unwrap * ****unwrap**(): T - #### Returns T ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L46)staticcreate * ****create**\(entity): [Ref](https://mikro-orm.io/api/core.md#Ref)\ - #### Parameters * ##### entity: T | [Ref](https://mikro-orm.io/api/core.md#Ref)\ #### Returns [Ref](https://mikro-orm.io/api/core.md#Ref)\ ### [**](#createFromPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L57)staticcreateFromPK * ****createFromPK**\(entityType, pk, options): [Ref](https://mikro-orm.io/api/core.md#Ref)\ - #### Parameters * ##### entityType: [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ * ##### pk: T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T * ##### optionaloptions: { schema?: string } * ##### optionalschema: string #### Returns [Ref](https://mikro-orm.io/api/core.md#Ref)\ ### [**](#createNakedFromPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L62)staticcreateNakedFromPK * ****createNakedFromPK**\(entityType, pk, options): T - #### Parameters * ##### entityType: [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ * ##### pk: T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T * ##### optionaloptions: { schema?: string } * ##### optionalschema: string #### Returns T ### [**](#isReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L87)staticisReference * ****isReference**\(data): data is [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ - Checks whether the argument is instance of `Reference` wrapper. *** #### Parameters * ##### data: any #### Returns data is [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ ### [**](#unwrapReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L108)staticunwrapReference * ****unwrapReference**\(ref): T - Returns wrapped entity. *** #### Parameters * ##### ref: T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md)\ | [Ref](https://mikro-orm.io/api/core.md#Ref)\ #### Returns T ### [**](#wrapReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L94)staticwrapReference * ****wrapReference**\(entity, prop): T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ - Wraps the entity in a `Reference` wrapper if the property is defined as `ref`. *** #### Parameters * ##### entity: T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns T | [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ --- # Source: https://mikro-orm.io/api/core/enum/ReferenceKind.md # ReferenceKind ## Index[**](#Index) ### Enumeration Members * [**EMBEDDED](#EMBEDDED) * [**MANY\_TO\_MANY](#MANY_TO_MANY) * [**MANY\_TO\_ONE](#MANY_TO_ONE) * [**ONE\_TO\_MANY](#ONE_TO_MANY) * [**ONE\_TO\_ONE](#ONE_TO_ONE) * [**SCALAR](#SCALAR) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#EMBEDDED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L128)EMBEDDED **EMBEDDED: embedded ### [**](#MANY_TO_MANY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L127)MANY\_TO\_MANY **MANY\_TO\_MANY: m:n ### [**](#MANY_TO_ONE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L126)MANY\_TO\_ONE **MANY\_TO\_ONE: m:1 ### [**](#ONE_TO_MANY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L125)ONE\_TO\_MANY **ONE\_TO\_MANY: 1:m ### [**](#ONE_TO_ONE)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L124)ONE\_TO\_ONE **ONE\_TO\_ONE: 1:1 ### [**](#SCALAR)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L123)SCALAR **SCALAR: scalar --- # Source: https://mikro-orm.io/api/core/interface/ReferenceOptions.md # ReferenceOptions \ ### Hierarchy * [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ * *ReferenceOptions* * [OneToManyOptions](https://mikro-orm.io/api/core/interface/OneToManyOptions.md) * [ManyToOneOptions](https://mikro-orm.io/api/core/interface/ManyToOneOptions.md) * [ManyToManyOptions](https://mikro-orm.io/api/core/interface/ManyToManyOptions.md) ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**cascade](#cascade) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**eager](#eager) * [**entity](#entity) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**filters](#filters) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**strategy](#strategy) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof Owner Inherited from PropertyOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from PropertyOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L336)optionalcascade **cascade? : [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md)\[] Set what actions on owning entity should be cascaded to the relationship. Defaults to \[Cascade.PERSIST, Cascade.MERGE] (see [cascading](https://mikro-orm.io/docs/cascading.md)). ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from PropertyOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from PropertyOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from PropertyOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from PropertyOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from PropertyOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from PropertyOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from PropertyOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from PropertyOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#eager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L339)optionaleager **eager? : boolean Always load the relationship. Discouraged for use with to-many relations for performance reasons. ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L333)optionalentity **entity? : string | () => [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ Set target entity type. ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from PropertyOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from PropertyOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from PropertyOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L345)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) Control filter parameters for the relation. This will serve as a default value when processing filters on this relation. It's value can be overridden via `em.fork()` or `FindOptions`. ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from PropertyOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from PropertyOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from PropertyOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof Owner Inherited from PropertyOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from PropertyOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from PropertyOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from PropertyOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from PropertyOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from PropertyOptions.index Explicitly specify index on a property. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from PropertyOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from PropertyOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from PropertyOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from PropertyOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from PropertyOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from PropertyOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: Owner * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from PropertyOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from PropertyOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from PropertyOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from PropertyOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from PropertyOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from PropertyOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from PropertyOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from PropertyOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from PropertyOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from PropertyOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from PropertyOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#strategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L342)optionalstrategy **strategy? : [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) | select-in | joined | balanced Override the default loading strategy for this property. This option has precedence over the global `loadStrategy`, but can be overridden by `FindOptions.strategy`. ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from PropertyOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L86)optionalinheritedtype **type? : string | Date | uint8array | array | enumArray | unknown | [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [Type](https://mikro-orm.io/api/core/class/Type.md)\ | [Constructor](https://mikro-orm.io/api/core.md#Constructor)\> | ObjectId | [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Type](https://mikro-orm.io/api/core/class/Type.md)\> | () => unknown | ColumnType Inherited from PropertyOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from PropertyOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from PropertyOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from PropertyOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md # ReflectMetadataProvider ### Hierarchy * [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) * *ReflectMetadataProvider* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**loadEntityMetadata](#loadEntityMetadata) * [**loadFromCache](#loadFromCache) * [**useCache](#useCache) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L13)constructor * ****new ReflectMetadataProvider**(config): [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md) - Inherited from MetadataProvider.constructor #### Parameters * ##### config: [IConfiguration](https://mikro-orm.io/api/core/interface/IConfiguration.md) #### Returns [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md) ## Methods[**](#Methods) ### [**](#loadEntityMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/ReflectMetadataProvider.ts#L9)loadEntityMetadata * ****loadEntityMetadata**(meta, name): void - Overrides MetadataProvider.loadEntityMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### name: string #### Returns void ### [**](#loadFromCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L17)inheritedloadFromCache * ****loadFromCache**(meta, cache): void - Inherited from MetadataProvider.loadFromCache #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### cache: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void ### [**](#useCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L29)inheriteduseCache * ****useCache**(): boolean - Inherited from MetadataProvider.useCache #### Returns boolean --- # Source: https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md # RefreshDatabaseOptions ### Hierarchy * [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) * *RefreshDatabaseOptions* ## Index[**](#Index) ### Properties * [**dropDb](#dropDb) * [**ensureIndexes](#ensureIndexes) * [**schema](#schema) * [**wrap](#wrap) ## Properties[**](#Properties) ### [**](#dropDb)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L904)optionaldropDb **dropDb? : boolean ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L903)optionalensureIndexes **ensureIndexes? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L871)optionalinheritedschema **schema? : string Inherited from CreateSchemaOptions.schema ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L870)optionalinheritedwrap **wrap? : boolean Inherited from CreateSchemaOptions.wrap --- # Source: https://mikro-orm.io/api/core/interface/RegisterOptions.md # RegisterOptions ## Index[**](#Index) ### Properties * [**loaded](#loaded) * [**newEntity](#newEntity) * [**refresh](#refresh) ## Properties[**](#Properties) ### [**](#loaded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L1272)optionalloaded **loaded? : boolean ### [**](#newEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L1271)optionalnewEntity **newEntity? : boolean ### [**](#refresh)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L1270)optionalrefresh **refresh? : boolean --- # Source: https://mikro-orm.io/api/core/class/RequestContext.md # RequestContext Uses `AsyncLocalStorage` to create async context that holds the current EM fork. ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**id](#id) * [**map](#map) ### Accessors * [**em](#em) ### Methods * [**create](#create) * [**currentRequestContext](#currentRequestContext) * [**enter](#enter) * [**getEntityManager](#getEntityManager) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L14)constructor * ****new RequestContext**(map): [RequestContext](https://mikro-orm.io/api/core/class/RequestContext.md) - #### Parameters * ##### map: Map\>> #### Returns [RequestContext](https://mikro-orm.io/api/core/class/RequestContext.md) ## Properties[**](#Properties) ### [**](#id)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L12)readonlyid **id: number = ... ### [**](#map)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L14)readonlymap **map: Map\>> ## Accessors[**](#Accessors) ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L19)em * **get em(): undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> - Returns default EntityManager. *** #### Returns undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> ## Methods[**](#Methods) ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L28)staticcreate * ****create**\(em, next, options): T - Creates new RequestContext instance and runs the code inside its domain. If the handler is async, the return value needs to be awaited. Uses `AsyncLocalStorage.run()`, suitable for regular express style middlewares with a `next` callback. *** #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>\[] * ##### next: (...args) => T * ##### options: [CreateContextOptions](https://mikro-orm.io/api/core/interface/CreateContextOptions.md) = {} #### Returns T ### [**](#currentRequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L46)staticcurrentRequestContext * ****currentRequestContext**(): undefined | [RequestContext](https://mikro-orm.io/api/core/class/RequestContext.md) - Returns current RequestContext (if available). *** #### Returns undefined | [RequestContext](https://mikro-orm.io/api/core/class/RequestContext.md) ### [**](#enter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L38)staticenter * ****enter**(em, options): void - Creates new RequestContext instance and runs the code inside its domain. If the handler is async, the return value needs to be awaited. Uses `AsyncLocalStorage.enterWith()`, suitable for elysia style middlewares without a `next` callback. *** #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>\[] * ##### options: [CreateContextOptions](https://mikro-orm.io/api/core/interface/CreateContextOptions.md) = {} #### Returns void ### [**](#getEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L53)staticgetEntityManager * ****getEntityManager**(name): undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> - Returns current EntityManager (if available). *** #### Parameters * ##### name: string = 'default' #### Returns undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> --- # Source: https://mikro-orm.io/api/core/namespace/RequiredNullable.md # RequiredNullable ## Index[**](#Index) ### Interfaces * [**Brand](https://mikro-orm.io/api/core/namespace/RequiredNullable.md#Brand) ### Variables * [**\_\_requiredNullable](https://mikro-orm.io/api/core/namespace/RequiredNullable.md#__requiredNullable) ## Interfaces[**](#Interfaces) ### [**](#Brand)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L92)Brand **Brand: ### [**](#\[___requiredNullable])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L93)optional\[\_\_\_requiredNullable] **\[\_\_\_requiredNullable]? : 1 ## Variables[**](#Variables) ### [**](#__requiredNullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L91)const\_\_requiredNullable **\_\_requiredNullable: unique symbol --- # Source: https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md # RunQueryBuilder \ ### Hierarchy * Omit<[QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\, getResult | getSingleResult | getResultList | where> * *RunQueryBuilder* * [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md) * [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md) * [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md) * [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md) ## Index[**](#Index) ### Properties * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResultAndCount](#getResultAndCount) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias **alias: string Inherited from Omit.alias ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper **helper: QueryBuilderHelper Inherited from Omit.helper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias **mainAlias: [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ Inherited from Omit.mainAlias ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from Omit.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from Omit.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from Omit.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from Omit.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from Omit.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from Omit.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from Omit.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from Omit.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2014)execute * ****execute**\(method, mapResults): Promise\ - Overrides Omit.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from Omit.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from Omit.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from Omit.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from Omit.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from Omit.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from Omit.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from Omit.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[Entity\[], number]> - Inherited from Omit.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[Entity\[], number]> ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from Omit.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from Omit.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from Omit.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from Omit.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from Omit.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from Omit.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from Omit.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from Omit.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from Omit.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from Omit.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from Omit.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from Omit.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from Omit.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from Omit.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from Omit.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from Omit.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from Omit.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from Omit.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from Omit.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from Omit.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from Omit.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from Omit.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from Omit.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from Omit.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2015)then * ****then**\(onfulfilled, onrejected): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Overrides Omit.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from Omit.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from Omit.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from Omit.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from Omit.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2013)where * ****where**(cond, params, operator): this - #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionalparams: any\[] | $and | $or * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from Omit.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from Omit.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/class/ScalarReference.md # ScalarReference \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**bind](#bind) * [**isInitialized](#isInitialized) * [**load](#load) * [**loadOrFail](#loadOrFail) * [**set](#set) * [**unwrap](#unwrap) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L220)constructor * ****new ScalarReference**\(value, initialized): [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md)\ - #### Parameters * ##### optionalvalue: Value * ##### initialized: boolean = ... #### Returns [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md)\ ## Methods[**](#Methods) ### [**](#bind)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L264)bind * ****bind**\(entity, property): void - #### Parameters * ##### entity: Entity * ##### property: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ #### Returns void ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L274)isInitialized * ****isInitialized**(): boolean - #### Returns boolean ### [**](#load)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L226)load * ****load**(options): Promise\ - Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns either the whole entity, or the requested property. *** #### Parameters * ##### optionaloptions: Omit<[LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md)\, populate | fields | exclude> #### Returns Promise\ ### [**](#loadOrFail)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L244)loadOrFail * ****loadOrFail**(options): Promise\ - Ensures the underlying entity is loaded first (without reloading it if it already is loaded). Returns the entity or throws an error just like `em.findOneOrFail()` (and respects the same config options). *** #### Parameters * ##### options: Omit<[LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md)\, populate | fields | exclude> = {} #### Returns Promise\ ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L259)set * ****set**(value): void - #### Parameters * ##### value: Value #### Returns void ### [**](#unwrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L270)unwrap * ****unwrap**(): undefined | Value - #### Returns undefined | Value --- # Source: https://mikro-orm.io/api/knex/class/SchemaComparator.md # SchemaComparator Compares two Schemas and return an instance of SchemaDifference. ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**compare](#compare) * [**diffColumn](#diffColumn) * [**diffComment](#diffComment) * [**diffEnumItems](#diffEnumItems) * [**diffExpression](#diffExpression) * [**diffForeignKey](#diffForeignKey) * [**diffIndex](#diffIndex) * [**diffTable](#diffTable) * [**hasSameDefaultValue](#hasSameDefaultValue) * [**isIndexFulfilledBy](#isIndexFulfilledBy) * [**parseJsonDefault](#parseJsonDefault) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L27)constructor * ****new SchemaComparator**(platform): [SchemaComparator](https://mikro-orm.io/api/knex/class/SchemaComparator.md) - #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [SchemaComparator](https://mikro-orm.io/api/knex/class/SchemaComparator.md) ## Methods[**](#Methods) ### [**](#compare)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L39)compare * ****compare**(fromSchema, toSchema, inverseDiff): [SchemaDifference](https://mikro-orm.io/api/knex/interface/SchemaDifference.md) - Returns a SchemaDifference object containing the differences between the schemas fromSchema and toSchema. The returned differences are returned in such a way that they contain the operations to change the schema stored in fromSchema to the schema that is stored in toSchema. *** #### Parameters * ##### fromSchema: DatabaseSchema * ##### toSchema: DatabaseSchema * ##### optionalinverseDiff: [SchemaDifference](https://mikro-orm.io/api/knex/interface/SchemaDifference.md) #### Returns [SchemaDifference](https://mikro-orm.io/api/knex/interface/SchemaDifference.md) ### [**](#diffColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L486)diffColumn * ****diffColumn**(fromColumn, toColumn, fromTable, tableName): Set\ - Returns the difference between the columns If there are differences this method returns field2, otherwise the boolean false. *** #### Parameters * ##### fromColumn: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### toColumn: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionaltableName: string #### Returns Set\ ### [**](#diffComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L579)diffComment * ****diffComment**(comment1, comment2): boolean - #### Parameters * ##### optionalcomment1: string * ##### optionalcomment2: string #### Returns boolean ### [**](#diffEnumItems)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L575)diffEnumItems * ****diffEnumItems**(items1, items2): boolean - #### Parameters * ##### items1: string\[] = \[] * ##### items2: string\[] = \[] #### Returns boolean ### [**](#diffExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L635)diffExpression * ****diffExpression**(expr1, expr2): boolean - #### Parameters * ##### expr1: string * ##### expr2: string #### Returns boolean ### [**](#diffForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L441)diffForeignKey * ****diffForeignKey**(key1, key2, tableDifferences): boolean - #### Parameters * ##### key1: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### key2: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### tableDifferences: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) #### Returns boolean ### [**](#diffIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L589)diffIndex * ****diffIndex**(index1, index2): boolean - Finds the difference between the indexes index1 and index2. Compares index1 with index2 and returns index2 if there are any differences or false in case there are no differences. *** #### Parameters * ##### index1: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### index2: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns boolean ### [**](#diffTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L161)diffTable * ****diffTable**(fromTable, toTable, inverseTableDiff): false | [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) - Returns the difference between the tables fromTable and toTable. If there are no differences this method returns the boolean false. *** #### Parameters * ##### fromTable: DatabaseTable * ##### toTable: DatabaseTable * ##### optionalinverseTableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) #### Returns false | [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) ### [**](#hasSameDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L660)hasSameDefaultValue * ****hasSameDefaultValue**(from, to): boolean - #### Parameters * ##### from: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) #### Returns boolean ### [**](#isIndexFulfilledBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L601)isIndexFulfilledBy * ****isIndexFulfilledBy**(index1, index2): boolean - Checks if the other index already fulfills all the indexing and constraint needs of the current one. *** #### Parameters * ##### index1: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### index2: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns boolean ### [**](#parseJsonDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L647)parseJsonDefault * ****parseJsonDefault**(defaultValue): null | string | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - #### Parameters * ##### optionaldefaultValue: null | string #### Returns null | string | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) --- # Source: https://mikro-orm.io/api/knex/interface/SchemaDifference.md # SchemaDifference ## Index[**](#Index) ### Properties * [**changedTables](#changedTables) * [**fromSchema](#fromSchema) * [**newNamespaces](#newNamespaces) * [**newNativeEnums](#newNativeEnums) * [**newTables](#newTables) * [**orphanedForeignKeys](#orphanedForeignKeys) * [**removedNamespaces](#removedNamespaces) * [**removedNativeEnums](#removedNativeEnums) * [**removedTables](#removedTables) ## Properties[**](#Properties) ### [**](#changedTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L139)changedTables **changedTables: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md)> ### [**](#fromSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L144)fromSchema **fromSchema: DatabaseSchema ### [**](#newNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L136)newNamespaces **newNamespaces: Set\ ### [**](#newNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L137)newNativeEnums **newNativeEnums: { items: string\[]; name: string; schema? : string }\[] ### [**](#newTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L138)newTables **newTables: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ ### [**](#orphanedForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L143)orphanedForeignKeys **orphanedForeignKeys: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)\[] ### [**](#removedNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L141)removedNamespaces **removedNamespaces: Set\ ### [**](#removedNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L142)removedNativeEnums **removedNativeEnums: { name: string; schema? : string }\[] ### [**](#removedTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L140)removedTables **removedTables: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ --- # Source: https://mikro-orm.io/api/knex/class/SchemaHelper.md # abstractSchemaHelper ### Hierarchy * *SchemaHelper* * [MySqlSchemaHelper](https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md) * [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) * [PostgreSqlSchemaHelper](https://mikro-orm.io/api/postgresql/class/PostgreSqlSchemaHelper.md) * [MsSqlSchemaHelper](https://mikro-orm.io/api/mssql/class/MsSqlSchemaHelper.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new SchemaHelper**(platform): [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)knex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)options * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)configureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)configureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)createCheck * ****createCheck**(table, check): void - #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)createForeignKey * ****createForeignKey**(table, foreignKey, schema): void - #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)createIndex * ****createIndex**(table, index, tableDef, createPrimary): void - #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)createSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)createTable * ****createTable**(tableDef, alter): SchemaBuilder - #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L174)createTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L353)databaseExists * ****databaseExists**(connection, name): Promise\ - #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L28)disableForeignKeysSQL * ****disableForeignKeysSQL**(): string - #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)dump * ****dump**(builder, append): Promise\ - #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L32)enableForeignKeysSQL * ****enableForeignKeysSQL**(): string - #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)finalizeTable * ****finalizeTable**(table, charset, collate): void - #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)getAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)getAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L533)optionalgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L236)getChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L252)getChecks * ****getChecks**(connection, tableName, schemaName, columns): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string * ##### optionalcolumns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L244)getColumns * ****getColumns**(connection, tableName, schemaName): Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Column](https://mikro-orm.io/api/knex/interface/Column.md)\[]> ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L318)getCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)getCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)getCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)getCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)getDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)getDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)getDefaultEmptyString * ****getDefaultEmptyString**(): string - #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L155)getDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L323)getDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)getDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)getDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)getDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L86)getEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)getForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L271)getForeignKeysSQL * ****getForeignKeysSQL**(tableName, schemaName): string - #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L248)getIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L115)getListTablesSQL * ****getListTablesSQL**(schemaName): string - #### Parameters * ##### optionalschemaName: string #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L345)getManagementDbName * ****getManagementDbName**(): string - #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)getNamespaces * ****getNamespaces**(connection): Promise\ - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)getPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L224)getPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L52)getPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] = \[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)getReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L119)getRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L151)getRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L20)getSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)getSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)getTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)hasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - #### Parameters * ##### type: string #### Returns undefined | number ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L102)loadInformationSchema * ****loadInformationSchema**(schema, connection, tables, schemas): Promise\ - #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalschemas: string\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L275)mapForeignKeys * ****mapForeignKeys**(fks, tableName, schemaName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - #### Parameters * ##### fks: any\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L297)normalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length, defaultValues): string | number - #### Parameters * ##### defaultValue: string * ##### optionallength: number * ##### defaultValues: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ = {} #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)pushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)splitTableName * ****splitTableName**(name): \[undefined | string, string] - #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L48)supportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - #### Returns boolean --- # Source: https://mikro-orm.io/api/seeder/class/SeedManager.md # SeedManager ### Implements * [ISeedManager](https://mikro-orm.io/api/core/interface/ISeedManager.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**createSeeder](#createSeeder) * [**seed](#seed) * [**register](#register) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/SeedManager.ts#L20)constructor * ****new SeedManager**(em): [SeedManager](https://mikro-orm.io/api/seeder/class/SeedManager.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SeedManager](https://mikro-orm.io/api/seeder/class/SeedManager.md) ## Methods[**](#Methods) ### [**](#createSeeder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/SeedManager.ts#L70)createSeeder * ****createSeeder**(className): Promise\ - Implementation of ISeedManager.createSeeder #### Parameters * ##### className: string #### Returns Promise\ ### [**](#seed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/SeedManager.ts#L34)seed * ****seed**(...classNames): Promise\ - Implementation of ISeedManager.seed #### Parameters * ##### rest...classNames: [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[Seeder](https://mikro-orm.io/api/seeder/class/Seeder.md)<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)>>\[] #### Returns Promise\ ### [**](#register)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/SeedManager.ts#L30)staticregister * ****register**(orm): void - #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void --- # Source: https://mikro-orm.io/api/seeder/class/Seeder.md # abstractSeeder \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**run](#run) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new Seeder**\(): [Seeder](https://mikro-orm.io/api/seeder/class/Seeder.md)\ - #### Returns [Seeder](https://mikro-orm.io/api/seeder/class/Seeder.md)\ ## Methods[**](#Methods) ### [**](#run)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/seeder/src/Seeder.ts#L5)abstractrun * ****run**(em, context): void | Promise\ - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> * ##### optionalcontext: T #### Returns void | Promise\ --- # Source: https://mikro-orm.io/api/core/interface/SeederOptions.md # SeederOptions ## Index[**](#Index) ### Properties * [**defaultSeeder](#defaultSeeder) * [**emit](#emit) * [**fileName](#fileName) * [**glob](#glob) * [**path](#path) * [**pathTs](#pathTs) ## Properties[**](#Properties) ### [**](#defaultSeeder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L552)optionaldefaultSeeder **defaultSeeder? : string ### [**](#emit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L553)optionalemit **emit? : ts | js ### [**](#fileName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L554)optionalfileName **fileName? : (className) => string #### Type declaration * * **(className): string - #### Parameters * ##### className: string #### Returns string ### [**](#glob)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L551)optionalglob **glob? : string ### [**](#path)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L549)optionalpath **path? : string ### [**](#pathTs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L550)optionalpathTs **pathTs? : string --- # Source: https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md # SelectQueryBuilder \ SQL query builder with fluent interface. ``` const qb = orm.em.createQueryBuilder(Publisher); qb.select('*') .where({ name: 'test 123', type: PublisherType.GLOBAL, }) .orderBy({ name: QueryOrder.DESC, type: QueryOrder.ASC, }) .limit(2, 1); const publisher = await qb.getSingleResult(); ``` ### Hierarchy * [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * *SelectQueryBuilder* ## Index[**](#Index) ### Accessors * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResult](#getResult) * [**getResultAndCount](#getResultAndCount) * [**getResultList](#getResultList) * [**getSingleResult](#getSingleResult) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Accessors[**](#Accessors) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias * **get alias(): string - Inherited from QueryBuilder.alias #### Returns string ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper * **get helper(): QueryBuilderHelper - Inherited from QueryBuilder.helper #### Returns QueryBuilderHelper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias * **get mainAlias(): [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ - Inherited from QueryBuilder.mainAlias #### Returns [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from QueryBuilder.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from QueryBuilder.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from QueryBuilder.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from QueryBuilder.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from QueryBuilder.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from QueryBuilder.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from QueryBuilder.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from QueryBuilder.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2024)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2025)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2026)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2027)execute * ****execute**\(method, mapResults): Promise\ * ****execute**\(method, mapResults): Promise\ * ****execute**\(method, mapResults): Promise\ * ****execute**\(method, mapResults): Promise\ - Overrides QueryBuilder.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from QueryBuilder.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from QueryBuilder.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from QueryBuilder.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from QueryBuilder.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from QueryBuilder.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from QueryBuilder.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from QueryBuilder.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1054)inheritedgetResult * ****getResult**(): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Inherited from QueryBuilder.getResult Alias for `qb.getResultList()` *** #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[Entity\[], number]> - Inherited from QueryBuilder.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[Entity\[], number]> ### [**](#getResultList)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1061)inheritedgetResultList * ****getResultList**(limit): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Inherited from QueryBuilder.getResultList Executes the query, returning array of results *** #### Parameters * ##### optionallimit: number #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#getSingleResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1097)inheritedgetSingleResult * ****getSingleResult**(): Promise\ - Inherited from QueryBuilder.getSingleResult Executes the query, returning the first result or null *** #### Returns Promise\ ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from QueryBuilder.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from QueryBuilder.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from QueryBuilder.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from QueryBuilder.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> - Inherited from QueryBuilder.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from QueryBuilder.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from QueryBuilder.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> - Inherited from QueryBuilder.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> - Inherited from QueryBuilder.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ extends true ? AddToContext\, object, Field, Alias, false> : Context & AddToContext\, Context, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from QueryBuilder.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> - Inherited from QueryBuilder.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ & {}, { \[ K in string | number | symbol ]: IsNever\ extends true ? AddToContext\, object, Field, Alias, true> : Context & AddToContext\, Context, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from QueryBuilder.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from QueryBuilder.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from QueryBuilder.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from QueryBuilder.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from QueryBuilder.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from QueryBuilder.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from QueryBuilder.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from QueryBuilder.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from QueryBuilder.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2028)then * ****then**\(onfulfilled, onrejected): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> - Overrides QueryBuilder.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\\[]> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from QueryBuilder.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from QueryBuilder.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from QueryBuilder.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from QueryBuilder.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L532)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L533)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L534)inheritedwhere * ****where**(cond, operator): this * ****where**(cond, params, operator): this - Inherited from QueryBuilder.where #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from QueryBuilder.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from QueryBuilder.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/class/SerializationContext.md # SerializationContext \ Helper that allows to keep track of where we are currently at when serializing complex entity graph with cycles. Before we process a property, we call `visit` that checks if it is not a cycle path (but allows to pass cycles that are defined in populate hint). If not, we proceed and call `leave` afterwards. ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**path](#path) * [**visited](#visited) ### Methods * [**close](#close) * [**isMarkedAsPopulated](#isMarkedAsPopulated) * [**isPartiallyLoaded](#isPartiallyLoaded) * [**leave](#leave) * [**visit](#visit) * [**propagate](#propagate) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L17)constructor * ****new SerializationContext**\(config, populate, fields, exclude): [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md)\ - #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalfields: Set\ * ##### optionalexclude: string\[] #### Returns [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md)\ ## Properties[**](#Properties) ### [**](#path)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L13)readonlypath **path: \[string, string]\[] = \[] ### [**](#visited)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L14)readonlyvisited **visited: Set\> = ... ## Methods[**](#Methods) ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L49)close * ****close**(): void - #### Returns void ### [**](#isMarkedAsPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L87)isMarkedAsPopulated * ****isMarkedAsPopulated**(entityName, prop): boolean - #### Parameters * ##### entityName: string * ##### prop: string #### Returns boolean ### [**](#isPartiallyLoaded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L114)isPartiallyLoaded * ****isPartiallyLoaded**(entityName, prop): boolean - #### Parameters * ##### entityName: string * ##### prop: string #### Returns boolean ### [**](#leave)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L40)leave * ****leave**\(entityName, prop): void - #### Parameters * ##### entityName: string * ##### prop: string #### Returns void ### [**](#visit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L25)visit * ****visit**(entityName, prop): boolean - Returns true when there is a cycle detected. *** #### Parameters * ##### entityName: string * ##### prop: string #### Returns boolean ### [**](#propagate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L58)staticpropagate * ****propagate**(root, entity, isVisible): void - When initializing new context, we need to propagate it to the whole entity graph recursively. *** #### Parameters * ##### root: [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md)\ * ##### entity: Partial\ * ##### isVisible: (meta, prop) => boolean #### Returns void --- # Source: https://mikro-orm.io/api/core/interface/SerializeOptions.md # SerializeOptions \ ## Index[**](#Index) ### Properties * [**exclude](#exclude) * [**forceObject](#forceObject) * [**groups](#groups) * [**ignoreSerializers](#ignoreSerializers) * [**includeHidden](#includeHidden) * [**populate](#populate) * [**skipNull](#skipNull) ## Properties[**](#Properties) ### [**](#exclude)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L292)optionalexclude **exclude? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Specify which properties should be omitted. ### [**](#forceObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L295)optionalforceObject **forceObject? : boolean Enforce unpopulated references to be returned as objects, e.g. `{ author: { id: 1 } }` instead of `{ author: 1 }`. ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L307)optionalgroups **groups? : string\[] Only include properties for a specific group. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#ignoreSerializers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L298)optionalignoreSerializers **ignoreSerializers? : boolean Ignore custom property serializers. ### [**](#includeHidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L301)optionalincludeHidden **includeHidden? : boolean Include properties marked as `hidden`. ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L289)optionalpopulate **populate? : readonly [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Specify which relation should be serialized as populated and which as a FK. ### [**](#skipNull)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L304)optionalskipNull **skipNull? : boolean Skip properties with `null` value. --- # Source: https://mikro-orm.io/api/core/function/SerializedPrimaryKey.md # SerializedPrimaryKey ### Callable * ****SerializedPrimaryKey**\(options): (target, propertyName) => any *** * #### Parameters * ##### options: [SerializedPrimaryKeyOptions](https://mikro-orm.io/api/core/interface/SerializedPrimaryKeyOptions.md)\ = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: Partial\ * ##### propertyName: string #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/SerializedPrimaryKeyOptions.md # SerializedPrimaryKeyOptions \ ### Hierarchy * [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md)\ * *SerializedPrimaryKeyOptions* ## Index[**](#Index) ### Properties * [**accessor](#accessor) * [**autoincrement](#autoincrement) * [**check](#check) * [**columnType](#columnType) * [**columnTypes](#columnTypes) * [**comment](#comment) * [**concurrencyCheck](#concurrencyCheck) * [**customOrder](#customOrder) * [**default](#default) * [**defaultRaw](#defaultRaw) * [**extra](#extra) * [**fieldName](#fieldName) * [**fieldNames](#fieldNames) * [**formula](#formula) * [**generated](#generated) * [**getter](#getter) * [**getterName](#getterName) * [**groups](#groups) * [**hidden](#hidden) * [**hydrate](#hydrate) * [**ignoreSchemaChanges](#ignoreSchemaChanges) * [**index](#index) * [**lazy](#lazy) * [**length](#length) * [**name](#name) * [**nullable](#nullable) * [**onCreate](#onCreate) * [**onUpdate](#onUpdate) * [**persist](#persist) * [**precision](#precision) * [**primary](#primary) * [**ref](#ref) * [**returning](#returning) * [**runtimeType](#runtimeType) * [**scale](#scale) * [**serializedName](#serializedName) * [**serializedPrimaryKey](#serializedPrimaryKey) * [**serializer](#serializer) * [**setter](#setter) * [**trackChanges](#trackChanges) * [**type](#type) * [**unique](#unique) * [**unsigned](#unsigned) * [**version](#version) ## Properties[**](#Properties) ### [**](#accessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L290)optionalinheritedaccessor **accessor? : boolean | keyof T Inherited from PropertyOptions.accessor When using a private property backed by a public get/set pair, use the `accessor` option to point to the other side. > The `fieldName` will be inferred based on the accessor name unless specified explicitly. If the `accessor` option points to something, the ORM will use the backing property directly. * **@example** ``` @Entity() export class User { // the ORM will use the backing field directly @Property({ accessor: 'email' }) private _email: string; get email() { return this._email; } set email() { return this._email; } } ``` If you want to the ORM to use your accessor internally too, use `accessor: true` on the get/set property instead. This is handy if you want to use a native private property for the backing field. * **@example** ``` @Entity({ forceConstructor: true }) export class User { #email: string; // the ORM will use the accessor internally @Property({ accessor: true }) get email() { return this.#email; } set email() { return this.#email; } } ``` ### [**](#autoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L107)optionalinheritedautoincrement **autoincrement? : boolean Inherited from PropertyOptions.autoincrement Explicitly specify the auto increment of the primary key. ### [**](#check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L193)optionalinheritedcheck **check? : string | [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback)\ Inherited from PropertyOptions.check Specify column with check constraints. (Postgres driver only) * **@see** ### [**](#columnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L75)optionalinheritedcolumnType **columnType? : [AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType Inherited from PropertyOptions.columnType Specify an exact database column type for Generator. This option is only for simple properties represented by a single column. (SQL only) ### [**](#columnTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L79)optionalinheritedcolumnTypes **columnTypes? : ([AnyString](https://mikro-orm.io/api/core.md#AnyString) | ColumnType)\[] Inherited from PropertyOptions.columnTypes Specify an exact database column type for Generator. This option is suitable for composite keys, where one property is represented by multiple columns. (SQL only) ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L320)optionalinheritedcomment **comment? : string Inherited from PropertyOptions.comment Specify comment of column for Generator. (SQL only) ### [**](#concurrencyCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L179)optionalinheritedconcurrencyCheck **concurrencyCheck? : boolean Inherited from PropertyOptions.concurrencyCheck Set to true to enable Locking via concurrency fields. ### [**](#customOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L316)optionalinheritedcustomOrder **customOrder? : string\[] | number\[] | boolean\[] Inherited from PropertyOptions.customOrder Specify a custom order based on the values. (SQL only) ### [**](#default)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L126)optionalinheriteddefault **default? : null | string | number | boolean | string\[] | number\[] Inherited from PropertyOptions.default Specify default column value for Generator. This is a runtime value, assignable to the entity property. (SQL only) ### [**](#defaultRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L131)optionalinheriteddefaultRaw **defaultRaw? : string Inherited from PropertyOptions.defaultRaw Specify SQL functions for Generator. (SQL only) Since v4 you should use defaultRaw for SQL functions. e.g. now() ### [**](#extra)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L322)optionalinheritedextra **extra? : string Inherited from PropertyOptions.extra mysql only ### [**](#fieldName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L64)optionalinheritedfieldName **fieldName? : string Inherited from PropertyOptions.fieldName Specify database column name for this property. * **@see** ### [**](#fieldNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L71)optionalinheritedfieldNames **fieldNames? : string\[] Inherited from PropertyOptions.fieldNames Specify database column names for this property. Same as `fieldName` but for composite FKs. * **@see** ### [**](#formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L137)optionalinheritedformula **formula? : string | (alias) => string Inherited from PropertyOptions.formula Set to map some SQL snippet for the entity. * **@see** Formulas ### [**](#generated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L141)optionalinheritedgenerated **generated? : string | GeneratedColumnCallback\ Inherited from PropertyOptions.generated For generated columns. This will be appended to the column type after the `generated always` clause. ### [**](#getter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L230)optionalinheritedgetter **getter? : boolean Inherited from PropertyOptions.getter Set true to define the properties as getter. (virtual) * **@example** ``` @Property({ getter: true }) get fullName() { return this.firstName + this.lastName; } ``` ### [**](#getterName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L243)optionalinheritedgetterName **getterName? : keyof T Inherited from PropertyOptions.getterName When defining a property over a method (not a getter, a regular function), you can use this option to point to the method name. * **@example** ``` @Property({ getter: true }) getFullName() { return this.firstName + this.lastName; } ``` ### [**](#groups)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L312)optionalinheritedgroups **groups? : string\[] Inherited from PropertyOptions.groups Specify serialization groups for `serialize()` calls. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. ### [**](#hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L171)optionalinheritedhidden **hidden? : boolean Inherited from PropertyOptions.hidden Set to true to omit the property when Serializing. ### [**](#hydrate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L157)optionalinheritedhydrate **hydrate? : boolean Inherited from PropertyOptions.hydrate Set false to disable hydration of this property. Useful for persisted getters. ### [**](#ignoreSchemaChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L328)optionalinheritedignoreSchemaChanges **ignoreSchemaChanges? : (type | extra | default)\[] Inherited from PropertyOptions.ignoreSchemaChanges Set to avoid a perpetual diff from the Generator when columns are generated. * **@see** ### [**](#index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L183)optionalinheritedindex **index? : string | boolean Inherited from PropertyOptions.index Explicitly specify index on a property. ### [**](#lazy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L199)optionalinheritedlazy **lazy? : boolean Inherited from PropertyOptions.lazy Set to omit the property from the select clause for lazy loading. * **@see** ### [**](#length)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L95)optionalinheritedlength **length? : number Inherited from PropertyOptions.length Set length of database column, used for datetime/timestamp/varchar column types for Generator. (SQL only) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L58)optionalinheritedname **name? : string Inherited from PropertyOptions.name Alias for `fieldName`. ### [**](#nullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L145)optionalinheritednullable **nullable? : boolean Inherited from PropertyOptions.nullable Set column as nullable for Generator. ### [**](#onCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L116)optionalinheritedonCreate **onCreate? : (entity, em) => any Inherited from PropertyOptions.onCreate Automatically set the property value when entity gets created, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#onUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L121)optionalinheritedonUpdate **onUpdate? : (entity, em) => any Inherited from PropertyOptions.onUpdate Automatically update the property value every time entity gets updated, executed during flush operation. *** #### Type declaration * * **(entity, em): any - #### Parameters * ##### entity: T * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns any ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L153)optionalinheritedpersist **persist? : boolean Inherited from PropertyOptions.persist Set false to define Property. ### [**](#precision)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L99)optionalinheritedprecision **precision? : number Inherited from PropertyOptions.precision Set precision of database column to represent the number of significant digits. (SQL only) ### [**](#primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L206)optionalinheritedprimary **primary? : boolean Inherited from PropertyOptions.primary Set true to define entity's unique primary key identifier. Alias for `@PrimaryKey()` decorator * **@see** ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L161)optionalinheritedref **ref? : boolean Inherited from PropertyOptions.ref Enable `ScalarReference` wrapper for lazy values. Use this in combination with `lazy: true` to have a type-safe accessor object in place of the value. ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L111)optionalinheritedreturning **returning? : boolean Inherited from PropertyOptions.returning Add the property to the `returning` statement. ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L91)optionalinheritedruntimeType **runtimeType? : string Inherited from PropertyOptions.runtimeType Runtime type of the property. This is the JS type that your property is mapped to, e.g. `string` or `number`, and is normally inferred automatically via `reflect-metadata`. In some cases, the inference won't work, and you might need to specify the `runtimeType` explicitly - the most common one is when you use a union type with null like `foo: number | null`. ### [**](#scale)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L103)optionalinheritedscale **scale? : number Inherited from PropertyOptions.scale Set scale of database column to represents the number of digits after the decimal point. (SQL only) ### [**](#serializedName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L307)optionalinheritedserializedName **serializedName? : string Inherited from PropertyOptions.serializedName Specify name of key for the serialized value. ### [**](#serializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L297)optionalinheritedserializedPrimaryKey **serializedPrimaryKey? : boolean Inherited from PropertyOptions.serializedPrimaryKey Set to define serialized primary key for MongoDB. (virtual) Alias for `@SerializedPrimaryKey()` decorator. * **@see** ### [**](#serializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L303)optionalinheritedserializer **serializer? : (value, options) => any Inherited from PropertyOptions.serializer Set to use serialize property. Allow to specify a callback that will be used when serializing a property. * **@see** *** #### Type declaration * * **(value, options): any - #### Parameters * ##### value: any * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns any ### [**](#setter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L218)optionalinheritedsetter **setter? : boolean Inherited from PropertyOptions.setter Set true to define the properties as setter. (virtual) * **@example** ``` @Property({ setter: true }) set address(value: string) { this._address = value.toLocaleLowerCase(); } ``` ### [**](#trackChanges)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L167)optionalinheritedtrackChanges **trackChanges? : boolean Inherited from PropertyOptions.trackChanges Set false to disable change tracking on a property level. * **@see** ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L30)optionaltype **type? : any Overrides PropertyOptions.type Explicitly specify the runtime type. * **@see** * * ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L187)optionalinheritedunique **unique? : string | boolean Inherited from PropertyOptions.unique Set column as unique for Generator. (SQL only) ### [**](#unsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L149)optionalinheritedunsigned **unsigned? : boolean Inherited from PropertyOptions.unsigned Set column as unsigned for Generator. (SQL only) ### [**](#version)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L175)optionalinheritedversion **version? : boolean Inherited from PropertyOptions.version Set to true to enable Locking via version field. (SQL only) --- # Source: https://mikro-orm.io/api/core/class/ServerException.md # ServerException Base class for all server related errors detected in the driver. ### Hierarchy * [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) * *ServerException* * [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) * [DatabaseObjectExistsException](https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md) * [DatabaseObjectNotFoundException](https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md) * [DeadlockException](https://mikro-orm.io/api/core/class/DeadlockException.md) * [InvalidFieldNameException](https://mikro-orm.io/api/core/class/InvalidFieldNameException.md) * [LockWaitTimeoutException](https://mikro-orm.io/api/core/class/LockWaitTimeoutException.md) * [NonUniqueFieldNameException](https://mikro-orm.io/api/core/class/NonUniqueFieldNameException.md) * [ReadOnlyException](https://mikro-orm.io/api/core/class/ReadOnlyException.md) * [SyntaxErrorException](https://mikro-orm.io/api/core/class/SyntaxErrorException.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new ServerException**(previous): [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) - Inherited from DriverException.constructor #### Parameters * ##### previous: Error #### Returns [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from DriverException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from DriverException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from DriverException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from DriverException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from DriverException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from DriverException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from DriverException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from DriverException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from DriverException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from DriverException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from DriverException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from DriverException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/Settings.md # Settings ## Index[**](#Index) ### Properties * [**alwaysAllowTs](#alwaysAllowTs) * [**configPaths](#configPaths) * [**tsConfigPath](#tsConfigPath) * [**useTsNode](#useTsNode) * [**verbose](#verbose) ## Properties[**](#Properties) ### [**](#alwaysAllowTs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L448)optionalalwaysAllowTs **alwaysAllowTs? : boolean ### [**](#configPaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L452)optionalconfigPaths **configPaths? : string\[] ### [**](#tsConfigPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L451)optionaltsConfigPath **tsConfigPath? : string ### [**](#useTsNode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L450)optionaluseTsNode **useTsNode? : boolean ### [**](#verbose)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L449)optionalverbose **verbose? : boolean --- # Source: https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md # SimpleColumnMeta ## Index[**](#Index) ### Properties * [**name](#name) * [**type](#type) ## Properties[**](#Properties) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L805)name **name: string ### [**](#type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L806)type **type: string --- # Source: https://mikro-orm.io/api/core/class/SimpleLogger.md # SimpleLogger A basic logger that provides fully formatted output without color ### Hierarchy * [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) * *SimpleLogger* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**debugMode](#debugMode) * [**writer](#writer) ### Methods * [**error](#error) * [**isEnabled](#isEnabled) * [**log](#log) * [**logQuery](#logQuery) * [**setDebugMode](#setDebugMode) * [**warn](#warn) * [**create](#create) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L12)constructor * ****new SimpleLogger**(options): [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) - Inherited from DefaultLogger.constructor #### Parameters * ##### options: [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) #### Returns [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) ## Properties[**](#Properties) ### [**](#debugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L7)inheriteddebugMode **debugMode: boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] Inherited from DefaultLogger.debugMode ### [**](#writer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L8)readonlyinheritedwriter **writer: (message) => void Inherited from DefaultLogger.writer #### Type declaration * * **(message): void - #### Parameters * ##### message: string #### Returns void ## Methods[**](#Methods) ### [**](#error)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L50)inheritederror * ****error**(namespace, message, context): void - Inherited from DefaultLogger.error Logs error message inside given namespace. *** #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#isEnabled)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L68)inheritedisEnabled * ****isEnabled**(namespace, context): boolean - Inherited from DefaultLogger.isEnabled #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns boolean ### [**](#log)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/SimpleLogger.ts#L12)log * ****log**(namespace, message, context): void - Overrides DefaultLogger.log Logs a message inside given namespace. *** #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#logQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/SimpleLogger.ts#L27)logQuery * ****logQuery**(context): void - Overrides DefaultLogger.logQuery Logs a message inside given namespace. *** #### Parameters * ##### context: { query: string } & [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#setDebugMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L64)inheritedsetDebugMode * ****setDebugMode**(debugMode): void - Inherited from DefaultLogger.setDebugMode Sets active namespaces. Pass `true` to enable all logging. *** #### Parameters * ##### debugMode: boolean | [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace)\[] #### Returns void ### [**](#warn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L57)inheritedwarn * ****warn**(namespace, message, context): void - Inherited from DefaultLogger.warn Logs warning message inside given namespace. *** #### Parameters * ##### namespace: [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) * ##### message: string * ##### optionalcontext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns void ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/SimpleLogger.ts#L35)staticcreate * ****create**(options): [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) - Overrides DefaultLogger.create #### Parameters * ##### options: [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) #### Returns [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) --- # Source: https://mikro-orm.io/api/core/class/SmallIntType.md # SmallIntType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *SmallIntType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new SmallIntType**(): [SmallIntType](https://mikro-orm.io/api/core/class/SmallIntType.md) - Inherited from Type.constructor #### Returns [SmallIntType](https://mikro-orm.io/api/core/class/SmallIntType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/SmallIntType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | number * ##### b: undefined | null | number #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/SmallIntType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/SmallIntType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | number - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | number ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md # SqlSchemaGenerator ### Hierarchy * [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md)<[AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)> * *SqlSchemaGenerator* ### Implements * [ISchemaGenerator](https://mikro-orm.io/api/core/interface/ISchemaGenerator.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**clearDatabase](#clearDatabase) * [**createDatabase](#createDatabase) * [**createNamespace](#createNamespace) * [**createSchema](#createSchema) * [**diffToSQL](#diffToSQL) * [**dropDatabase](#dropDatabase) * [**dropNamespace](#dropNamespace) * [**dropSchema](#dropSchema) * [**ensureDatabase](#ensureDatabase) * [**ensureIndexes](#ensureIndexes) * [**execute](#execute) * [**getCreateSchemaSQL](#getCreateSchemaSQL) * [**getDropSchemaSQL](#getDropSchemaSQL) * [**getTargetSchema](#getTargetSchema) * [**getUpdateSchemaMigrationSQL](#getUpdateSchemaMigrationSQL) * [**getUpdateSchemaSQL](#getUpdateSchemaSQL) * [**refreshDatabase](#refreshDatabase) * [**updateSchema](#updateSchema) * [**register](#register) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L26)constructor * ****new SqlSchemaGenerator**(em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from AbstractSchemaGenerator.constructor #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> | [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ## Methods[**](#Methods) ### [**](#clearDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L152)clearDatabase * ****clearDatabase**(options): Promise\ - Implementation of ISchemaGenerator.clearDatabase Overrides AbstractSchemaGenerator.clearDatabase #### Parameters * ##### optionaloptions: [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) #### Returns Promise\ ### [**](#createDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L528)createDatabase * ****createDatabase**(name): Promise\ - Implementation of ISchemaGenerator.createDatabase Overrides AbstractSchemaGenerator.createDatabase creates new database and connects to it *** #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#createNamespace)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L142)createNamespace * ****createNamespace**(name): Promise\ - #### Parameters * ##### name: string #### Returns Promise\ ### [**](#createSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L31)createSchema * ****createSchema**(options): Promise\ - Implementation of ISchemaGenerator.createSchema Overrides AbstractSchemaGenerator.createSchema #### Parameters * ##### optionaloptions: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) #### Returns Promise\ ### [**](#diffToSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L260)diffToSQL * ****diffToSQL**(schemaDiff, options): Promise\ - #### Parameters * ##### schemaDiff: [SchemaDifference](https://mikro-orm.io/api/knex/interface/SchemaDifference.md) * ##### options: { dropTables?: boolean; safe?: boolean; schema?: string; wrap?: boolean } * ##### optionaldropTables: boolean * ##### optionalsafe: boolean * ##### optionalschema: string * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#dropDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L540)dropDatabase * ****dropDatabase**(name): Promise\ - Implementation of ISchemaGenerator.dropDatabase Overrides AbstractSchemaGenerator.dropDatabase #### Parameters * ##### optionalname: string #### Returns Promise\ ### [**](#dropNamespace)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L147)dropNamespace * ****dropNamespace**(name): Promise\ - #### Parameters * ##### name: string #### Returns Promise\ ### [**](#dropSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L132)dropSchema * ****dropSchema**(options): Promise\ - Implementation of ISchemaGenerator.dropSchema Overrides AbstractSchemaGenerator.dropSchema #### Parameters * ##### options: [DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md) = {} #### Returns Promise\ ### [**](#ensureDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L40)ensureDatabase * ****ensureDatabase**(options): Promise\ - Implementation of ISchemaGenerator.ensureDatabase Overrides AbstractSchemaGenerator.ensureDatabase Returns true if the database was created. *** #### Parameters * ##### optionaloptions: [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) #### Returns Promise\ ### [**](#ensureIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L118)inheritedensureIndexes * ****ensureIndexes**(): Promise\ - Implementation of ISchemaGenerator.ensureIndexes Inherited from AbstractSchemaGenerator.ensureIndexes #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L548)execute * ****execute**(sql, options): Promise\ - Implementation of ISchemaGenerator.execute Overrides AbstractSchemaGenerator.execute #### Parameters * ##### sql: string * ##### options: { ctx?: any; wrap?: boolean } = {} * ##### optionalctx: any * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getCreateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L92)getCreateSchemaSQL * ****getCreateSchemaSQL**(options): Promise\ - Implementation of ISchemaGenerator.getCreateSchemaSQL Overrides AbstractSchemaGenerator.getCreateSchemaSQL #### Parameters * ##### options: [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) = {} #### Returns Promise\ ### [**](#getDropSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L172)getDropSchemaSQL * ****getDropSchemaSQL**(options): Promise\ - Implementation of ISchemaGenerator.getDropSchemaSQL Overrides AbstractSchemaGenerator.getDropSchemaSQL #### Parameters * ##### options: Omit<[DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md), dropDb> = {} #### Returns Promise\ ### [**](#getTargetSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L75)getTargetSchema * ****getTargetSchema**(schema): DatabaseSchema - #### Parameters * ##### optionalschema: string #### Returns DatabaseSchema ### [**](#getUpdateSchemaMigrationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L231)getUpdateSchemaMigrationSQL * ****getUpdateSchemaMigrationSQL**(options): Promise<{ down: string; up: string }> - Implementation of ISchemaGenerator.getUpdateSchemaMigrationSQL Overrides AbstractSchemaGenerator.getUpdateSchemaMigrationSQL #### Parameters * ##### options: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ = {} #### Returns Promise<{ down: string; up: string }> ### [**](#getUpdateSchemaSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L222)getUpdateSchemaSQL * ****getUpdateSchemaSQL**(options): Promise\ - Implementation of ISchemaGenerator.getUpdateSchemaSQL Overrides AbstractSchemaGenerator.getUpdateSchemaSQL #### Parameters * ##### options: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ = {} #### Returns Promise\ ### [**](#refreshDatabase)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L46)inheritedrefreshDatabase * ****refreshDatabase**(options): Promise\ - Implementation of ISchemaGenerator.refreshDatabase Inherited from AbstractSchemaGenerator.refreshDatabase #### Parameters * ##### optionaloptions: [RefreshDatabaseOptions](https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md) #### Returns Promise\ ### [**](#updateSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L217)updateSchema * ****updateSchema**(options): Promise\ - Implementation of ISchemaGenerator.updateSchema Overrides AbstractSchemaGenerator.updateSchema #### Parameters * ##### options: [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md)\ = {} #### Returns Promise\ ### [**](#register)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L27)staticregister * ****register**(orm): void - #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void --- # Source: https://mikro-orm.io/api/sqlite/class/SqliteConnection.md # SqliteConnection ### Hierarchy * [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) * *SqliteConnection* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**begin](#begin) * [**checkConnection](#checkConnection) * [**close](#close) * [**commit](#commit) * [**connect](#connect) * [**createKnex](#createKnex) * [**ensureConnection](#ensureConnection) * [**execute](#execute) * [**getClientUrl](#getClientUrl) * [**getConnectionOptions](#getConnectionOptions) * [**getDefaultClientUrl](#getDefaultClientUrl) * [**getKnex](#getKnex) * [**getPlatform](#getPlatform) * [**isConnected](#isConnected) * [**loadFile](#loadFile) * [**rollback](#rollback) * [**setMetadata](#setMetadata) * [**setPlatform](#setPlatform) * [**transactional](#transactional) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L34)constructor * ****new SqliteConnection**(config, options, type): [SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md) - Inherited from BaseSqliteConnection.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> * ##### optionaloptions: [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) * ##### optionaltype: read | write #### Returns [SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md) ## Methods[**](#Methods) ### [**](#begin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L96)inheritedbegin * ****begin**(options): Promise\> - Inherited from BaseSqliteConnection.begin #### Parameters * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\> ### [**](#checkConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L73)inheritedcheckConnection * ****checkConnection**(): Promise<{ ok: true } | { error? : Error; ok: false; reason: string }> - Inherited from BaseSqliteConnection.checkConnection Are we connected to the database *** #### Returns Promise<{ ok: true } | { error?: Error; ok: false; reason: string }> ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L57)inheritedclose * ****close**(force): Promise\ - Inherited from BaseSqliteConnection.close Closes the database connection (aka disconnect) *** #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L128)inheritedcommit * ****commit**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from BaseSqliteConnection.commit #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L9)inheritedconnect * ****connect**(): Promise\ - Inherited from BaseSqliteConnection.connect Establishes connection to database *** #### Returns Promise\ ### [**](#createKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/sqlite/src/SqliteConnection.ts#L5)createKnex * ****createKnex**(): void - Overrides BaseSqliteConnection.createKnex #### Returns void ### [**](#ensureConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L62)inheritedensureConnection * ****ensureConnection**(): Promise\ - Inherited from BaseSqliteConnection.ensureConnection Ensure the connection exists, this is used to support lazy connect when using `MikroORM.initSync()` *** #### Returns Promise\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L169)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from BaseSqliteConnection.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: unknown\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#getClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L24)inheritedgetClientUrl * ****getClientUrl**(): string - Inherited from BaseSqliteConnection.getClientUrl #### Returns string ### [**](#getConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L91)inheritedgetConnectionOptions * ****getConnectionOptions**(): [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) - Inherited from BaseSqliteConnection.getConnectionOptions #### Returns [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#getDefaultClientUrl)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L20)inheritedgetDefaultClientUrl * ****getDefaultClientUrl**(): string - Inherited from BaseSqliteConnection.getDefaultClientUrl Returns default client url for given driver (e.g. mongodb://127.0.0.1:27017 for mongodb) *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L46)inheritedgetKnex * ****getKnex**(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from BaseSqliteConnection.getKnex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L137)inheritedgetPlatform * ****getPlatform**(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - Inherited from BaseSqliteConnection.getPlatform #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#isConnected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L65)inheritedisConnected * ****isConnected**(): Promise\ - Inherited from BaseSqliteConnection.isConnected Are we connected to the database *** #### Returns Promise\ ### [**](#loadFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L28)inheritedloadFile * ****loadFile**(path): Promise\ - Inherited from BaseSqliteConnection.loadFile Execute raw SQL queries from file *** #### Parameters * ##### path: string #### Returns Promise\ ### [**](#rollback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L149)inheritedrollback * ****rollback**(ctx, eventBroadcaster, loggerContext): Promise\ - Inherited from BaseSqliteConnection.rollback #### Parameters * ##### ctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) #### Returns Promise\ ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L129)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from BaseSqliteConnection.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#setPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L133)inheritedsetPlatform * ****setPlatform**(platform): void - Inherited from BaseSqliteConnection.setPlatform #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns void ### [**](#transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L82)inheritedtransactional * ****transactional**\(cb, options): Promise\ - Inherited from BaseSqliteConnection.transactional #### Parameters * ##### cb: (trx) => Promise\ * ##### options: { ctx?: Transaction\; eventBroadcaster?: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md); isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); loggerContext?: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md); readOnly?: boolean } = {} * ##### optionalctx: Transaction\ * ##### optionaleventBroadcaster: [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalloggerContext: [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) * ##### optionalreadOnly: boolean #### Returns Promise\ --- # Source: https://mikro-orm.io/api/sqlite/class/SqliteDriver.md # SqliteDriver ### Hierarchy * [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md)> * *SqliteDriver* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\[EntityManagerType\]](#\[EntityManagerType]) * [**config](#config) ### Methods * [**aggregate](#aggregate) * [**close](#close) * [**connect](#connect) * [**convertException](#convertException) * [**count](#count) * [**countVirtual](#countVirtual) * [**createEntityManager](#createEntityManager) * [**execute](#execute) * [**find](#find) * [**findOne](#findOne) * [**findVirtual](#findVirtual) * [**getConnection](#getConnection) * [**getDependencies](#getDependencies) * [**getMetadata](#getMetadata) * [**getPlatform](#getPlatform) * [**loadFromPivotTable](#loadFromPivotTable) * [**lockPessimistic](#lockPessimistic) * [**mapResult](#mapResult) * [**nativeDelete](#nativeDelete) * [**nativeInsert](#nativeInsert) * [**nativeInsertMany](#nativeInsertMany) * [**nativeUpdate](#nativeUpdate) * [**nativeUpdateMany](#nativeUpdateMany) * [**reconnect](#reconnect) * [**setMetadata](#setMetadata) * [**syncCollections](#syncCollections) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/sqlite/src/SqliteDriver.ts#L8)constructor * ****new SqliteDriver**(config): [SqliteDriver](https://mikro-orm.io/api/sqlite/class/SqliteDriver.md) - Overrides AbstractSqlDriver\.constructor #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns [SqliteDriver](https://mikro-orm.io/api/sqlite/class/SqliteDriver.md) ## Properties[**](#Properties) ### [**](#\[EntityManagerType])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L70)inherited\[EntityManagerType] **\[EntityManagerType]: [SqlEntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md)<[SqliteDriver](https://mikro-orm.io/api/sqlite/class/SqliteDriver.md)> Inherited from AbstractSqlDriver.\[EntityManagerType] ### [**](#config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L51)readonlyinheritedconfig **config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> Inherited from AbstractSqlDriver.config ## Methods[**](#Methods) ### [**](#aggregate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L89)inheritedaggregate * ****aggregate**(entityName, pipeline): Promise\ - Inherited from AbstractSqlDriver.aggregate #### Parameters * ##### entityName: string * ##### pipeline: any\[] #### Returns Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L148)inheritedclose * ****close**(force): Promise\ - Inherited from AbstractSqlDriver.close #### Parameters * ##### optionalforce: boolean #### Returns Promise\ ### [**](#connect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L124)inheritedconnect * ****connect**(): Promise<[SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md)> - Inherited from AbstractSqlDriver.connect #### Returns Promise<[SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md)> ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L470)inheritedconvertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Inherited from AbstractSqlDriver.convertException Converts native db errors to standardized driver exceptions *** #### Parameters * ##### exception: Error #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L450)inheritedcount * ****count**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.count #### Parameters * ##### entityName: string * ##### where: any * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ = {} #### Returns Promise\ ### [**](#countVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L198)inheritedcountVirtual * ****countVirtual**\(entityName, where, options): Promise\ - Inherited from AbstractSqlDriver.countVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md)\ #### Returns Promise\ ### [**](#createEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L87)inheritedcreateEntityManager * ****createEntityManager**\(useContext): D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] - Inherited from AbstractSqlDriver.createEntityManager #### Parameters * ##### optionaluseContext: boolean #### Returns D\[typeof [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType)] ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1067)inheritedexecute * ****execute**\(queryOrKnex, params, method, ctx, loggerContext): Promise\ - Inherited from AbstractSqlDriver.execute #### Parameters * ##### queryOrKnex: string | QueryBuilder\ | Raw\ * ##### params: any\[] = \[] * ##### method: get | all | run = 'all' * ##### optionalctx: any * ##### optionalloggerContext: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) #### Returns Promise\ ### [**](#find)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L92)inheritedfind * ****find**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.find Finds selection of entities *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ = {} #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#findOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L158)inheritedfindOne * ****findOne**\(entityName, where, options): Promise\> - Inherited from AbstractSqlDriver.findOne Finds single entity (table row, document) *** #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#findVirtual)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L194)inheritedfindVirtual * ****findVirtual**\(entityName, where, options): Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> - Inherited from AbstractSqlDriver.findVirtual #### Parameters * ##### entityName: string * ##### where: [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery)\ * ##### options: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ #### Returns Promise<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\\[]> ### [**](#getConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L138)inheritedgetConnection * ****getConnection**(type): [SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md) - Inherited from AbstractSqlDriver.getConnection #### Parameters * ##### type: [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) = 'write' #### Returns [SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md) ### [**](#getDependencies)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L172)inheritedgetDependencies * ****getDependencies**(): string\[] - Inherited from AbstractSqlDriver.getDependencies Returns name of the underlying database dependencies (e.g. `mongodb` or `mysql2`) for SQL drivers it also returns `knex` in the array as connectors are not used directly there *** #### Returns string\[] ### [**](#getMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L168)inheritedgetMetadata * ****getMetadata**(): [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) - Inherited from AbstractSqlDriver.getMetadata #### Returns [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#getPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L83)inheritedgetPlatform * ****getPlatform**(): [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) - Inherited from AbstractSqlDriver.getPlatform #### Returns [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#loadFromPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L991)inheritedloadFromPivotTable * ****loadFromPivotTable**\(prop, owners, where, orderBy, ctx, options, pivotJoin): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from AbstractSqlDriver.loadFromPivotTable When driver uses pivot tables for M:N, this method will load identifiers for given collections from them *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### owners: (O extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof O\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof O\\[] ? ReadonlyPrimary\, PK\>> : PK : O extends { \_id?: PK } ? string | ReadonlyPrimary\ : O extends { id?: PK } ? ReadonlyPrimary\ : O extends { uuid?: PK } ? ReadonlyPrimary\ : O)\[]\[] * ##### where: any = ... * ##### optionalorderBy: [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition)\ * ##### optionalctx: any * ##### optionaloptions: [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md)\ * ##### optionalpivotJoin: boolean #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#lockPessimistic)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L1390)inheritedlockPessimistic * ****lockPessimistic**\(entity, options): Promise\ - Inherited from AbstractSqlDriver.lockPessimistic #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#mapResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L282)inheritedmapResult * ****mapResult**\(result, meta, populate, qb, map): null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Inherited from AbstractSqlDriver.mapResult #### Parameters * ##### result: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### populate: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] = \[] * ##### optionalqb: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### map: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) = {} #### Returns null | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#nativeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L871)inheritednativeDelete * ****nativeDelete**\(entityName, where, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeDelete #### Parameters * ##### entityName: string * ##### where: any * ##### options: [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L488)inheritednativeInsert * ****nativeInsert**\(entityName, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsert #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeInsertMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L511)inheritednativeInsertMany * ****nativeInsertMany**\(entityName, data, options, transform): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeInsertMany #### Parameters * ##### entityName: string * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ = {} * ##### optionaltransform: (sql) => string #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L666)inheritednativeUpdate * ****nativeUpdate**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdate #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### options: [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\ & [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#nativeUpdateMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L720)inheritednativeUpdateMany * ****nativeUpdateMany**\(entityName, where, data, options): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from AbstractSqlDriver.nativeUpdateMany #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\\[] * ##### data: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\\[] * ##### options: [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md)\ & [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md)\ = {} #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#reconnect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L131)inheritedreconnect * ****reconnect**(): Promise<[SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md)> - Inherited from AbstractSqlDriver.reconnect #### Returns Promise<[SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md)> ### [**](#setMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L157)inheritedsetMetadata * ****setMetadata**(metadata): void - Inherited from AbstractSqlDriver.setMetadata #### Parameters * ##### metadata: [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) #### Returns void ### [**](#syncCollections)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L905)inheritedsyncCollections * ****syncCollections**\(collections, options): Promise\ - Inherited from AbstractSqlDriver.syncCollections #### Parameters * ##### collections: Iterable<[Collection](https://mikro-orm.io/api/core/class/Collection.md)\, any, any> * ##### optionaloptions: [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) #### Returns Promise\ --- # Source: https://mikro-orm.io/api/sqlite/class/SqliteExceptionConverter.md # SqliteExceptionConverter ### Hierarchy * [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) * *SqliteExceptionConverter* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**convertException](#convertException) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new SqliteExceptionConverter**(): [SqliteExceptionConverter](https://mikro-orm.io/api/sqlite/class/SqliteExceptionConverter.md) - Inherited from ExceptionConverter.constructor #### Returns [SqliteExceptionConverter](https://mikro-orm.io/api/sqlite/class/SqliteExceptionConverter.md) ## Methods[**](#Methods) ### [**](#convertException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/sqlite/src/SqliteExceptionConverter.ts#L14)convertException * ****convertException**(exception): [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) - Overrides ExceptionConverter.convertException * **@inheritDoc** * **@link** * **@link** *** #### Parameters * ##### exception: Error & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) --- # Source: https://mikro-orm.io/api/knex/class/SqliteKnexDialect.md # SqliteKnexDialect ### Hierarchy * Sqlite3Dialect * *SqliteKnexDialect* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**\_query](#_query) * [**processResponse](#processResponse) * [**tableCompiler](#tableCompiler) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new SqliteKnexDialect**(): [SqliteKnexDialect](https://mikro-orm.io/api/knex/class/SqliteKnexDialect.md) - Inherited from MonkeyPatchable.Sqlite3Dialect.constructor #### Returns [SqliteKnexDialect](https://mikro-orm.io/api/knex/class/SqliteKnexDialect.md) ## Methods[**](#Methods) ### [**](#_query)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteKnexDialect.ts#L19)\_query * ****\_query**(connection, obj): Promise\ - #### Parameters * ##### connection: any * ##### obj: any #### Returns Promise\ ### [**](#processResponse)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteKnexDialect.ts#L11)processResponse * ****processResponse**(obj, runner): any - #### Parameters * ##### obj: any * ##### runner: any #### Returns any ### [**](#tableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteKnexDialect.ts#L6)tableCompiler * ****tableCompiler**(): any - #### Returns any --- # Source: https://mikro-orm.io/api/sqlite/class/SqlitePlatform.md # SqlitePlatform ### Hierarchy * [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) * *SqlitePlatform* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**allowsComparingTuples](#allowsComparingTuples) * [**allowsMultiInsert](#allowsMultiInsert) * [**cloneEmbeddable](#cloneEmbeddable) * [**convertDateToJSValue](#convertDateToJSValue) * [**convertIntervalToDatabaseValue](#convertIntervalToDatabaseValue) * [**convertIntervalToJSValue](#convertIntervalToJSValue) * [**convertJsonToDatabaseValue](#convertJsonToDatabaseValue) * [**convertJsonToJSValue](#convertJsonToJSValue) * [**convertsJsonAutomatically](#convertsJsonAutomatically) * [**denormalizePrimaryKey](#denormalizePrimaryKey) * [**escape](#escape) * [**extractSimpleType](#extractSimpleType) * [**formatQuery](#formatQuery) * [**generateCustomOrder](#generateCustomOrder) * [**getArrayDeclarationSQL](#getArrayDeclarationSQL) * [**getBeginTransactionSQL](#getBeginTransactionSQL) * [**getBigIntTypeDeclarationSQL](#getBigIntTypeDeclarationSQL) * [**getBlobDeclarationSQL](#getBlobDeclarationSQL) * [**getBooleanTypeDeclarationSQL](#getBooleanTypeDeclarationSQL) * [**getCharTypeDeclarationSQL](#getCharTypeDeclarationSQL) * [**getCommitTransactionSQL](#getCommitTransactionSQL) * [**getConfig](#getConfig) * [**getCurrentTimestampSQL](#getCurrentTimestampSQL) * [**getDateTimeTypeDeclarationSQL](#getDateTimeTypeDeclarationSQL) * [**getDateTypeDeclarationSQL](#getDateTypeDeclarationSQL) * [**getDecimalTypeDeclarationSQL](#getDecimalTypeDeclarationSQL) * [**getDefaultCharLength](#getDefaultCharLength) * [**getDefaultCharset](#getDefaultCharset) * [**getDefaultDateTimeLength](#getDefaultDateTimeLength) * [**getDefaultMappedType](#getDefaultMappedType) * [**getDefaultPrimaryName](#getDefaultPrimaryName) * [**getDefaultSchemaName](#getDefaultSchemaName) * [**getDefaultVarcharLength](#getDefaultVarcharLength) * [**getDefaultVersionLength](#getDefaultVersionLength) * [**getDoubleDeclarationSQL](#getDoubleDeclarationSQL) * [**getEnumTypeDeclarationSQL](#getEnumTypeDeclarationSQL) * [**getExceptionConverter](#getExceptionConverter) * [**getExtension](#getExtension) * [**getFloatDeclarationSQL](#getFloatDeclarationSQL) * [**getFullTextIndexExpression](#getFullTextIndexExpression) * [**getFullTextWhereClause](#getFullTextWhereClause) * [**getIndexName](#getIndexName) * [**getIntegerTypeDeclarationSQL](#getIntegerTypeDeclarationSQL) * [**getIntervalTypeDeclarationSQL](#getIntervalTypeDeclarationSQL) * [**getJsonDeclarationSQL](#getJsonDeclarationSQL) * [**getJsonIndexDefinition](#getJsonIndexDefinition) * [**getMappedType](#getMappedType) * [**getMediumIntTypeDeclarationSQL](#getMediumIntTypeDeclarationSQL) * [**getNamingStrategy](#getNamingStrategy) * [**getRegExpOperator](#getRegExpOperator) * [**getRegExpValue](#getRegExpValue) * [**getReleaseSavepointSQL](#getReleaseSavepointSQL) * [**getRepositoryClass](#getRepositoryClass) * [**getRollbackToSavepointSQL](#getRollbackToSavepointSQL) * [**getRollbackTransactionSQL](#getRollbackTransactionSQL) * [**getSavepointSQL](#getSavepointSQL) * [**getSchemaGenerator](#getSchemaGenerator) * [**getSchemaHelper](#getSchemaHelper) * [**getSearchJsonPropertyKey](#getSearchJsonPropertyKey) * [**getSearchJsonPropertySQL](#getSearchJsonPropertySQL) * [**getSerializedPrimaryKeyField](#getSerializedPrimaryKeyField) * [**getSmallIntTypeDeclarationSQL](#getSmallIntTypeDeclarationSQL) * [**getTextTypeDeclarationSQL](#getTextTypeDeclarationSQL) * [**getTimeTypeDeclarationSQL](#getTimeTypeDeclarationSQL) * [**getTimezone](#getTimezone) * [**getTinyIntTypeDeclarationSQL](#getTinyIntTypeDeclarationSQL) * [**getUuidTypeDeclarationSQL](#getUuidTypeDeclarationSQL) * [**getVarcharTypeDeclarationSQL](#getVarcharTypeDeclarationSQL) * [**indexForeignKeys](#indexForeignKeys) * [**isAllowedTopLevelOperator](#isAllowedTopLevelOperator) * [**isBigIntProperty](#isBigIntProperty) * [**isNumericColumn](#isNumericColumn) * [**isNumericProperty](#isNumericProperty) * [**isPopulated](#isPopulated) * [**isRaw](#isRaw) * [**lookupExtensions](#lookupExtensions) * [**marshallArray](#marshallArray) * [**normalizeColumnType](#normalizeColumnType) * [**normalizePrimaryKey](#normalizePrimaryKey) * [**parseDate](#parseDate) * [**processDateProperty](#processDateProperty) * [**quoteIdentifier](#quoteIdentifier) * [**quoteValue](#quoteValue) * [**quoteVersionValue](#quoteVersionValue) * [**setConfig](#setConfig) * [**shouldHaveColumn](#shouldHaveColumn) * [**supportsCreatingFullTextIndex](#supportsCreatingFullTextIndex) * [**supportsCustomPrimaryKeyNames](#supportsCustomPrimaryKeyNames) * [**supportsDownMigrations](#supportsDownMigrations) * [**supportsMultipleCascadePaths](#supportsMultipleCascadePaths) * [**supportsMultipleStatements](#supportsMultipleStatements) * [**supportsNativeEnums](#supportsNativeEnums) * [**supportsSchemas](#supportsSchemas) * [**supportsTransactions](#supportsTransactions) * [**supportsUnsigned](#supportsUnsigned) * [**unmarshallArray](#unmarshallArray) * [**usesBatchInserts](#usesBatchInserts) * [**usesBatchUpdates](#usesBatchUpdates) * [**usesCascadeStatement](#usesCascadeStatement) * [**usesDefaultKeyword](#usesDefaultKeyword) * [**usesDifferentSerializedPrimaryKey](#usesDifferentSerializedPrimaryKey) * [**usesImplicitTransactions](#usesImplicitTransactions) * [**usesOutputStatement](#usesOutputStatement) * [**usesPivotTable](#usesPivotTable) * [**usesReturningStatement](#usesReturningStatement) * [**validateMetadata](#validateMetadata) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new SqlitePlatform**(): [SqlitePlatform](https://mikro-orm.io/api/sqlite/class/SqlitePlatform.md) - Inherited from BaseSqlitePlatform.constructor #### Returns [SqlitePlatform](https://mikro-orm.io/api/sqlite/class/SqlitePlatform.md) ## Methods[**](#Methods) ### [**](#allowsComparingTuples)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L192)inheritedallowsComparingTuples * ****allowsComparingTuples**(): boolean - Inherited from BaseSqlitePlatform.allowsComparingTuples #### Returns boolean ### [**](#allowsMultiInsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L90)inheritedallowsMultiInsert * ****allowsMultiInsert**(): boolean - Inherited from BaseSqlitePlatform.allowsMultiInsert #### Returns boolean ### [**](#cloneEmbeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L534)inheritedcloneEmbeddable * ****cloneEmbeddable**\(data): T - Inherited from BaseSqlitePlatform.cloneEmbeddable #### Parameters * ##### data: T #### Returns T ### [**](#convertDateToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L400)inheritedconvertDateToJSValue * ****convertDateToJSValue**(value): string - Inherited from BaseSqlitePlatform.convertDateToJSValue #### Parameters * ##### value: string | Date #### Returns string ### [**](#convertIntervalToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L408)inheritedconvertIntervalToDatabaseValue * ****convertIntervalToDatabaseValue**(value): unknown - Inherited from BaseSqlitePlatform.convertIntervalToDatabaseValue #### Parameters * ##### value: unknown #### Returns unknown ### [**](#convertIntervalToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L404)inheritedconvertIntervalToJSValue * ****convertIntervalToJSValue**(value): unknown - Inherited from BaseSqlitePlatform.convertIntervalToJSValue #### Parameters * ##### value: string #### Returns unknown ### [**](#convertJsonToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L392)inheritedconvertJsonToDatabaseValue * ****convertJsonToDatabaseValue**(value, context): unknown - Inherited from BaseSqlitePlatform.convertJsonToDatabaseValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertJsonToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L396)inheritedconvertJsonToJSValue * ****convertJsonToJSValue**(value, context): unknown - Inherited from BaseSqlitePlatform.convertJsonToJSValue #### Parameters * ##### value: unknown * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertsJsonAutomatically)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L73)inheritedconvertsJsonAutomatically * ****convertsJsonAutomatically**(): boolean - Inherited from BaseSqlitePlatform.convertsJsonAutomatically #### Returns boolean ### [**](#denormalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L122)inheriteddenormalizePrimaryKey * ****denormalizePrimaryKey**(data): IPrimaryKeyValue - Inherited from BaseSqlitePlatform.denormalizePrimaryKey Converts scalar primary key representation to native driver wrapper (e.g. string to mongodb's ObjectId) *** #### Parameters * ##### data: IPrimaryKeyValue #### Returns IPrimaryKeyValue ### [**](#escape)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/sqlite/src/SqlitePlatform.ts#L12)escape * ****escape**(value): string - Overrides BaseSqlitePlatform.escape #### Parameters * ##### value: any #### Returns string ### [**](#extractSimpleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L276)inheritedextractSimpleType * ****extractSimpleType**(type): string - Inherited from BaseSqlitePlatform.extractSimpleType #### Parameters * ##### type: string #### Returns string ### [**](#formatQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L491)inheritedformatQuery * ****formatQuery**(sql, params): string - Inherited from BaseSqlitePlatform.formatQuery #### Parameters * ##### sql: string * ##### params: readonly any\[] #### Returns string ### [**](#generateCustomOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L121)inheritedgenerateCustomOrder * ****generateCustomOrder**(escapedColumn, values): string - Inherited from BaseSqlitePlatform.generateCustomOrder Generates a custom order by statement given a set of in order values, eg. ORDER BY (CASE WHEN priority = 'low' THEN 1 WHEN priority = 'medium' THEN 2 ELSE NULL END) *** #### Parameters * ##### escapedColumn: string * ##### values: unknown\[] #### Returns string ### [**](#getArrayDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L339)inheritedgetArrayDeclarationSQL * ****getArrayDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getArrayDeclarationSQL #### Returns string ### [**](#getBeginTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L22)inheritedgetBeginTransactionSQL * ****getBeginTransactionSQL**(options): string\[] - Inherited from BaseSqlitePlatform.getBeginTransactionSQL #### Parameters * ##### optionaloptions: { isolationLevel?: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md); readOnly?: boolean } * ##### optionalisolationLevel: [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) * ##### optionalreadOnly: boolean #### Returns string\[] ### [**](#getBigIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L228)inheritedgetBigIntTypeDeclarationSQL * ****getBigIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getBigIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getBlobDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L355)inheritedgetBlobDeclarationSQL * ****getBlobDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getBlobDeclarationSQL #### Returns string ### [**](#getBooleanTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L51)inheritedgetBooleanTypeDeclarationSQL * ****getBooleanTypeDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getBooleanTypeDeclarationSQL #### Returns string ### [**](#getCharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L55)inheritedgetCharTypeDeclarationSQL * ****getCharTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getCharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getCommitTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L45)inheritedgetCommitTransactionSQL * ****getCommitTransactionSQL**(): string - Inherited from BaseSqlitePlatform.getCommitTransactionSQL #### Returns string ### [**](#getConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L553)inheritedgetConfig * ****getConfig**(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - Inherited from BaseSqlitePlatform.getConfig #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#getCurrentTimestampSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L14)inheritedgetCurrentTimestampSQL * ****getCurrentTimestampSQL**(length): string - Inherited from BaseSqlitePlatform.getCurrentTimestampSQL Returns the SQL specific for the platform to get the current timestamp *** #### Parameters * ##### length: number #### Returns string ### [**](#getDateTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L18)inheritedgetDateTimeTypeDeclarationSQL * ****getDateTimeTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getDateTimeTypeDeclarationSQL #### Parameters * ##### column: { length: number } * ##### length: number #### Returns string ### [**](#getDateTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L160)inheritedgetDateTypeDeclarationSQL * ****getDateTypeDeclarationSQL**(length): string - Inherited from BaseSqlitePlatform.getDateTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getDecimalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L264)inheritedgetDecimalTypeDeclarationSQL * ****getDecimalTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getDecimalTypeDeclarationSQL #### Parameters * ##### column: { precision?: number; scale?: number } * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#getDefaultCharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L156)inheritedgetDefaultCharLength * ****getDefaultCharLength**(): number - Inherited from BaseSqlitePlatform.getDefaultCharLength #### Returns number ### [**](#getDefaultCharset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L427)inheritedgetDefaultCharset * ****getDefaultCharset**(): string - Inherited from BaseSqlitePlatform.getDefaultCharset #### Returns string ### [**](#getDefaultDateTimeLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L148)inheritedgetDefaultDateTimeLength * ****getDefaultDateTimeLength**(): number - Inherited from BaseSqlitePlatform.getDefaultDateTimeLength #### Returns number ### [**](#getDefaultMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L292)inheritedgetDefaultMappedType * ****getDefaultMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from BaseSqlitePlatform.getDefaultMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getDefaultPrimaryName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L99)inheritedgetDefaultPrimaryName * ****getDefaultPrimaryName**(tableName, columns): string - Inherited from BaseSqlitePlatform.getDefaultPrimaryName #### Parameters * ##### tableName: string * ##### columns: string\[] #### Returns string ### [**](#getDefaultSchemaName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L204)inheritedgetDefaultSchemaName * ****getDefaultSchemaName**(): undefined | string - Inherited from BaseSqlitePlatform.getDefaultSchemaName #### Returns undefined | string ### [**](#getDefaultVarcharLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L152)inheritedgetDefaultVarcharLength * ****getDefaultVarcharLength**(): number - Inherited from BaseSqlitePlatform.getDefaultVarcharLength #### Returns number ### [**](#getDefaultVersionLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L188)inheritedgetDefaultVersionLength * ****getDefaultVersionLength**(): number - Inherited from BaseSqlitePlatform.getDefaultVersionLength #### Returns number ### [**](#getDoubleDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L260)inheritedgetDoubleDeclarationSQL * ****getDoubleDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getDoubleDeclarationSQL #### Returns string ### [**](#getEnumTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L26)inheritedgetEnumTypeDeclarationSQL * ****getEnumTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getEnumTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; fieldNames: string\[]; items?: unknown\[]; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### fieldNames: string\[] * ##### optionalitems: unknown\[] * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L431)inheritedgetExceptionConverter * ****getExceptionConverter**(): [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) - Inherited from BaseSqlitePlatform.getExceptionConverter #### Returns [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#getExtension)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L447)inheritedgetExtension * ****getExtension**\(extensionName, extensionKey, moduleName, em): T - Inherited from BaseSqlitePlatform.getExtension #### Parameters * ##### extensionName: string * ##### extensionKey: string * ##### moduleName: string * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns T ### [**](#getFloatDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L47)inheritedgetFloatDeclarationSQL * ****getFloatDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getFloatDeclarationSQL #### Returns string ### [**](#getFullTextIndexExpression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L384)inheritedgetFullTextIndexExpression * ****getFullTextIndexExpression**(indexName, schemaName, tableName, columns): string - Inherited from BaseSqlitePlatform.getFullTextIndexExpression #### Parameters * ##### indexName: string * ##### schemaName: undefined | string * ##### tableName: string * ##### columns: [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md)\[] #### Returns string ### [**](#getFullTextWhereClause)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L107)inheritedgetFullTextWhereClause * ****getFullTextWhereClause**(): string - Inherited from BaseSqlitePlatform.getFullTextWhereClause #### Returns string ### [**](#getIndexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L91)inheritedgetIndexName * ****getIndexName**(tableName, columns, type): string - Inherited from BaseSqlitePlatform.getIndexName Returns the default name of index for the given columns *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | foreign | sequence #### Returns string ### [**](#getIntegerTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L43)inheritedgetIntegerTypeDeclarationSQL * ****getIntegerTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getIntegerTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getIntervalTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L240)inheritedgetIntervalTypeDeclarationSQL * ****getIntervalTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getIntervalTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getJsonDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L359)inheritedgetJsonDeclarationSQL * ****getJsonDeclarationSQL**(): string - Inherited from BaseSqlitePlatform.getJsonDeclarationSQL #### Returns string ### [**](#getJsonIndexDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L100)inheritedgetJsonIndexDefinition * ****getJsonIndexDefinition**(index): string\[] - Inherited from BaseSqlitePlatform.getJsonIndexDefinition #### Parameters * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string\[] ### [**](#getMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L287)inheritedgetMappedType * ****getMappedType**(type): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from BaseSqlitePlatform.getMappedType #### Parameters * ##### type: string #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ### [**](#getMediumIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L220)inheritedgetMediumIntTypeDeclarationSQL * ****getMediumIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getMediumIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L61)inheritedgetNamingStrategy * ****getNamingStrategy**(): new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - Inherited from BaseSqlitePlatform.getNamingStrategy #### Returns new () => [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * * **new (): [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) - #### Returns [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#getRegExpOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L168)inheritedgetRegExpOperator * ****getRegExpOperator**(val, flags): string - Inherited from BaseSqlitePlatform.getRegExpOperator #### Parameters * ##### optionalval: unknown * ##### optionalflags: string #### Returns string ### [**](#getRegExpValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L172)inheritedgetRegExpValue * ****getRegExpValue**(val): { $flags? : string; $re: string } - Inherited from BaseSqlitePlatform.getRegExpValue #### Parameters * ##### val: RegExp #### Returns { $flags?: string; $re: string } * ##### optional$flags?: string * ##### $re: string ### [**](#getReleaseSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L61)inheritedgetReleaseSavepointSQL * ****getReleaseSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getReleaseSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRepositoryClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L19)inheritedgetRepositoryClass * ****getRepositoryClass**\(): [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> - Inherited from BaseSqlitePlatform.getRepositoryClass #### Returns [Constructor](https://mikro-orm.io/api/core.md#Constructor)<[EntityRepository](https://mikro-orm.io/api/core/class/EntityRepository.md)\> ### [**](#getRollbackToSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L57)inheritedgetRollbackToSavepointSQL * ****getRollbackToSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getRollbackToSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getRollbackTransactionSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L49)inheritedgetRollbackTransactionSQL * ****getRollbackTransactionSQL**(): string - Inherited from BaseSqlitePlatform.getRollbackTransactionSQL #### Returns string ### [**](#getSavepointSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L53)inheritedgetSavepointSQL * ****getSavepointSQL**(savepointName): string - Inherited from BaseSqlitePlatform.getSavepointSQL #### Parameters * ##### savepointName: string #### Returns string ### [**](#getSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L33)inheritedgetSchemaGenerator * ****getSchemaGenerator**(driver, em): [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) - Inherited from BaseSqlitePlatform.getSchemaGenerator #### Parameters * ##### driver: [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)> * ##### optionalem: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#getSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L23)inheritedgetSchemaHelper * ****getSchemaHelper**(): undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) - Inherited from BaseSqlitePlatform.getSchemaHelper #### Returns undefined | [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#getSearchJsonPropertyKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L89)inheritedgetSearchJsonPropertyKey * ****getSearchJsonPropertyKey**(path, type, aliased, value): string - Inherited from BaseSqlitePlatform.getSearchJsonPropertyKey #### Parameters * ##### path: string\[] * ##### type: string * ##### aliased: boolean * ##### optionalvalue: unknown #### Returns string ### [**](#getSearchJsonPropertySQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L85)inheritedgetSearchJsonPropertySQL * ****getSearchJsonPropertySQL**(path, type, aliased): string - Inherited from BaseSqlitePlatform.getSearchJsonPropertySQL #### Parameters * ##### path: string * ##### type: string * ##### aliased: boolean #### Returns string ### [**](#getSerializedPrimaryKeyField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L129)inheritedgetSerializedPrimaryKeyField * ****getSerializedPrimaryKeyField**(field): string - Inherited from BaseSqlitePlatform.getSerializedPrimaryKeyField Used when serializing via toObject and toJSON methods, allows to use different PK field name (like `id` instead of `_id`) *** #### Parameters * ##### field: string #### Returns string ### [**](#getSmallIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L39)inheritedgetSmallIntTypeDeclarationSQL * ****getSmallIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getSmallIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getTextTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L244)inheritedgetTextTypeDeclarationSQL * ****getTextTypeDeclarationSQL**(\_column): string - Inherited from BaseSqlitePlatform.getTextTypeDeclarationSQL #### Parameters * ##### \_column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getTimeTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L164)inheritedgetTimeTypeDeclarationSQL * ****getTimeTypeDeclarationSQL**(length): string - Inherited from BaseSqlitePlatform.getTimeTypeDeclarationSQL #### Parameters * ##### optionallength: number #### Returns string ### [**](#getTimezone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L557)inheritedgetTimezone * ****getTimezone**(): undefined | string - Inherited from BaseSqlitePlatform.getTimezone #### Returns undefined | string ### [**](#getTinyIntTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L35)inheritedgetTinyIntTypeDeclarationSQL * ****getTinyIntTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getTinyIntTypeDeclarationSQL #### Parameters * ##### column: { autoincrement?: boolean; length?: number; unsigned?: boolean } * ##### optionalautoincrement: boolean * ##### optionallength: number * ##### optionalunsigned: boolean #### Returns string ### [**](#getUuidTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L271)inheritedgetUuidTypeDeclarationSQL * ****getUuidTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getUuidTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#getVarcharTypeDeclarationSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L59)inheritedgetVarcharTypeDeclarationSQL * ****getVarcharTypeDeclarationSQL**(column): string - Inherited from BaseSqlitePlatform.getVarcharTypeDeclarationSQL #### Parameters * ##### column: { length?: number } * ##### optionallength: number #### Returns string ### [**](#indexForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L15)inheritedindexForeignKeys * ****indexForeignKeys**(): boolean - Inherited from BaseSqlitePlatform.indexForeignKeys #### Returns boolean ### [**](#isAllowedTopLevelOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L180)inheritedisAllowedTopLevelOperator * ****isAllowedTopLevelOperator**(operator): boolean - Inherited from BaseSqlitePlatform.isAllowedTopLevelOperator #### Parameters * ##### operator: string #### Returns boolean ### [**](#isBigIntProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L196)inheritedisBigIntProperty * ****isBigIntProperty**(prop): boolean - Inherited from BaseSqlitePlatform.isBigIntProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#isNumericColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L566)inheritedisNumericColumn * ****isNumericColumn**(mappedType): boolean - Inherited from BaseSqlitePlatform.isNumericColumn #### Parameters * ##### mappedType: [Type](https://mikro-orm.io/api/core/class/Type.md)\ #### Returns boolean ### [**](#isNumericProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L561)inheritedisNumericProperty * ****isNumericProperty**(prop, ignoreCustomType): boolean - Inherited from BaseSqlitePlatform.isNumericProperty #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### ignoreCustomType: boolean = false #### Returns boolean ### [**](#isPopulated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L590)inheritedisPopulated * ****isPopulated**\(key, populate): boolean - Inherited from BaseSqlitePlatform.isPopulated #### Parameters * ##### key: string * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] #### Returns boolean ### [**](#isRaw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L112)inheritedisRaw * ****isRaw**(value): boolean - Inherited from BaseSqlitePlatform.isRaw #### Parameters * ##### value: any #### Returns boolean ### [**](#lookupExtensions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L28)inheritedlookupExtensions * ****lookupExtensions**(orm): void - Inherited from BaseSqlitePlatform.lookupExtensions Allows registering extensions of the driver automatically (e.g. `SchemaGenerator` extension in SQL drivers). *** #### Parameters * ##### orm: [MikroORM](https://mikro-orm.io/api/core/class/MikroORM.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#marshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L343)inheritedmarshallArray * ****marshallArray**(values): string - Inherited from BaseSqlitePlatform.marshallArray #### Parameters * ##### values: string\[] #### Returns string ### [**](#normalizeColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L63)inheritednormalizeColumnType * ****normalizeColumnType**(type, options): string - Inherited from BaseSqlitePlatform.normalizeColumnType This should be used only to compare types, it can strip some information like the length. *** #### Parameters * ##### type: string * ##### options: { length?: number; precision?: number; scale?: number } = {} * ##### optionallength: number * ##### optionalprecision: number * ##### optionalscale: number #### Returns string ### [**](#normalizePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L115)inheritednormalizePrimaryKey * ****normalizePrimaryKey**\(data): T - Inherited from BaseSqlitePlatform.normalizePrimaryKey Normalizes primary key wrapper to scalar value (e.g. mongodb's ObjectId to string) *** #### Parameters * ##### data: IPrimaryKeyValue | [Primary](https://mikro-orm.io/api/core.md#Primary)\ #### Returns T ### [**](#parseDate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L412)inheritedparseDate * ****parseDate**(value): Date - Inherited from BaseSqlitePlatform.parseDate #### Parameters * ##### value: string | number #### Returns Date ### [**](#processDateProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L83)inheritedprocessDateProperty * ****processDateProperty**(value): string | number | Date - Inherited from BaseSqlitePlatform.processDateProperty This is used to narrow the value of Date properties as they will be stored as timestamps in sqlite. We use this method to convert Dates to timestamps when computing the changeset, so we have the right data type in the payload as well as in original entity data. Without that, we would end up with diffs including all Date properties, as we would be comparing Date object with timestamp. *** #### Parameters * ##### value: unknown #### Returns string | number | Date ### [**](#quoteIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L478)inheritedquoteIdentifier * ****quoteIdentifier**(id, quote): string - Inherited from BaseSqlitePlatform.quoteIdentifier #### Parameters * ##### id: string | { toString: () => string } * * ##### toString: () => string ##### quote: string = '\`' #### Returns string ### [**](#quoteValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L119)inheritedquoteValue * ****quoteValue**(value): string - Inherited from BaseSqlitePlatform.quoteValue #### Parameters * ##### value: any #### Returns string ### [**](#quoteVersionValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L111)inheritedquoteVersionValue * ****quoteVersionValue**(value, prop): string | number | Date - Inherited from BaseSqlitePlatform.quoteVersionValue #### Parameters * ##### value: number | Date * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns string | number | Date ### [**](#setConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L542)inheritedsetConfig * ****setConfig**(config): void - Inherited from BaseSqlitePlatform.setConfig #### Parameters * ##### config: [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> #### Returns void ### [**](#shouldHaveColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L594)inheritedshouldHaveColumn * ****shouldHaveColumn**\(prop, populate, exclude, includeFormulas, ignoreInlineEmbeddables): boolean - Inherited from BaseSqlitePlatform.shouldHaveColumn #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### populate: boolean | [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalexclude: string\[] * ##### includeFormulas: boolean = true * ##### ignoreInlineEmbeddables: boolean = true #### Returns boolean ### [**](#supportsCreatingFullTextIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L380)inheritedsupportsCreatingFullTextIndex * ****supportsCreatingFullTextIndex**(): boolean - Inherited from BaseSqlitePlatform.supportsCreatingFullTextIndex #### Returns boolean ### [**](#supportsCustomPrimaryKeyNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L586)inheritedsupportsCustomPrimaryKeyNames * ****supportsCustomPrimaryKeyNames**(): boolean - Inherited from BaseSqlitePlatform.supportsCustomPrimaryKeyNames #### Returns boolean ### [**](#supportsDownMigrations)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L103)inheritedsupportsDownMigrations * ****supportsDownMigrations**(): boolean - Inherited from BaseSqlitePlatform.supportsDownMigrations Currently not supported due to how knex does complex sqlite diffing (always based on current schema) *** #### Returns boolean ### [**](#supportsMultipleCascadePaths)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L331)inheritedsupportsMultipleCascadePaths * ****supportsMultipleCascadePaths**(): boolean - Inherited from BaseSqlitePlatform.supportsMultipleCascadePaths #### Returns boolean ### [**](#supportsMultipleStatements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L335)inheritedsupportsMultipleStatements * ****supportsMultipleStatements**(): boolean - Inherited from BaseSqlitePlatform.supportsMultipleStatements #### Returns boolean ### [**](#supportsNativeEnums)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L78)inheritedsupportsNativeEnums * ****supportsNativeEnums**(): boolean - Inherited from BaseSqlitePlatform.supportsNativeEnums for postgres native enums *** #### Returns boolean ### [**](#supportsSchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L116)inheritedsupportsSchemas * ****supportsSchemas**(): boolean - Inherited from BaseSqlitePlatform.supportsSchemas #### Returns boolean ### [**](#supportsTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L53)inheritedsupportsTransactions * ****supportsTransactions**(): boolean - Inherited from BaseSqlitePlatform.supportsTransactions #### Returns boolean ### [**](#supportsUnsigned)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L570)inheritedsupportsUnsigned * ****supportsUnsigned**(): boolean - Inherited from BaseSqlitePlatform.supportsUnsigned #### Returns boolean ### [**](#unmarshallArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L347)inheritedunmarshallArray * ****unmarshallArray**(value): string\[] - Inherited from BaseSqlitePlatform.unmarshallArray #### Parameters * ##### value: string #### Returns string\[] ### [**](#usesBatchInserts)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L97)inheritedusesBatchInserts * ****usesBatchInserts**(): boolean - Inherited from BaseSqlitePlatform.usesBatchInserts Whether or not the driver supports retuning list of created PKs back when multi-inserting *** #### Returns boolean ### [**](#usesBatchUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L104)inheritedusesBatchUpdates * ****usesBatchUpdates**(): boolean - Inherited from BaseSqlitePlatform.usesBatchUpdates Whether or not the driver supports updating many records at once *** #### Returns boolean ### [**](#usesCascadeStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L73)inheritedusesCascadeStatement * ****usesCascadeStatement**(): boolean - Inherited from BaseSqlitePlatform.usesCascadeStatement #### Returns boolean ### [**](#usesDefaultKeyword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L6)inheritedusesDefaultKeyword * ****usesDefaultKeyword**(): boolean - Inherited from BaseSqlitePlatform.usesDefaultKeyword #### Returns boolean ### [**](#usesDifferentSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L133)inheritedusesDifferentSerializedPrimaryKey * ****usesDifferentSerializedPrimaryKey**(): boolean - Inherited from BaseSqlitePlatform.usesDifferentSerializedPrimaryKey #### Returns boolean ### [**](#usesImplicitTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L57)inheritedusesImplicitTransactions * ****usesImplicitTransactions**(): boolean - Inherited from BaseSqlitePlatform.usesImplicitTransactions #### Returns boolean ### [**](#usesOutputStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L69)inheritedusesOutputStatement * ****usesOutputStatement**(): boolean - Inherited from BaseSqlitePlatform.usesOutputStatement #### Returns boolean ### [**](#usesPivotTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L11)inheritedusesPivotTable * ****usesPivotTable**(): boolean - Inherited from BaseSqlitePlatform.usesPivotTable #### Returns boolean ### [**](#usesReturningStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L10)inheritedusesReturningStatement * ****usesReturningStatement**(): boolean - Inherited from BaseSqlitePlatform.usesReturningStatement #### Returns boolean ### [**](#validateMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L633)inheritedvalidateMetadata * ****validateMetadata**(meta): void - Inherited from BaseSqlitePlatform.validateMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void --- # Source: https://mikro-orm.io/api/sqlite/class/SqliteSchemaHelper.md # SqliteSchemaHelper ### Hierarchy * [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) * *SqliteSchemaHelper* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Accessors * [**knex](#knex) * [**options](#options) ### Methods * [**configureColumn](#configureColumn) * [**configureColumnDefault](#configureColumnDefault) * [**createCheck](#createCheck) * [**createForeignKey](#createForeignKey) * [**createIndex](#createIndex) * [**createSchemaBuilder](#createSchemaBuilder) * [**createTable](#createTable) * [**createTableColumn](#createTableColumn) * [**databaseExists](#databaseExists) * [**disableForeignKeysSQL](#disableForeignKeysSQL) * [**dump](#dump) * [**enableForeignKeysSQL](#enableForeignKeysSQL) * [**finalizeTable](#finalizeTable) * [**getAlterColumnAutoincrement](#getAlterColumnAutoincrement) * [**getAlterNativeEnumSQL](#getAlterNativeEnumSQL) * [**getAlterTable](#getAlterTable) * [**getChangeColumnCommentSQL](#getChangeColumnCommentSQL) * [**getChecks](#getChecks) * [**getColumns](#getColumns) * [**getCreateDatabaseSQL](#getCreateDatabaseSQL) * [**getCreateIndexSQL](#getCreateIndexSQL) * [**getCreateNamespaceSQL](#getCreateNamespaceSQL) * [**getCreateNativeEnumSQL](#getCreateNativeEnumSQL) * [**getDatabaseExistsSQL](#getDatabaseExistsSQL) * [**getDatabaseNotExistsError](#getDatabaseNotExistsError) * [**getDefaultEmptyString](#getDefaultEmptyString) * [**getDropColumnsSQL](#getDropColumnsSQL) * [**getDropDatabaseSQL](#getDropDatabaseSQL) * [**getDropIndexSQL](#getDropIndexSQL) * [**getDropNamespaceSQL](#getDropNamespaceSQL) * [**getDropNativeEnumSQL](#getDropNativeEnumSQL) * [**getEnumDefinitions](#getEnumDefinitions) * [**getForeignKeys](#getForeignKeys) * [**getForeignKeysSQL](#getForeignKeysSQL) * [**getIndexes](#getIndexes) * [**getListTablesSQL](#getListTablesSQL) * [**getManagementDbName](#getManagementDbName) * [**getNamespaces](#getNamespaces) * [**getPostAlterTable](#getPostAlterTable) * [**getPreAlterTable](#getPreAlterTable) * [**getPrimaryKeys](#getPrimaryKeys) * [**getReferencedTableName](#getReferencedTableName) * [**getRenameColumnSQL](#getRenameColumnSQL) * [**getRenameIndexSQL](#getRenameIndexSQL) * [**getSchemaBeginning](#getSchemaBeginning) * [**getSchemaEnd](#getSchemaEnd) * [**getTablesGroupedBySchemas](#getTablesGroupedBySchemas) * [**hasNonDefaultPrimaryKeyName](#hasNonDefaultPrimaryKeyName) * [**inferLengthFromColumnType](#inferLengthFromColumnType) * [**isImplicitIndex](#isImplicitIndex) * [**loadInformationSchema](#loadInformationSchema) * [**mapForeignKeys](#mapForeignKeys) * [**normalizeDefaultValue](#normalizeDefaultValue) * [**pushTableQuery](#pushTableQuery) * [**splitTableName](#splitTableName) * [**supportsSchemaConstraints](#supportsSchemaConstraints) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L18)constructor * ****new SqliteSchemaHelper**(platform): [SqliteSchemaHelper](https://mikro-orm.io/api/sqlite/class/SqliteSchemaHelper.md) - Inherited from BaseSqliteSchemaHelper.constructor #### Parameters * ##### platform: [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) #### Returns [SqliteSchemaHelper](https://mikro-orm.io/api/sqlite/class/SqliteSchemaHelper.md) ## Accessors[**](#Accessors) ### [**](#knex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L535)inheritedknex * **get knex(): [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ - Inherited from BaseSqliteSchemaHelper.knex #### Returns [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L540)inheritedoptions * **get options(): { createForeignKeyConstraints? : boolean; disableForeignKeys? : boolean; ignoreSchema? : string\[]; managementDbName? : string; skipColumns? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables? : (string | RegExp)\[] } - Inherited from BaseSqliteSchemaHelper.options #### Returns { createForeignKeyConstraints?: boolean; disableForeignKeys?: boolean; ignoreSchema?: string\[]; managementDbName?: string; skipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]>; skipTables?: (string | RegExp)\[] } * ##### optionalcreateForeignKeyConstraints?: boolean * ##### optionaldisableForeignKeys?: boolean * ##### optionalignoreSchema?: string\[] * ##### optionalmanagementDbName?: string * ##### optionalskipColumns?: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<(string | RegExp)\[]> * ##### optionalskipTables?: (string | RegExp)\[] ## Methods[**](#Methods) ### [**](#configureColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L200)inheritedconfigureColumn * ****configureColumn**(column, col, knex, changedProperties): ColumnBuilder - Inherited from BaseSqliteSchemaHelper.configureColumn #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#configureColumnDefault)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L212)inheritedconfigureColumnDefault * ****configureColumnDefault**(column, col, knex, changedProperties): ColumnBuilder - Inherited from BaseSqliteSchemaHelper.configureColumnDefault #### Parameters * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### col: ColumnBuilder * ##### knex: [Knex](https://mikro-orm.io/api/knex/interface/Knex.md)\ * ##### optionalchangedProperties: Set\ #### Returns ColumnBuilder ### [**](#createCheck)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L507)inheritedcreateCheck * ****createCheck**(table, check): void - Inherited from BaseSqliteSchemaHelper.createCheck #### Parameters * ##### table: CreateTableBuilder * ##### check: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\ #### Returns void ### [**](#createForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L422)inheritedcreateForeignKey * ****createForeignKey**(table, foreignKey, schema): void - Inherited from BaseSqliteSchemaHelper.createForeignKey #### Parameters * ##### table: CreateTableBuilder * ##### foreignKey: [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) * ##### optionalschema: string #### Returns void ### [**](#createIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L472)inheritedcreateIndex * ****createIndex**(table, index, tableDef, createPrimary): void - Inherited from BaseSqliteSchemaHelper.createIndex #### Parameters * ##### table: CreateTableBuilder * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### tableDef: DatabaseTable * ##### createPrimary: boolean = false #### Returns void ### [**](#createSchemaBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L511)inheritedcreateSchemaBuilder * ****createSchemaBuilder**(schema): SchemaBuilder - Inherited from BaseSqliteSchemaHelper.createSchemaBuilder #### Parameters * ##### optionalschema: string #### Returns SchemaBuilder ### [**](#createTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L391)inheritedcreateTable * ****createTable**(tableDef, alter): SchemaBuilder - Inherited from BaseSqliteSchemaHelper.createTable #### Parameters * ##### tableDef: DatabaseTable * ##### optionalalter: boolean #### Returns SchemaBuilder ### [**](#createTableColumn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L174)inheritedcreateTableColumn * ****createTableColumn**(table, column, fromTable, changedProperties, alter): undefined | ColumnBuilder - Inherited from BaseSqliteSchemaHelper.createTableColumn #### Parameters * ##### table: TableBuilder * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### fromTable: DatabaseTable * ##### optionalchangedProperties: Set\ * ##### optionalalter: boolean #### Returns undefined | ColumnBuilder ### [**](#databaseExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L196)inheriteddatabaseExists * ****databaseExists**(connection, name): Promise\ - Inherited from BaseSqliteSchemaHelper.databaseExists #### Parameters * ##### connection: [Connection](https://mikro-orm.io/api/core/class/Connection.md) * ##### name: string #### Returns Promise\ ### [**](#disableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L8)inheriteddisableForeignKeysSQL * ****disableForeignKeysSQL**(): string - Inherited from BaseSqliteSchemaHelper.disableForeignKeysSQL #### Returns string ### [**](#dump)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L373)inheriteddump * ****dump**(builder, append): Promise\ - Inherited from BaseSqliteSchemaHelper.dump #### Parameters * ##### builder: string | SchemaBuilder * ##### append: string #### Returns Promise\ ### [**](#enableForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L12)inheritedenableForeignKeysSQL * ****enableForeignKeysSQL**(): string - Inherited from BaseSqliteSchemaHelper.enableForeignKeysSQL #### Returns string ### [**](#finalizeTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L44)inheritedfinalizeTable * ****finalizeTable**(table, charset, collate): void - Inherited from BaseSqliteSchemaHelper.finalizeTable #### Parameters * ##### table: TableBuilder * ##### charset: string * ##### optionalcollate: string #### Returns void ### [**](#getAlterColumnAutoincrement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L232)inheritedgetAlterColumnAutoincrement * ****getAlterColumnAutoincrement**(tableName, column, schemaName): string - Inherited from BaseSqliteSchemaHelper.getAlterColumnAutoincrement #### Parameters * ##### tableName: string * ##### column: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getAlterNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L98)inheritedgetAlterNativeEnumSQL * ****getAlterNativeEnumSQL**(name, schema, value, items, oldItems): string - Inherited from BaseSqliteSchemaHelper.getAlterNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string * ##### optionalvalue: string * ##### optionalitems: string\[] * ##### optionaloldItems: string\[] #### Returns string ### [**](#getAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L209)inheritedgetAlterTable * ****getAlterTable**(changedTable, wrap): Promise\ - Inherited from BaseSqliteSchemaHelper.getAlterTable #### Parameters * ##### changedTable: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### optionalwrap: boolean #### Returns Promise\ ### [**](#getChangeColumnCommentSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L236)inheritedgetChangeColumnCommentSQL * ****getChangeColumnCommentSQL**(tableName, to, schemaName): string - Inherited from BaseSqliteSchemaHelper.getChangeColumnCommentSQL #### Parameters * ##### tableName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L161)inheritedgetChecks * ****getChecks**(connection, tableName, schemaName): Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> - Inherited from BaseSqliteSchemaHelper.getChecks #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[]> ### [**](#getColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L67)inheritedgetColumns * ****getColumns**(connection, tableName, schemaName): Promise\ - Inherited from BaseSqliteSchemaHelper.getColumns #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getCreateDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L192)inheritedgetCreateDatabaseSQL * ****getCreateDatabaseSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getCreateDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L130)inheritedgetCreateIndexSQL * ****getCreateIndexSQL**(tableName, index, partialExpression): string - Inherited from BaseSqliteSchemaHelper.getCreateIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### partialExpression: boolean = false #### Returns string ### [**](#getCreateNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L328)inheritedgetCreateNamespaceSQL * ****getCreateNamespaceSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getCreateNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getCreateNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L90)inheritedgetCreateNativeEnumSQL * ****getCreateNativeEnumSQL**(name, values, schema): string - Inherited from BaseSqliteSchemaHelper.getCreateNativeEnumSQL #### Parameters * ##### name: string * ##### values: unknown\[] * ##### optionalschema: string #### Returns string ### [**](#getDatabaseExistsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L337)inheritedgetDatabaseExistsSQL * ****getDatabaseExistsSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDatabaseExistsSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDatabaseNotExistsError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L341)inheritedgetDatabaseNotExistsError * ****getDatabaseNotExistsError**(dbName): string - Inherited from BaseSqliteSchemaHelper.getDatabaseNotExistsError #### Parameters * ##### dbName: string #### Returns string ### [**](#getDefaultEmptyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L349)inheritedgetDefaultEmptyString * ****getDefaultEmptyString**(): string - Inherited from BaseSqliteSchemaHelper.getDefaultEmptyString #### Returns string ### [**](#getDropColumnsSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L34)inheritedgetDropColumnsSQL * ****getDropColumnsSQL**(tableName, columns, schemaName): string - Inherited from BaseSqliteSchemaHelper.getDropColumnsSQL #### Parameters * ##### tableName: string * ##### columns: [Column](https://mikro-orm.io/api/knex/interface/Column.md)\[] * ##### optionalschemaName: string #### Returns string ### [**](#getDropDatabaseSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L25)inheritedgetDropDatabaseSQL * ****getDropDatabaseSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDropDatabaseSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L147)inheritedgetDropIndexSQL * ****getDropIndexSQL**(tableName, index): string - Inherited from BaseSqliteSchemaHelper.getDropIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) #### Returns string ### [**](#getDropNamespaceSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L333)inheritedgetDropNamespaceSQL * ****getDropNamespaceSQL**(name): string - Inherited from BaseSqliteSchemaHelper.getDropNamespaceSQL #### Parameters * ##### name: string #### Returns string ### [**](#getDropNativeEnumSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L94)inheritedgetDropNativeEnumSQL * ****getDropNativeEnumSQL**(name, schema): string - Inherited from BaseSqliteSchemaHelper.getDropNativeEnumSQL #### Parameters * ##### name: string * ##### optionalschema: string #### Returns string ### [**](#getEnumDefinitions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L105)inheritedgetEnumDefinitions * ****getEnumDefinitions**(connection, checks, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> - Inherited from BaseSqliteSchemaHelper.getEnumDefinitions #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### checks: [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\\[] * ##### tableName: string * ##### schemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\> ### [**](#getForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L66)inheritedgetForeignKeys * ****getForeignKeys**(connection, tableName, schemaName): Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> - Inherited from BaseSqliteSchemaHelper.getForeignKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[Dictionary](https://mikro-orm.io/api/core.md#Dictionary)> ### [**](#getForeignKeysSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L166)inheritedgetForeignKeysSQL * ****getForeignKeysSQL**(tableName): string - Inherited from BaseSqliteSchemaHelper.getForeignKeysSQL #### Parameters * ##### tableName: string #### Returns string ### [**](#getIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L131)inheritedgetIndexes * ****getIndexes**(connection, tableName, schemaName): Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> - Inherited from BaseSqliteSchemaHelper.getIndexes #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[]> ### [**](#getListTablesSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L20)inheritedgetListTablesSQL * ****getListTablesSQL**(): string - Inherited from BaseSqliteSchemaHelper.getListTablesSQL #### Returns string ### [**](#getManagementDbName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L188)inheritedgetManagementDbName * ****getManagementDbName**(): string - Inherited from BaseSqliteSchemaHelper.getManagementDbName #### Returns string ### [**](#getNamespaces)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L240)inheritedgetNamespaces * ****getNamespaces**(connection): Promise\ - Inherited from BaseSqliteSchemaHelper.getNamespaces #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) #### Returns Promise\ ### [**](#getPostAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L228)inheritedgetPostAlterTable * ****getPostAlterTable**(tableDiff, safe): string - Inherited from BaseSqliteSchemaHelper.getPostAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPreAlterTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L224)inheritedgetPreAlterTable * ****getPreAlterTable**(tableDiff, safe): string - Inherited from BaseSqliteSchemaHelper.getPreAlterTable #### Parameters * ##### tableDiff: [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) * ##### safe: boolean #### Returns string ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L124)inheritedgetPrimaryKeys * ****getPrimaryKeys**(connection, indexes, tableName, schemaName): Promise\ - Inherited from BaseSqliteSchemaHelper.getPrimaryKeys #### Parameters * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### indexes: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)\[] * ##### tableName: string * ##### optionalschemaName: string #### Returns Promise\ ### [**](#getReferencedTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L456)inheritedgetReferencedTableName * ****getReferencedTableName**(referencedTableName, schema): string - Inherited from BaseSqliteSchemaHelper.getReferencedTableName #### Parameters * ##### referencedTableName: string * ##### optionalschema: string #### Returns string ### [**](#getRenameColumnSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L119)inheritedgetRenameColumnSQL * ****getRenameColumnSQL**(tableName, oldColumnName, to, schemaName): string - Inherited from BaseSqliteSchemaHelper.getRenameColumnSQL #### Parameters * ##### tableName: string * ##### oldColumnName: string * ##### to: [Column](https://mikro-orm.io/api/knex/interface/Column.md) * ##### optionalschemaName: string #### Returns string ### [**](#getRenameIndexSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L151)inheritedgetRenameIndexSQL * ****getRenameIndexSQL**(tableName, index, oldIndexName): string - Inherited from BaseSqliteSchemaHelper.getRenameIndexSQL #### Parameters * ##### tableName: string * ##### index: [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) * ##### oldIndexName: string #### Returns string ### [**](#getSchemaBeginning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L20)inheritedgetSchemaBeginning * ****getSchemaBeginning**(charset, disableForeignKeys): string - Inherited from BaseSqliteSchemaHelper.getSchemaBeginning #### Parameters * ##### charset: string * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getSchemaEnd)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L36)inheritedgetSchemaEnd * ****getSchemaEnd**(disableForeignKeys): string - Inherited from BaseSqliteSchemaHelper.getSchemaEnd #### Parameters * ##### optionaldisableForeignKeys: boolean #### Returns string ### [**](#getTablesGroupedBySchemas)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L521)inheritedgetTablesGroupedBySchemas * ****getTablesGroupedBySchemas**(tables): Map\ - Inherited from BaseSqliteSchemaHelper.getTablesGroupedBySchemas #### Parameters * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] #### Returns Map\ ### [**](#hasNonDefaultPrimaryKeyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L162)inheritedhasNonDefaultPrimaryKeyName * ****hasNonDefaultPrimaryKeyName**(table): boolean - Inherited from BaseSqliteSchemaHelper.hasNonDefaultPrimaryKeyName #### Parameters * ##### table: DatabaseTable #### Returns boolean ### [**](#inferLengthFromColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L57)inheritedinferLengthFromColumnType * ****inferLengthFromColumnType**(type): undefined | number - Inherited from BaseSqliteSchemaHelper.inferLengthFromColumnType #### Parameters * ##### type: string #### Returns undefined | number ### [**](#isImplicitIndex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L204)inheritedisImplicitIndex * ****isImplicitIndex**(name): boolean - Inherited from BaseSqliteSchemaHelper.isImplicitIndex Implicit indexes will be ignored when diffing *** #### Parameters * ##### name: string #### Returns boolean ### [**](#loadInformationSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L102)inheritedloadInformationSchema * ****loadInformationSchema**(schema, connection, tables, schemas): Promise\ - Inherited from BaseSqliteSchemaHelper.loadInformationSchema #### Parameters * ##### schema: DatabaseSchema * ##### connection: [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) * ##### tables: [Table](https://mikro-orm.io/api/knex/interface/Table.md)\[] * ##### optionalschemas: string\[] #### Returns Promise\ ### [**](#mapForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L170)inheritedmapForeignKeys * ****mapForeignKeys**(fks, tableName): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - Inherited from BaseSqliteSchemaHelper.mapForeignKeys #### Parameters * ##### fks: any\[] * ##### tableName: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#normalizeDefaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L297)inheritednormalizeDefaultValue * ****normalizeDefaultValue**(defaultValue, length, defaultValues): string | number - Inherited from BaseSqliteSchemaHelper.normalizeDefaultValue #### Parameters * ##### defaultValue: string * ##### optionallength: number * ##### defaultValues: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ = {} #### Returns string | number ### [**](#pushTableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L369)inheritedpushTableQuery * ****pushTableQuery**(table, expression, grouping): void - Inherited from BaseSqliteSchemaHelper.pushTableQuery Uses `raw` method injected in `AbstractSqlConnection` to allow adding custom queries inside alter statements. *** #### Parameters * ##### table: TableBuilder * ##### expression: string * ##### grouping: string = 'alterTable' #### Returns void ### [**](#splitTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L448)inheritedsplitTableName * ****splitTableName**(name): \[undefined | string, string] - Inherited from BaseSqliteSchemaHelper.splitTableName #### Parameters * ##### name: string #### Returns \[undefined | string, string] ### [**](#supportsSchemaConstraints)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L16)inheritedsupportsSchemaConstraints * ****supportsSchemaConstraints**(): boolean - Inherited from BaseSqliteSchemaHelper.supportsSchemaConstraints #### Returns boolean --- # Source: https://mikro-orm.io/api/knex/class/SqliteTableCompiler.md # SqliteTableCompiler ### Hierarchy * Sqlite3DialectTableCompiler * *SqliteTableCompiler* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**foreign](#foreign) * [**foreignKeys](#foreignKeys) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new SqliteTableCompiler**(): [SqliteTableCompiler](https://mikro-orm.io/api/knex/class/SqliteTableCompiler.md) - Inherited from MonkeyPatchable.Sqlite3DialectTableCompiler.constructor #### Returns [SqliteTableCompiler](https://mikro-orm.io/api/knex/class/SqliteTableCompiler.md) ## Methods[**](#Methods) ### [**](#foreign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteTableCompiler.ts#L6)foreign * ****foreign**(this, foreignInfo): void - #### Parameters * ##### this: any * ##### foreignInfo: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#foreignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteTableCompiler.ts#L56)foreignKeys * ****foreignKeys**(this): string - #### Parameters * ##### this: any #### Returns string --- # Source: https://mikro-orm.io/api/core/class/StringType.md # StringType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *StringType* * [CharacterType](https://mikro-orm.io/api/core/class/CharacterType.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new StringType**(): [StringType](https://mikro-orm.io/api/core/class/StringType.md) - Inherited from Type.constructor #### Returns [StringType](https://mikro-orm.io/api/core/class/StringType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/StringType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/StringType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/StringType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/StringType.ts#L19)getDefaultLength * ****getDefaultLength**(platform): number - Overrides Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md # SyncCacheAdapter ### Hierarchy * [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) * *SyncCacheAdapter* ### Implemented by * [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md) * [NullCacheAdapter](https://mikro-orm.io/api/core/class/NullCacheAdapter.md) ## Index[**](#Index) ### Methods * [**clear](#clear) * [**close](#close) * [**combine](#combine) * [**get](#get) * [**remove](#remove) * [**set](#set) ## Methods[**](#Methods) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L21)inheritedclear * ****clear**(): void | Promise\ - Inherited from CacheAdapter.clear Clears all items stored in the cache. *** #### Returns void | Promise\ ### [**](#close)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L26)optionalinheritedclose * ****close**(): void | Promise\ - Inherited from CacheAdapter.close Called inside `MikroORM.close()` Allows graceful shutdowns (e.g. for redis). *** #### Returns void | Promise\ ### [**](#combine)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L50)optionalcombine * ****combine**(): string | void - Generates a combined cache from all existing entries. *** #### Returns string | void ### [**](#get)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L35)get * ****get**\(name): undefined | T - Overrides CacheAdapter.get Gets the items under `name` key from the cache. *** #### Parameters * ##### name: string #### Returns undefined | T ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L45)remove * ****remove**(name): void - Overrides CacheAdapter.remove Removes the item from cache. *** #### Parameters * ##### name: string #### Returns void ### [**](#set)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L40)set * ****set**(name, data, origin, expiration): void - Overrides CacheAdapter.set Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. *** #### Parameters * ##### name: string * ##### data: any * ##### origin: string * ##### optionalexpiration: number #### Returns void --- # Source: https://mikro-orm.io/api/core/class/SyntaxErrorException.md # SyntaxErrorException Exception for a syntax error in a statement detected in the driver. ### Hierarchy * [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) * *SyntaxErrorException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new SyntaxErrorException**(previous): [SyntaxErrorException](https://mikro-orm.io/api/core/class/SyntaxErrorException.md) - Inherited from ServerException.constructor #### Parameters * ##### previous: Error #### Returns [SyntaxErrorException](https://mikro-orm.io/api/core/class/SyntaxErrorException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ServerException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ServerException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ServerException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ServerException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ServerException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ServerException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ServerException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ServerException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ServerException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ServerException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ServerException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ServerException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/migrations/class/TSMigrationGenerator.md # TSMigrationGenerator ### Hierarchy * [MigrationGenerator](https://mikro-orm.io/api/migrations/class/MigrationGenerator.md) * *TSMigrationGenerator* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**createStatement](#createStatement) * [**generate](#generate) * [**generateMigrationFile](#generateMigrationFile) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L13)constructor * ****new TSMigrationGenerator**(driver, namingStrategy, options): [TSMigrationGenerator](https://mikro-orm.io/api/migrations/class/TSMigrationGenerator.md) - Inherited from MigrationGenerator.constructor #### Parameters * ##### driver: [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md)<[AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md), [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md)> * ##### namingStrategy: [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) * ##### options: [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) #### Returns [TSMigrationGenerator](https://mikro-orm.io/api/migrations/class/TSMigrationGenerator.md) ## Methods[**](#Methods) ### [**](#createStatement)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L37)inheritedcreateStatement * ****createStatement**(sql, padLeft): string - Inherited from MigrationGenerator.createStatement Creates single migration statement. By default adds `this.addSql(sql);` to the code. *** #### Parameters * ##### sql: string * ##### padLeft: number #### Returns string ### [**](#generate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/MigrationGenerator.ts#L20)inheritedgenerate * ****generate**(diff, path, name): Promise<\[string, string]> - Inherited from MigrationGenerator.generate Generates the full contents of migration file. Uses `generateMigrationFile` to get the file contents. *** #### Parameters * ##### diff: { down: string\[]; up: string\[] } * * ##### down: string\[] * ##### up: string\[] ##### optionalpath: string * ##### optionalname: string #### Returns Promise<\[string, string]> ### [**](#generateMigrationFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/migrations/src/TSMigrationGenerator.ts#L8)generateMigrationFile * ****generateMigrationFile**(className, diff): string - Overrides MigrationGenerator.generateMigrationFile Returns the file contents of given migration. *** #### Parameters * ##### className: string * ##### diff: { down: string\[]; up: string\[] } * ##### down: string\[] * ##### up: string\[] #### Returns string --- # Source: https://mikro-orm.io/api/knex/interface/Table.md # Table ## Index[**](#Index) ### Properties * [**schema\_name](#schema_name) * [**table\_comment](#table_comment) * [**table\_name](#table_name) ## Properties[**](#Properties) ### [**](#schema_name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L21)optionalschema\_name **schema\_name? : string ### [**](#table_comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L22)optionaltable\_comment **table\_comment? : string ### [**](#table_name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L20)table\_name **table\_name: string --- # Source: https://mikro-orm.io/api/knex/interface/TableDifference.md # TableDifference ## Index[**](#Index) ### Properties * [**addedChecks](#addedChecks) * [**addedColumns](#addedColumns) * [**addedForeignKeys](#addedForeignKeys) * [**addedIndexes](#addedIndexes) * [**changedChecks](#changedChecks) * [**changedColumns](#changedColumns) * [**changedComment](#changedComment) * [**changedForeignKeys](#changedForeignKeys) * [**changedIndexes](#changedIndexes) * [**fromTable](#fromTable) * [**name](#name) * [**removedChecks](#removedChecks) * [**removedColumns](#removedColumns) * [**removedForeignKeys](#removedForeignKeys) * [**removedIndexes](#removedIndexes) * [**renamedColumns](#renamedColumns) * [**renamedIndexes](#renamedIndexes) * [**toTable](#toTable) ## Properties[**](#Properties) ### [**](#addedChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L127)addedChecks **addedChecks: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\> ### [**](#addedColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L119)addedColumns **addedColumns: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)> ### [**](#addedForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L130)addedForeignKeys **addedForeignKeys: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)> ### [**](#addedIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L123)addedIndexes **addedIndexes: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)> ### [**](#changedChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L128)changedChecks **changedChecks: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\> ### [**](#changedColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L120)changedColumns **changedColumns: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ColumnDifference](https://mikro-orm.io/api/knex/interface/ColumnDifference.md)> ### [**](#changedComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L116)optionalchangedComment **changedComment? : string ### [**](#changedForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L131)changedForeignKeys **changedForeignKeys: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)> ### [**](#changedIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L124)changedIndexes **changedIndexes: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)> ### [**](#fromTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L117)fromTable **fromTable: DatabaseTable ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L115)name **name: string ### [**](#removedChecks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L129)removedChecks **removedChecks: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md)\> ### [**](#removedColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L121)removedColumns **removedColumns: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)> ### [**](#removedForeignKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L132)removedForeignKeys **removedForeignKeys: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md)> ### [**](#removedIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L125)removedIndexes **removedIndexes: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)> ### [**](#renamedColumns)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L122)renamedColumns **renamedColumns: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[Column](https://mikro-orm.io/api/knex/interface/Column.md)> ### [**](#renamedIndexes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L126)renamedIndexes **renamedIndexes: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)<[IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md)> ### [**](#toTable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L118)toTable **toTable: DatabaseTable --- # Source: https://mikro-orm.io/api/core/class/TableExistsException.md # TableExistsException Exception for an already existing table referenced in a statement detected in the driver. ### Hierarchy * [DatabaseObjectExistsException](https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md) * *TableExistsException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new TableExistsException**(previous): [TableExistsException](https://mikro-orm.io/api/core/class/TableExistsException.md) - Inherited from DatabaseObjectExistsException.constructor #### Parameters * ##### previous: Error #### Returns [TableExistsException](https://mikro-orm.io/api/core/class/TableExistsException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from DatabaseObjectExistsException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from DatabaseObjectExistsException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from DatabaseObjectExistsException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from DatabaseObjectExistsException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from DatabaseObjectExistsException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from DatabaseObjectExistsException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from DatabaseObjectExistsException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from DatabaseObjectExistsException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from DatabaseObjectExistsException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from DatabaseObjectExistsException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from DatabaseObjectExistsException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from DatabaseObjectExistsException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/TableNotFoundException.md # TableNotFoundException Exception for an unknown table referenced in a statement detected in the driver. ### Hierarchy * [DatabaseObjectNotFoundException](https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md) * *TableNotFoundException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new TableNotFoundException**(previous): [TableNotFoundException](https://mikro-orm.io/api/core/class/TableNotFoundException.md) - Inherited from DatabaseObjectNotFoundException.constructor #### Parameters * ##### previous: Error #### Returns [TableNotFoundException](https://mikro-orm.io/api/core/class/TableNotFoundException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from DatabaseObjectNotFoundException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from DatabaseObjectNotFoundException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from DatabaseObjectNotFoundException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from DatabaseObjectNotFoundException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from DatabaseObjectNotFoundException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from DatabaseObjectNotFoundException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from DatabaseObjectNotFoundException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from DatabaseObjectNotFoundException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from DatabaseObjectNotFoundException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from DatabaseObjectNotFoundException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from DatabaseObjectNotFoundException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from DatabaseObjectNotFoundException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/class/TextType.md # TextType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *TextType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new TextType**(): [TextType](https://mikro-orm.io/api/core/class/TextType.md) - Inherited from Type.constructor #### Returns [TextType](https://mikro-orm.io/api/core/class/TextType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TextType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TextType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TextType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/TimeType.md # TimeType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md) * *TimeType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new TimeType**(): [TimeType](https://mikro-orm.io/api/core/class/TimeType.md) - Inherited from Type.constructor #### Returns [TimeType](https://mikro-orm.io/api/core/class/TimeType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TimeType.ts#L16)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: string * ##### b: string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TimeType.ts#L8)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform): string - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: any * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): string - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TimeType.ts#L20)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TimeType.ts#L24)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TimeType.ts#L28)getDefaultLength * ****getDefaultLength**(platform): number - Overrides Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/TinyIntType.md # TinyIntType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *TinyIntType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new TinyIntType**(): [TinyIntType](https://mikro-orm.io/api/core/class/TinyIntType.md) - Inherited from Type.constructor #### Returns [TinyIntType](https://mikro-orm.io/api/core/class/TinyIntType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TinyIntType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | number * ##### b: undefined | null | number #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | number - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | number ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TinyIntType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/TinyIntType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | number - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | number * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | number ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/TransactionContext.md # TransactionContext ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**em](#em) * [**id](#id) ### Methods * [**create](#create) * [**currentTransactionContext](#currentTransactionContext) * [**getEntityManager](#getEntityManager) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L9)constructor * ****new TransactionContext**(em): [TransactionContext](https://mikro-orm.io/api/core/class/TransactionContext.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [TransactionContext](https://mikro-orm.io/api/core/class/TransactionContext.md) ## Properties[**](#Properties) ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L9)readonlyem **em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> ### [**](#id)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L7)readonlyid **id: number ## Methods[**](#Methods) ### [**](#create)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L16)staticcreate * ****create**\(em, next): T - Creates new TransactionContext instance and runs the code inside its domain. *** #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> * ##### next: (...args) => T #### Returns T ### [**](#currentTransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L24)staticcurrentTransactionContext * ****currentTransactionContext**(): undefined | [TransactionContext](https://mikro-orm.io/api/core/class/TransactionContext.md) - Returns current TransactionContext (if available). *** #### Returns undefined | [TransactionContext](https://mikro-orm.io/api/core/class/TransactionContext.md) ### [**](#getEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L31)staticgetEntityManager * ****getEntityManager**(name): undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> - Returns current EntityManager (if available). *** #### Parameters * ##### name: string = 'default' #### Returns undefined | [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> --- # Source: https://mikro-orm.io/api/core/interface/TransactionEventArgs.md # TransactionEventArgs ### Hierarchy * Omit<[EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md)\, entity | meta | changeSet> * *TransactionEventArgs* ## Index[**](#Index) ### Properties * [**em](#em) * [**transaction](#transaction) * [**uow](#uow) ## Properties[**](#Properties) ### [**](#em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L8)inheritedem **em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> Inherited from Omit.em ### [**](#transaction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L18)optionaltransaction **transaction? : any ### [**](#uow)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L19)optionaluow **uow? : [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) --- # Source: https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md # TransactionEventBroadcaster ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**context](#context) ### Methods * [**dispatchEvent](#dispatchEvent) * [**isTopLevel](#isTopLevel) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/TransactionEventBroadcaster.ts#L11)constructor * ****new TransactionEventBroadcaster**(em, uow, context): [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> * ##### optionaluow: [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) * ##### optionalcontext: { topLevelTransaction?: boolean } * ##### optionaltopLevelTransaction: boolean #### Returns [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) ## Properties[**](#Properties) ### [**](#context)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/TransactionEventBroadcaster.ts#L13)optionalreadonlycontext **context? : { topLevelTransaction? : boolean } #### Type declaration * ##### optionaltopLevelTransaction?: boolean ## Methods[**](#Methods) ### [**](#dispatchEvent)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/TransactionEventBroadcaster.ts#L17)dispatchEvent * ****dispatchEvent**(event, transaction): Promise\ - #### Parameters * ##### event: [TransactionEventType](https://mikro-orm.io/api/core.md#TransactionEventType) * ##### optionaltransaction: any #### Returns Promise\ ### [**](#isTopLevel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/TransactionEventBroadcaster.ts#L21)isTopLevel * ****isTopLevel**(): boolean - #### Returns boolean --- # Source: https://mikro-orm.io/api/core/class/TransactionManager.md # TransactionManager Manages transaction lifecycle and propagation for EntityManager. ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**handle](#handle) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionManager.ts#L14)constructor * ****new TransactionManager**(em): [TransactionManager](https://mikro-orm.io/api/core/class/TransactionManager.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [TransactionManager](https://mikro-orm.io/api/core/class/TransactionManager.md) ## Methods[**](#Methods) ### [**](#handle)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionManager.ts#L19)handle * ****handle**\(cb, options): Promise\ - Main entry point for handling transactional operations with propagation support. *** #### Parameters * ##### cb: (em) => T | Promise\ * ##### options: [TransactionOptions](https://mikro-orm.io/api/core/interface/TransactionOptions.md) = {} #### Returns Promise\ --- # Source: https://mikro-orm.io/api/core/interface/TransactionOptions.md # TransactionOptions ## Index[**](#Index) ### Properties * [**clear](#clear) * [**ctx](#ctx) * [**flushMode](#flushMode) * [**ignoreNestedTransactions](#ignoreNestedTransactions) * [**isolationLevel](#isolationLevel) * [**loggerContext](#loggerContext) * [**propagation](#propagation) * [**readOnly](#readOnly) ## Properties[**](#Properties) ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L219)optionalclear **clear? : boolean ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L215)optionalctx **ctx? : any ### [**](#flushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L220)optionalflushMode **flushMode? : [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) ### [**](#ignoreNestedTransactions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L221)optionalignoreNestedTransactions **ignoreNestedTransactions? : boolean ### [**](#isolationLevel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L217)optionalisolationLevel **isolationLevel? : [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L222)optionalloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#propagation)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L216)optionalpropagation **propagation? : [TransactionPropagation](https://mikro-orm.io/api/core/enum/TransactionPropagation.md) ### [**](#readOnly)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L218)optionalreadOnly **readOnly? : boolean --- # Source: https://mikro-orm.io/api/core/enum/TransactionPropagation.md # TransactionPropagation ## Index[**](#Index) ### Enumeration Members * [**MANDATORY](#MANDATORY) * [**NESTED](#NESTED) * [**NEVER](#NEVER) * [**NOT\_SUPPORTED](#NOT_SUPPORTED) * [**REQUIRED](#REQUIRED) * [**REQUIRES\_NEW](#REQUIRES_NEW) * [**SUPPORTS](#SUPPORTS) ## Enumeration Members[**](<#Enumeration Members>) ### [**](#MANDATORY)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L210)MANDATORY **MANDATORY: mandatory ### [**](#NESTED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L207)NESTED **NESTED: nested ### [**](#NEVER)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L211)NEVER **NEVER: never ### [**](#NOT_SUPPORTED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L208)NOT\_SUPPORTED **NOT\_SUPPORTED: not\_supported ### [**](#REQUIRED)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L205)REQUIRED **REQUIRED: required ### [**](#REQUIRES_NEW)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L206)REQUIRES\_NEW **REQUIRES\_NEW: requires\_new ### [**](#SUPPORTS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L209)SUPPORTS **SUPPORTS: supports --- # Source: https://mikro-orm.io/api/core/class/TransactionStateError.md # TransactionStateError ### Hierarchy * [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md) * *TransactionStateError* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**entity](#entity) * [**message](#message) * [**name](#name) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**getEntity](#getEntity) * [**cannotCommit](#cannotCommit) * [**cannotModifyInverseCollection](#cannotModifyInverseCollection) * [**cannotModifyReadonlyCollection](#cannotModifyReadonlyCollection) * [**cannotRemoveFromCollectionWithoutOrphanRemoval](#cannotRemoveFromCollectionWithoutOrphanRemoval) * [**cannotUseGlobalContext](#cannotUseGlobalContext) * [**cannotUseGroupOperatorsInsideScalars](#cannotUseGroupOperatorsInsideScalars) * [**cannotUseOperatorsInsideEmbeddables](#cannotUseOperatorsInsideEmbeddables) * [**captureStackTrace](#captureStackTrace) * [**entityNotManaged](#entityNotManaged) * [**fromCollectionNotInitialized](#fromCollectionNotInitialized) * [**fromMergeWithoutPK](#fromMergeWithoutPK) * [**fromWrongPropertyType](#fromWrongPropertyType) * [**fromWrongRepositoryType](#fromWrongRepositoryType) * [**invalidCompositeIdentifier](#invalidCompositeIdentifier) * [**invalidEmbeddableQuery](#invalidEmbeddableQuery) * [**invalidPropagation](#invalidPropagation) * [**invalidPropertyName](#invalidPropertyName) * [**invalidType](#invalidType) * [**notDiscoveredEntity](#notDiscoveredEntity) * [**notEntity](#notEntity) * [**prepareStackTrace](#prepareStackTrace) * [**propertyRequired](#propertyRequired) * [**requiredTransactionNotFound](#requiredTransactionNotFound) * [**transactionNotAllowed](#transactionNotAllowed) * [**transactionRequired](#transactionRequired) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)constructor * ****new TransactionStateError**(message, entity): [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) - Inherited from ValidationError.constructor #### Parameters * ##### message: string * ##### optionalentity: Partial\ #### Returns [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ValidationError.cause ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)optionalreadonlyinheritedentity **entity? : Partial\ Inherited from ValidationError.entity ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ValidationError.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ValidationError.name ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ValidationError.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ValidationError.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L17)inheritedgetEntity * ****getEntity**(): undefined | Partial\ - Inherited from ValidationError.getEntity Gets instance of entity that caused this error. *** #### Returns undefined | Partial\ ### [**](#cannotCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L116)staticinheritedcannotCommit * ****cannotCommit**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotCommit #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyInverseCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L90)staticinheritedcannotModifyInverseCollection * ****cannotModifyInverseCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyInverseCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyReadonlyCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L99)staticinheritedcannotModifyReadonlyCollection * ****cannotModifyReadonlyCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotModifyReadonlyCollection #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotRemoveFromCollectionWithoutOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L103)staticinheritedcannotRemoveFromCollectionWithoutOrphanRemoval * ****cannotRemoveFromCollectionWithoutOrphanRemoval**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotRemoveFromCollectionWithoutOrphanRemoval #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L120)staticinheritedcannotUseGlobalContext * ****cannotUseGlobalContext**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGlobalContext #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGroupOperatorsInsideScalars)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L128)staticinheritedcannotUseGroupOperatorsInsideScalars * ****cannotUseGroupOperatorsInsideScalars**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseGroupOperatorsInsideScalars #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseOperatorsInsideEmbeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L124)staticinheritedcannotUseOperatorsInsideEmbeddables * ****cannotUseOperatorsInsideEmbeddables**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.cannotUseOperatorsInsideEmbeddables #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ValidationError.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#entityNotManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L49)staticinheritedentityNotManaged * ****entityNotManaged**(entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.entityNotManaged #### Parameters * ##### entity: Partial\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromCollectionNotInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L34)staticinheritedfromCollectionNotInitialized * ****fromCollectionNotInitialized**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromCollectionNotInitialized #### Parameters * ##### entity: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromMergeWithoutPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L41)staticinheritedfromMergeWithoutPK * ****fromMergeWithoutPK**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromMergeWithoutPK #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongPropertyType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L21)staticinheritedfromWrongPropertyType * ****fromWrongPropertyType**(entity, property, expectedType, givenType, givenValue): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongPropertyType #### Parameters * ##### entity: Partial\ * ##### property: string * ##### expectedType: string * ##### givenType: string * ##### givenValue: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L28)staticinheritedfromWrongRepositoryType * ****fromWrongRepositoryType**(entityName, repoType, method): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.fromWrongRepositoryType #### Parameters * ##### entityName: string * ##### repoType: string * ##### method: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidCompositeIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L112)staticinheritedinvalidCompositeIdentifier * ****invalidCompositeIdentifier**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidCompositeIdentifier #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidEmbeddableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L132)staticinheritedinvalidEmbeddableQuery * ****invalidEmbeddableQuery**(className, propName, embeddableType): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidEmbeddableQuery #### Parameters * ##### className: string * ##### propName: string * ##### embeddableType: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidPropagation)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L315)staticinvalidPropagation * ****invalidPropagation**(propagation): [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) - #### Parameters * ##### propagation: string #### Returns [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ### [**](#invalidPropertyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L71)staticinheritedinvalidPropertyName * ****invalidPropertyName**(entityName, invalid): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidPropertyName #### Parameters * ##### entityName: string * ##### invalid: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L75)staticinheritedinvalidType * ****invalidType**(type, value, mode): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.invalidType #### Parameters * ##### type: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ * ##### value: any * ##### mode: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notDiscoveredEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L58)staticinheritednotDiscoveredEntity * ****notDiscoveredEntity**(data, meta, action): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notDiscoveredEntity #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### action: string = 'persist' #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L53)staticinheritednotEntity * ****notEntity**(owner, prop, data): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.notEntity #### Parameters * ##### owner: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### data: any #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ValidationError.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any ### [**](#propertyRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L85)staticinheritedpropertyRequired * ****propertyRequired**(entity, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.propertyRequired #### Parameters * ##### entity: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#requiredTransactionNotFound)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L307)staticrequiredTransactionNotFound * ****requiredTransactionNotFound**(propagation): [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) - #### Parameters * ##### propagation: string #### Returns [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ### [**](#transactionNotAllowed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L311)statictransactionNotAllowed * ****transactionNotAllowed**(propagation): [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) - #### Parameters * ##### propagation: string #### Returns [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ### [**](#transactionRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L45)staticinheritedtransactionRequired * ****transactionRequired**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - Inherited from ValidationError.transactionRequired #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> --- # Source: https://mikro-orm.io/api/core/function/Transactional.md # Transactional ### Callable * ****Transactional**\(options): MethodDecorator *** * This decorator wraps the method with `em.transactional()`, so you can provide `TransactionOptions` just like with `em.transactional()`. The difference is that you can specify the context in which the transaction begins by providing `context` option, and if omitted, the transaction will begin in the current context implicitly. It works on async functions and can be nested with `em.transactional()`. *** #### Parameters * ##### options: TransactionalOptions\ = {} #### Returns MethodDecorator --- # Source: https://mikro-orm.io/api/core/interface/TransformContext.md # TransformContext ## Index[**](#Index) ### Properties * [**force](#force) * [**fromQuery](#fromQuery) * [**key](#key) * [**mode](#mode) ## Properties[**](#Properties) ### [**](#force)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L7)optionalforce **force? : boolean ### [**](#fromQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L6)optionalfromQuery **fromQuery? : boolean ### [**](#key)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L8)optionalkey **key? : string ### [**](#mode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L9)optionalmode **mode? : discovery | serialization | query | hydration | query-data --- # Source: https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md # TruncateQueryBuilder \ ### Hierarchy * [RunQueryBuilder](https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md)\ * *TruncateQueryBuilder* ## Index[**](#Index) ### Properties * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResultAndCount](#getResultAndCount) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias **alias: string Inherited from RunQueryBuilder.alias ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper **helper: QueryBuilderHelper Inherited from RunQueryBuilder.helper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias **mainAlias: [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ Inherited from RunQueryBuilder.mainAlias ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from RunQueryBuilder.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from RunQueryBuilder.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from RunQueryBuilder.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from RunQueryBuilder.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from RunQueryBuilder.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from RunQueryBuilder.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from RunQueryBuilder.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from RunQueryBuilder.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2014)inheritedexecute * ****execute**\(method, mapResults): Promise\ - Inherited from RunQueryBuilder.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from RunQueryBuilder.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from RunQueryBuilder.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from RunQueryBuilder.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from RunQueryBuilder.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from RunQueryBuilder.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[T\[], number]> - Inherited from RunQueryBuilder.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[T\[], number]> ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from RunQueryBuilder.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from RunQueryBuilder.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from RunQueryBuilder.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from RunQueryBuilder.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from RunQueryBuilder.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from RunQueryBuilder.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from RunQueryBuilder.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from RunQueryBuilder.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from RunQueryBuilder.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from RunQueryBuilder.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from RunQueryBuilder.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2015)inheritedthen * ****then**\(onfulfilled, onrejected): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from RunQueryBuilder.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from RunQueryBuilder.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from RunQueryBuilder.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from RunQueryBuilder.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from RunQueryBuilder.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2013)inheritedwhere * ****where**(cond, params, operator): this - Inherited from RunQueryBuilder.where #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionalparams: any\[] | $and | $or * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from RunQueryBuilder.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from RunQueryBuilder.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md # TsMorphMetadataProvider ### Hierarchy * [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) * *TsMorphMetadataProvider* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**getExistingSourceFile](#getExistingSourceFile) * [**loadEntityMetadata](#loadEntityMetadata) * [**loadFromCache](#loadFromCache) * [**useCache](#useCache) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L13)constructor * ****new TsMorphMetadataProvider**(config): [TsMorphMetadataProvider](https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md) - Inherited from MetadataProvider.constructor #### Parameters * ##### config: [IConfiguration](https://mikro-orm.io/api/core/interface/IConfiguration.md) #### Returns [TsMorphMetadataProvider](https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md) ## Methods[**](#Methods) ### [**](#getExistingSourceFile)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/reflection/src/TsMorphMetadataProvider.ts#L30)getExistingSourceFile * ****getExistingSourceFile**(path, ext, validate): SourceFile - #### Parameters * ##### path: string * ##### optionalext: string * ##### validate: boolean = true #### Returns SourceFile ### [**](#loadEntityMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/reflection/src/TsMorphMetadataProvider.ts#L22)loadEntityMetadata * ****loadEntityMetadata**(meta, name): void - Overrides MetadataProvider.loadEntityMetadata #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### name: string #### Returns void ### [**](#loadFromCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L17)inheritedloadFromCache * ****loadFromCache**(meta, cache): void - Inherited from MetadataProvider.loadFromCache #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### cache: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns void ### [**](#useCache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/reflection/src/TsMorphMetadataProvider.ts#L18)useCache * ****useCache**(): boolean - Overrides MetadataProvider.useCache #### Returns boolean --- # Source: https://mikro-orm.io/api/core/class/Type.md # abstractType \ ### Hierarchy * *Type* * [DateType](https://mikro-orm.io/api/core/class/DateType.md) * [TimeType](https://mikro-orm.io/api/core/class/TimeType.md) * [DateTimeType](https://mikro-orm.io/api/core/class/DateTimeType.md) * [BigIntType](https://mikro-orm.io/api/core/class/BigIntType.md) * [Uint8ArrayType](https://mikro-orm.io/api/core/class/Uint8ArrayType.md) * [ArrayType](https://mikro-orm.io/api/core/class/ArrayType.md) * [EnumType](https://mikro-orm.io/api/core/class/EnumType.md) * [JsonType](https://mikro-orm.io/api/core/class/JsonType.md) * [IntegerType](https://mikro-orm.io/api/core/class/IntegerType.md) * [SmallIntType](https://mikro-orm.io/api/core/class/SmallIntType.md) * [TinyIntType](https://mikro-orm.io/api/core/class/TinyIntType.md) * [FloatType](https://mikro-orm.io/api/core/class/FloatType.md) * [DoubleType](https://mikro-orm.io/api/core/class/DoubleType.md) * [BooleanType](https://mikro-orm.io/api/core/class/BooleanType.md) * [DecimalType](https://mikro-orm.io/api/core/class/DecimalType.md) * [StringType](https://mikro-orm.io/api/core/class/StringType.md) * [UuidType](https://mikro-orm.io/api/core/class/UuidType.md) * [TextType](https://mikro-orm.io/api/core/class/TextType.md) * [UnknownType](https://mikro-orm.io/api/core/class/UnknownType.md) * [IntervalType](https://mikro-orm.io/api/core/class/IntervalType.md) * [FullTextType](https://mikro-orm.io/api/postgresql/class/FullTextType.md) * [UnicodeStringType](https://mikro-orm.io/api/mssql/class/UnicodeStringType.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new Type**\(): [Type](https://mikro-orm.io/api/core/class/Type.md)\ - #### Returns [Type](https://mikro-orm.io/api/core/class/Type.md)\ ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)name * **get name(): string - #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)runtimeType * **get runtimeType(): string - #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L54)compareAsType * ****compareAsType**(): string - How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalcompareValues * ****compareValues**(a, b): boolean - Allows to override the internal comparison logic. *** #### Parameters * ##### a: DBType * ##### b: DBType #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)convertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): DBType - Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: JSType * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns DBType ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)convertToJSValue * ****convertToJSValue**(value, platform, context): JSType - Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: DBType * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns JSType ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)ensureComparable * ****ensureComparable**\(meta, prop): boolean - When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L92)getColumnType * ****getColumnType**(prop, platform): string - Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalgetDefaultLength * ****getDefaultLength**(platform): number - Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)toJSON * ****toJSON**(value, platform): JSType | DBType - Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: JSType * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns JSType | DBType ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticgetType * ****getType**\(cls): InstanceType\ - #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/TypeConfig.md # TypeConfig ## Index[**](#Index) ### Properties * [**forceObject](#forceObject) ## Properties[**](#Properties) ### [**](#forceObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L120)optionalforceObject **forceObject? : boolean --- # Source: https://mikro-orm.io/api/core/class/Uint8ArrayType.md # Uint8ArrayType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *Uint8ArrayType* * [BlobType](https://mikro-orm.io/api/core/class/BlobType.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new Uint8ArrayType**(): [Uint8ArrayType](https://mikro-orm.io/api/core/class/Uint8ArrayType.md) - Inherited from Type.constructor #### Returns [Uint8ArrayType](https://mikro-orm.io/api/core/class/Uint8ArrayType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Uint8ArrayType.ts#L34)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | Uint8Array\ * ##### b: null | Uint8Array\ #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Uint8ArrayType.ts#L7)convertToDatabaseValue * ****convertToDatabaseValue**(value): Buffer\ - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: Uint8Array\ #### Returns Buffer\ ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Uint8ArrayType.ts#L15)convertToJSValue * ****convertToJSValue**(value): null | Uint8Array\ - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: Buffer\ #### Returns null | Uint8Array\ ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Uint8ArrayType.ts#L38)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Uint8ArrayType.ts#L42)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): null | Uint8Array\ - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: null | Uint8Array\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns null | Uint8Array\ ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/UnderscoreNamingStrategy.md # UnderscoreNamingStrategy ### Hierarchy * [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) * *UnderscoreNamingStrategy* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**aliasName](#aliasName) * [**classToMigrationName](#classToMigrationName) * [**classToTableName](#classToTableName) * [**columnNameToProperty](#columnNameToProperty) * [**enumValueToEnumProperty](#enumValueToEnumProperty) * [**getClassName](#getClassName) * [**getEntityName](#getEntityName) * [**getEnumClassName](#getEnumClassName) * [**getEnumTypeName](#getEnumTypeName) * [**indexName](#indexName) * [**inverseSideName](#inverseSideName) * [**joinColumnName](#joinColumnName) * [**joinKeyColumnName](#joinKeyColumnName) * [**joinTableName](#joinTableName) * [**propertyToColumnName](#propertyToColumnName) * [**referenceColumnName](#referenceColumnName) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new UnderscoreNamingStrategy**(): [UnderscoreNamingStrategy](https://mikro-orm.io/api/core/class/UnderscoreNamingStrategy.md) - Inherited from AbstractNamingStrategy.constructor #### Returns [UnderscoreNamingStrategy](https://mikro-orm.io/api/core/class/UnderscoreNamingStrategy.md) ## Methods[**](#Methods) ### [**](#aliasName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L85)inheritedaliasName * ****aliasName**(entityName, index): string - Inherited from AbstractNamingStrategy.aliasName Returns alias name for given entity. The alias needs to be unique across the query, which is by default ensured via appended index parameter. It is optional to use it as long as you ensure it will be unique. *** #### Parameters * ##### entityName: string * ##### index: number #### Returns string ### [**](#classToMigrationName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L15)inheritedclassToMigrationName * ****classToMigrationName**(timestamp, customMigrationName): string - Inherited from AbstractNamingStrategy.classToMigrationName Return a migration name. This name should allow ordering. *** #### Parameters * ##### timestamp: string * ##### optionalcustomMigrationName: string #### Returns string ### [**](#classToTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L5)classToTableName * ****classToTableName**(entityName): string - Overrides AbstractNamingStrategy.classToTableName Return a table name for an entity class *** #### Parameters * ##### entityName: string #### Returns string ### [**](#columnNameToProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L56)inheritedcolumnNameToProperty * ****columnNameToProperty**(columnName): string - Inherited from AbstractNamingStrategy.columnNameToProperty Return a property for a column name (used in `EntityGenerator`). *** #### Parameters * ##### columnName: string #### Returns string ### [**](#enumValueToEnumProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L81)inheritedenumValueToEnumProperty * ****enumValueToEnumProperty**(enumValue, columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.enumValueToEnumProperty Get an enum option name for a given enum value. *** #### Parameters * ##### enumValue: string The enum value to generate a name for. * ##### columnName: string The column name which has the enum. * ##### tableName: string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string The name of the enum property that will hold the value. ### [**](#getClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L8)inheritedgetClassName * ****getClassName**(file, separator): string - Inherited from AbstractNamingStrategy.getClassName Return a name of the class based on its file name *** #### Parameters * ##### file: string * ##### separator: string = '-' #### Returns string ### [**](#getEntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L51)inheritedgetEntityName * ****getEntityName**(tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEntityName Return a name of the entity class based on database table name (used in `EntityGenerator`). Default implementation ignores the schema name. *** #### Parameters * ##### tableName: string * ##### optionalschemaName: string #### Returns string ### [**](#getEnumClassName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L67)inheritedgetEnumClassName * ****getEnumClassName**(columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEnumClassName Get an enum class name. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new class name that will be used for the enum. ### [**](#getEnumTypeName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L74)inheritedgetEnumTypeName * ****getEnumTypeName**(columnName, tableName, schemaName): string - Inherited from AbstractNamingStrategy.getEnumTypeName Get an enum type name. Used with `enumType: 'dictionary'` and `enumType: 'union-type'` entity generator option. *** #### Parameters * ##### columnName: string The column name which has the enum. * ##### tableName: undefined | string The table name of the column. * ##### optionalschemaName: string The schema name of the column. #### Returns string A new type name that will be used for the enum. ### [**](#indexName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L25)inheritedindexName * ****indexName**(tableName, columns, type): string - Inherited from AbstractNamingStrategy.indexName Returns key/constraint name for the given type. Some drivers might not support all the types (e.g. mysql and sqlite enforce the PK name). *** #### Parameters * ##### tableName: string * ##### columns: string\[] * ##### type: primary | index | unique | check | foreign | sequence #### Returns string ### [**](#inverseSideName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L93)inheritedinverseSideName * ****inverseSideName**(entityName, propertyName, kind): string - Inherited from AbstractNamingStrategy.inverseSideName Returns the name of the inverse side property. Used in the `EntityGenerator` with `bidirectionalRelations` option. *** #### Parameters * ##### entityName: string * ##### propertyName: string * ##### kind: [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) #### Returns string ### [**](#joinColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L9)joinColumnName * ****joinColumnName**(propertyName): string - Overrides AbstractNamingStrategy.joinColumnName Return a join column name for a property *** #### Parameters * ##### propertyName: string #### Returns string ### [**](#joinKeyColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L13)joinKeyColumnName * ****joinKeyColumnName**(entityName, referencedColumnName): string - Overrides AbstractNamingStrategy.joinKeyColumnName Return the foreign key column name for the given parameters *** #### Parameters * ##### entityName: string * ##### optionalreferencedColumnName: string #### Returns string ### [**](#joinTableName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L17)joinTableName * ****joinTableName**(sourceEntity, targetEntity, propertyName): string - Overrides AbstractNamingStrategy.joinTableName Return a join table name *** #### Parameters * ##### sourceEntity: string * ##### targetEntity: string * ##### propertyName: string #### Returns string ### [**](#propertyToColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L21)propertyToColumnName * ****propertyToColumnName**(propertyName, object): string - Overrides AbstractNamingStrategy.propertyToColumnName Return a column name for a property *** #### Parameters * ##### propertyName: string * ##### optionalobject: boolean #### Returns string ### [**](#referenceColumnName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L25)referenceColumnName * ****referenceColumnName**(): string - Overrides AbstractNamingStrategy.referenceColumnName Return the default reference column name *** #### Returns string --- # Source: https://mikro-orm.io/api/mssql/class/UnicodeString.md # UnicodeString ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**value](#value) ### Methods * [**\[toPrimitive\]](#\[toPrimitive]) * [**toJSON](#toJSON) * [**toString](#toString) * [**valueOf](#valueOf) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L5)constructor * ****new UnicodeString**(value): [UnicodeString](https://mikro-orm.io/api/mssql/class/UnicodeString.md) - #### Parameters * ##### value: string #### Returns [UnicodeString](https://mikro-orm.io/api/mssql/class/UnicodeString.md) ## Properties[**](#Properties) ### [**](#value)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L6)readonlyvalue **value: string ## Methods[**](#Methods) ### [**](#\[toPrimitive])[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L21)\[toPrimitive] * ****\[toPrimitive]**(): string - #### Returns string ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L17)toJSON * ****toJSON**(): string - #### Returns string ### [**](#toString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L13)toString * ****toString**(): string - #### Returns string ### [**](#valueOf)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L9)valueOf * ****valueOf**(): string - #### Returns string --- # Source: https://mikro-orm.io/api/mssql/class/UnicodeStringType.md # UnicodeStringType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *UnicodeStringType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new UnicodeStringType**(): [UnicodeStringType](https://mikro-orm.io/api/mssql/class/UnicodeStringType.md) - Inherited from Type.constructor #### Returns [UnicodeStringType](https://mikro-orm.io/api/mssql/class/UnicodeStringType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L51)runtimeType * **get runtimeType(): string - Overrides Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L54)inheritedcompareAsType * ****compareAsType**(): string - Inherited from Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: null | string * ##### b: null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L43)convertToDatabaseValue * ****convertToDatabaseValue**(value): null | string - Overrides Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: null | string #### Returns null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L34)convertToJSValue * ****convertToJSValue**(value): null | string - Overrides Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: null | string | [UnicodeString](https://mikro-orm.io/api/mssql/class/UnicodeString.md) #### Returns null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L77)inheritedensureComparable * ****ensureComparable**\(meta, prop): boolean - Inherited from Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L29)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: { length?: number } * * ##### optionallength: number ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L59)getDefaultLength * ****getDefaultLength**(platform): number - Overrides Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/mssql/src/UnicodeStringType.ts#L55)toJSON * ****toJSON**(value): null | string - Overrides Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: null | string | [UnicodeString](https://mikro-orm.io/api/mssql/class/UnicodeString.md) #### Returns null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/function/Unique.md # Unique ### Callable * ****Unique**\(options): (target, propertyName) => any *** * #### Parameters * ##### options: [UniqueOptions](https://mikro-orm.io/api/core/interface/UniqueOptions.md)\ = {} #### Returns (target, propertyName) => any * * **(target, propertyName): any - #### Parameters * ##### target: T * ##### optionalpropertyName: T extends [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ ? undefined : keyof T #### Returns any --- # Source: https://mikro-orm.io/api/core/class/UniqueConstraintViolationException.md # UniqueConstraintViolationException Exception for a unique constraint violation detected in the driver. ### Hierarchy * [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) * *UniqueConstraintViolationException* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**code](#code) * [**errmsg](#errmsg) * [**errno](#errno) * [**message](#message) * [**name](#name) * [**sqlMessage](#sqlMessage) * [**sqlState](#sqlState) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**captureStackTrace](#captureStackTrace) * [**prepareStackTrace](#prepareStackTrace) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L14)constructor * ****new UniqueConstraintViolationException**(previous): [UniqueConstraintViolationException](https://mikro-orm.io/api/core/class/UniqueConstraintViolationException.md) - Inherited from ConstraintViolationException.constructor #### Parameters * ##### previous: Error #### Returns [UniqueConstraintViolationException](https://mikro-orm.io/api/core/class/UniqueConstraintViolationException.md) ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from ConstraintViolationException.cause ### [**](#code)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L8)optionalinheritedcode **code? : string Inherited from ConstraintViolationException.code ### [**](#errmsg)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L12)optionalinheritederrmsg **errmsg? : string Inherited from ConstraintViolationException.errmsg ### [**](#errno)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L9)optionalinheritederrno **errno? : number Inherited from ConstraintViolationException.errno ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from ConstraintViolationException.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from ConstraintViolationException.name ### [**](#sqlMessage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L11)optionalinheritedsqlMessage **sqlMessage? : string Inherited from ConstraintViolationException.sqlMessage ### [**](#sqlState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L10)optionalinheritedsqlState **sqlState? : string Inherited from ConstraintViolationException.sqlState ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from ConstraintViolationException.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from ConstraintViolationException.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from ConstraintViolationException.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from ConstraintViolationException.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any --- # Source: https://mikro-orm.io/api/core/interface/UniqueOptions.md # UniqueOptions \ ### Hierarchy * BaseOptions\ * *UniqueOptions* ## Index[**](#Index) ### Properties * [**deferMode](#deferMode) * [**expression](#expression) * [**name](#name) * [**options](#options) * [**properties](#properties) ## Properties[**](#Properties) ### [**](#deferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L39)optionaldeferMode **deferMode? : [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) | immediate | deferred ### [**](#expression)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L35)optionalinheritedexpression **expression? : string | (T extends [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\

? [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback)\

: [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback)\) Inherited from BaseOptions.expression ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L32)optionalinheritedname **name? : string Inherited from BaseOptions.name ### [**](#options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L34)optionalinheritedoptions **options? : [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) Inherited from BaseOptions.options ### [**](#properties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L33)optionalinheritedproperties **properties? : T extends [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\

? Properties\ : Properties\ Inherited from BaseOptions.properties --- # Source: https://mikro-orm.io/api/core/class/UnitOfWork.md # UnitOfWork ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Methods * [**cancelOrphanRemoval](#cancelOrphanRemoval) * [**clear](#clear) * [**clearActionsQueue](#clearActionsQueue) * [**commit](#commit) * [**computeChangeSet](#computeChangeSet) * [**computeChangeSets](#computeChangeSets) * [**getById](#getById) * [**getChangeSetPersister](#getChangeSetPersister) * [**getChangeSets](#getChangeSets) * [**getCollectionUpdates](#getCollectionUpdates) * [**getExtraUpdates](#getExtraUpdates) * [**getIdentityMap](#getIdentityMap) * [**getOriginalEntityData](#getOriginalEntityData) * [**getOrphanRemoveStack](#getOrphanRemoveStack) * [**getPersistStack](#getPersistStack) * [**getRemoveStack](#getRemoveStack) * [**lock](#lock) * [**merge](#merge) * [**persist](#persist) * [**recomputeSingleChangeSet](#recomputeSingleChangeSet) * [**remove](#remove) * [**scheduleExtraUpdate](#scheduleExtraUpdate) * [**scheduleOrphanRemoval](#scheduleOrphanRemoval) * [**shouldAutoFlush](#shouldAutoFlush) * [**tryGetById](#tryGetById) * [**unsetIdentity](#unsetIdentity) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L54)constructor * ****new UnitOfWork**(em): [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) - #### Parameters * ##### em: [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> #### Returns [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) ## Methods[**](#Methods) ### [**](#cancelOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L623)cancelOrphanRemoval * ****cancelOrphanRemoval**(entity, visited): void - #### Parameters * ##### entity: Partial\ * ##### optionalvisited: Set\> #### Returns void ### [**](#clear)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L475)clear * ****clear**(): void - #### Returns void ### [**](#clearActionsQueue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L286)clearActionsQueue * ****clearActionsQueue**(): void - #### Returns void ### [**](#commit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L385)commit * ****commit**(): Promise\ - #### Returns Promise\ ### [**](#computeChangeSet)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L290)computeChangeSet * ****computeChangeSet**\(entity, type): void - #### Parameters * ##### entity: T * ##### optionaltype: [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md) #### Returns void ### [**](#computeChangeSets)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L509)computeChangeSets * ****computeChangeSets**(): void - #### Returns void ### [**](#getById)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L186)getById * ****getById**\(entityName, id, schema, convertCustomTypes): undefined | T - Returns entity from the identity map. For composite keys, you need to pass an array of PKs in the same order as they are defined in `meta.primaryKeys`. *** #### Parameters * ##### entityName: string * ##### id: (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T) | (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T)\[] * ##### optionalschema: string * ##### optionalconvertCustomTypes: boolean #### Returns undefined | T ### [**](#getChangeSetPersister)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L632)getChangeSetPersister * ****getChangeSetPersister**(): [ChangeSetPersister](https://mikro-orm.io/api/core/class/ChangeSetPersister.md) - #### Returns [ChangeSetPersister](https://mikro-orm.io/api/core/class/ChangeSetPersister.md) ### [**](#getChangeSets)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L252)getChangeSets * ****getChangeSets**(): [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\>\[] - #### Returns [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\>\[] ### [**](#getCollectionUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L256)getCollectionUpdates * ****getCollectionUpdates**(): [Collection](https://mikro-orm.io/api/core/class/Collection.md)\, object>\[] - #### Returns [Collection](https://mikro-orm.io/api/core/class/Collection.md)\, object>\[] ### [**](#getExtraUpdates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L260)getExtraUpdates * ****getExtraUpdates**(): Set<\[Partial\, string | string\[], [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Partial\ | [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ | Partial\\[], undefined | [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\, [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md)]> - #### Returns Set<\[Partial\, string | string\[], [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ | Partial\ | [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ | Partial\\[], undefined | [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\, [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md)]> ### [**](#getIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L233)getIdentityMap * ****getIdentityMap**(): [IdentityMap](https://mikro-orm.io/api/core/class/IdentityMap.md) - Returns map of all managed entities. *** #### Returns [IdentityMap](https://mikro-orm.io/api/core/class/IdentityMap.md) ### [**](#getOriginalEntityData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L240)getOriginalEntityData * ****getOriginalEntityData**\(entity): undefined | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ - Returns stored snapshot of entity state that is used for change set computation. *** #### Parameters * ##### entity: T #### Returns undefined | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ ### [**](#getOrphanRemoveStack)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L628)getOrphanRemoveStack * ****getOrphanRemoveStack**(): Set\> - #### Returns Set\> ### [**](#getPersistStack)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L244)getPersistStack * ****getPersistStack**(): Set\> - #### Returns Set\> ### [**](#getRemoveStack)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L248)getRemoveStack * ****getRemoveStack**(): Set\> - #### Returns Set\> ### [**](#lock)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L461)lock * ****lock**\(entity, options): Promise\ - #### Parameters * ##### entity: T * ##### options: [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) #### Returns Promise\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L64)merge * ****merge**\(entity, visited): void - #### Parameters * ##### entity: T * ##### optionalvisited: Set\> #### Returns void ### [**](#persist)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L328)persist * ****persist**\(entity, visited, options): void - #### Parameters * ##### entity: T * ##### optionalvisited: Set\> * ##### options: { cascade?: boolean; checkRemoveStack?: boolean } = {} * ##### optionalcascade: boolean * ##### optionalcheckRemoveStack: boolean #### Returns void ### [**](#recomputeSingleChangeSet)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L311)recomputeSingleChangeSet * ****recomputeSingleChangeSet**\(entity): void - #### Parameters * ##### entity: T #### Returns void ### [**](#remove)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L349)remove * ****remove**\(entity, visited, options): void - #### Parameters * ##### entity: T * ##### optionalvisited: Set\> * ##### options: { cascade?: boolean } = {} * ##### optionalcascade: boolean #### Returns void ### [**](#scheduleExtraUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L578)scheduleExtraUpdate * ****scheduleExtraUpdate**\(changeSet, props): void - #### Parameters * ##### changeSet: [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md)\ * ##### props: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\\[] #### Returns void ### [**](#scheduleOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L614)scheduleOrphanRemoval * ****scheduleOrphanRemoval**(entity, visited): void - #### Parameters * ##### optionalentity: Partial\ * ##### optionalvisited: Set\> #### Returns void ### [**](#shouldAutoFlush)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L264)shouldAutoFlush * ****shouldAutoFlush**\(meta): boolean - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns boolean ### [**](#tryGetById)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L220)tryGetById * ****tryGetById**\(entityName, where, schema, strict): null | T - #### Parameters * ##### entityName: string * ##### where: [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery)\ * ##### optionalschema: string * ##### strict: boolean = true #### Returns null | T ### [**](#unsetIdentity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L481)unsetIdentity * ****unsetIdentity**(entity): void - #### Parameters * ##### entity: Partial\ #### Returns void --- # Source: https://mikro-orm.io/api/core/class/UnknownType.md # UnknownType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *UnknownType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new UnknownType**(): [UnknownType](https://mikro-orm.io/api/core/class/UnknownType.md) - Inherited from Type.constructor #### Returns [UnknownType](https://mikro-orm.io/api/core/class/UnknownType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UnknownType.ts#L11)runtimeType * **get runtimeType(): string - Overrides Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UnknownType.ts#L15)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: unknown * ##### b: unknown #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): unknown - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: unknown * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): unknown - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: unknown * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns unknown ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UnknownType.ts#L19)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UnknownType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): unknown - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: unknown * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns unknown ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/interface/UpdateOptions.md # UpdateOptions \ ## Index[**](#Index) ### Properties * [**ctx](#ctx) * [**filters](#filters) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L270)optionalctx **ctx? : any ### [**](#filters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L268)optionalfilters **filters? : [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L269)optionalschema **schema? : string --- # Source: https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md # UpdateQueryBuilder \ ### Hierarchy * [RunQueryBuilder](https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md)\ * *UpdateQueryBuilder* ## Index[**](#Index) ### Properties * [**alias](#alias) * [**helper](#helper) * [**mainAlias](#mainAlias) ### Methods * [**addSelect](#addSelect) * [**andHaving](#andHaving) * [**andWhere](#andWhere) * [**applyFilters](#applyFilters) * [**as](#as) * [**cache](#cache) * [**clone](#clone) * [**comment](#comment) * [**count](#count) * [**delete](#delete) * [**distinct](#distinct) * [**distinctOn](#distinctOn) * [**execute](#execute) * [**from](#from) * [**getCount](#getCount) * [**getFormattedQuery](#getFormattedQuery) * [**getKnex](#getKnex) * [**getKnexQuery](#getKnexQuery) * [**getLoggerContext](#getLoggerContext) * [**getParams](#getParams) * [**getQuery](#getQuery) * [**getResultAndCount](#getResultAndCount) * [**groupBy](#groupBy) * [**hasFlag](#hasFlag) * [**having](#having) * [**hintComment](#hintComment) * [**ignore](#ignore) * [**indexHint](#indexHint) * [**innerJoin](#innerJoin) * [**innerJoinAndSelect](#innerJoinAndSelect) * [**innerJoinLateral](#innerJoinLateral) * [**innerJoinLateralAndSelect](#innerJoinLateralAndSelect) * [**insert](#insert) * [**join](#join) * [**joinAndSelect](#joinAndSelect) * [**leftJoin](#leftJoin) * [**leftJoinAndSelect](#leftJoinAndSelect) * [**leftJoinLateral](#leftJoinLateral) * [**leftJoinLateralAndSelect](#leftJoinLateralAndSelect) * [**limit](#limit) * [**merge](#merge) * [**offset](#offset) * [**onConflict](#onConflict) * [**orderBy](#orderBy) * [**orHaving](#orHaving) * [**orWhere](#orWhere) * [**returning](#returning) * [**select](#select) * [**setFlag](#setFlag) * [**setFlushMode](#setFlushMode) * [**setLockMode](#setLockMode) * [**setLoggerContext](#setLoggerContext) * [**then](#then) * [**toQuery](#toQuery) * [**truncate](#truncate) * [**unsetFlag](#unsetFlag) * [**update](#update) * [**where](#where) * [**withSchema](#withSchema) * [**withSubQuery](#withSubQuery) ## Properties[**](#Properties) ### [**](#alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L150)inheritedalias **alias: string Inherited from RunQueryBuilder.alias ### [**](#helper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L154)inheritedhelper **helper: QueryBuilderHelper Inherited from RunQueryBuilder.helper ### [**](#mainAlias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L145)inheritedmainAlias **mainAlias: [Alias](https://mikro-orm.io/api/knex/interface/Alias.md)\ Inherited from RunQueryBuilder.mainAlias ## Methods[**](#Methods) ### [**](#addSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L245)inheritedaddSelect * ****addSelect**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.addSelect #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L643)inheritedandHaving * ****andHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.andHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#andWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L585)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L586)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L587)inheritedandWhere * ****andWhere**(cond): this * ****andWhere**(cond, params): this - Inherited from RunQueryBuilder.andWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#applyFilters)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L475)inheritedapplyFilters * ****applyFilters**(filterOptions): Promise\ - Inherited from RunQueryBuilder.applyFilters Apply filters to the QB where condition. *** #### Parameters * ##### filterOptions: [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) = {} #### Returns Promise\ ### [**](#as)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1161)inheritedas * ****as**(alias): QueryBuilder\ - Inherited from RunQueryBuilder.as Returns knex instance with sub-query aliased with given alias. You can provide `EntityName.propName` as alias, then the field name will be used based on the metadata *** #### Parameters * ##### alias: string #### Returns QueryBuilder\ ### [**](#cache)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L769)inheritedcache * ****cache**(config): this - Inherited from RunQueryBuilder.cache #### Parameters * ##### config: number | boolean | \[string, number] = true #### Returns this ### [**](#clone)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1179)inheritedclone * ****clone**(reset): [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ - Inherited from RunQueryBuilder.clone #### Parameters * ##### optionalreset: boolean | string\[] #### Returns [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ ### [**](#comment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L787)inheritedcomment * ****comment**(comment): this - Inherited from RunQueryBuilder.comment Prepend comment to the sql query using the syntax `/* ... *‍/`. Some characters are forbidden such as `/*, *‍/` and `?`. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#count)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L283)inheritedcount * ****count**(field, distinct): [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ - Inherited from RunQueryBuilder.count #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### distinct: boolean = false #### Returns [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md)\ ### [**](#delete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L275)inheriteddelete * ****delete**(cond): [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ - Inherited from RunQueryBuilder.delete #### Parameters * ##### optionalcond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) #### Returns [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md)\ ### [**](#distinct)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L255)inheriteddistinct * ****distinct**(): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinct #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#distinctOn)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L261)inheriteddistinctOn * ****distinctOn**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.distinctOn postgres only *** #### Parameters * ##### fields: EntityKeyOrString\ | EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#execute)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2014)inheritedexecute * ****execute**\(method, mapResults): Promise\ - Inherited from RunQueryBuilder.execute Executes this QB and returns the raw results, mapped to the property names (unless disabled via last parameter). Use `method` to specify what kind of result you want to get (array/single/meta). *** #### Parameters * ##### optionalmethod: get | all | run * ##### optionalmapResults: boolean #### Returns Promise\ ### [**](#from)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L808)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L809)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L810)inheritedfrom * ****from**\(target, aliasName): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ * ****from**\(target): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.from Specifies FROM which entity's table select/update/delete will be executed, removing all previously set FROM-s. Allows setting a main string alias of the selection data. *** #### Parameters * ##### target: [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### optionalaliasName: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#getCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1109)inheritedgetCount * ****getCount**(field, distinct): Promise\ - Inherited from RunQueryBuilder.getCount Executes count query (without offset and limit), returning total count of results *** #### Parameters * ##### optionalfield: EntityKeyOrString\ | EntityKeyOrString\\[] * ##### optionaldistinct: boolean #### Returns Promise\ ### [**](#getFormattedQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L911)inheritedgetFormattedQuery * ****getFormattedQuery**(): string - Inherited from RunQueryBuilder.getFormattedQuery Returns raw interpolated query string with all the parameters inlined. *** #### Returns string ### [**](#getKnex)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1219)inheritedgetKnex * ****getKnex**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnex #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getKnexQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L828)inheritedgetKnexQuery * ****getKnexQuery**(processVirtualEntity): QueryBuilder\ - Inherited from RunQueryBuilder.getKnexQuery #### Parameters * ##### processVirtualEntity: boolean = true #### Returns QueryBuilder\ ### [**](#getLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1257)inheritedgetLoggerContext * ****getLoggerContext**\(): T - Inherited from RunQueryBuilder.getLoggerContext Gets logger context for this query builder. *** #### Returns T ### [**](#getParams)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L904)inheritedgetParams * ****getParams**(): readonly Value\[] - Inherited from RunQueryBuilder.getParams Returns the list of all parameters for this query. *** #### Returns readonly Value\[] ### [**](#getQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L882)inheritedgetQuery * ****getQuery**(): string - Inherited from RunQueryBuilder.getQuery Returns the query with parameters as wildcards. *** #### Returns string ### [**](#getResultAndCount)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1127)inheritedgetResultAndCount * ****getResultAndCount**(): Promise<\[T\[], number]> - Inherited from RunQueryBuilder.getResultAndCount Executes the query, returning both array of results and total count query (without offset and limit). *** #### Returns Promise<\[T\[], number]> ### [**](#groupBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L617)inheritedgroupBy * ****groupBy**(fields): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.groupBy #### Parameters * ##### fields: EntityKeyOrString\ | readonly EntityKeyOrString\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hasFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L765)inheritedhasFlag * ****hasFlag**(flag): boolean - Inherited from RunQueryBuilder.hasFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns boolean ### [**](#having)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L624)inheritedhaving * ****having**(cond, params, operator): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.having #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalparams: any\[] * ##### optionaloperator: $and | $or #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#hintComment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L798)inheritedhintComment * ****hintComment**(comment): this - Inherited from RunQueryBuilder.hintComment Add hints to the query using comment-like syntax `/*+ ... *‍/`. MySQL and Oracle use this syntax for optimizer hints. Also various DB proxies and routers use this syntax to pass hints to alter their behavior. In other dialects the hints are ignored as simple comments. *** #### Parameters * ##### comment: string | string\[] #### Returns this ### [**](#ignore)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L667)inheritedignore * ****ignore**(): this - Inherited from RunQueryBuilder.ignore #### Returns this ### [**](#indexHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L778)inheritedindexHint * ****indexHint**(sql): this - Inherited from RunQueryBuilder.indexHint Adds index hint to the FROM clause. *** #### Parameters * ##### sql: string #### Returns this ### [**](#innerJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L311)inheritedinnerJoin * ****innerJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.innerJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#innerJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L401)inheritedinnerJoinAndSelect * ****innerJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#innerJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L321)inheritedinnerJoinLateral * ****innerJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.innerJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#innerJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L411)inheritedinnerJoinLateralAndSelect * ****innerJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.innerJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#insert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L267)inheritedinsert * ****insert**(data): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.insert #### Parameters * ##### data: [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\ | [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData)\\[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#join)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L299)inheritedjoin * ****join**\(field, alias, cond, type, path, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.join #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#joinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L339)inheritedjoinAndSelect * ****joinAndSelect**\(field, alias, cond, type, path, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.joinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### type: [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) = JoinType.innerJoin * ##### optionalpath: string * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoin)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L326)inheritedleftJoin * ****leftJoin**\(field, alias, cond, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> - Inherited from RunQueryBuilder.leftJoin #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ | Field * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, false>\[K] }> ### [**](#leftJoinAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L381)inheritedleftJoinAndSelect * ****leftJoinAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinAndSelect #### Parameters * ##### field: Field | \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#leftJoinLateral)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L335)inheritedleftJoinLateral * ****leftJoinLateral**(field, alias, cond, schema): this - Inherited from RunQueryBuilder.leftJoinLateral #### Parameters * ##### field: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\ * ##### alias: string * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalschema: string #### Returns this ### [**](#leftJoinLateralAndSelect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L391)inheritedleftJoinLateralAndSelect * ****leftJoinLateralAndSelect**\(field, alias, cond, fields, schema): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> - Inherited from RunQueryBuilder.leftJoinLateralAndSelect #### Parameters * ##### field: \[field: Field, qb: QueryBuilder\ | [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md)\] * ##### alias: Alias * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) = {} * ##### optionalfields: string\[] * ##### optionalschema: string #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\, object, Field, Alias, true>\[K] }> ### [**](#limit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L710)inheritedlimit * ****limit**(limit, offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.limit #### Parameters * ##### optionallimit: number * ##### offset: number = 0 #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L676)inheritedmerge * ****merge**(data): this - Inherited from RunQueryBuilder.merge #### Parameters * ##### optionaldata: [Field](https://mikro-orm.io/api/knex.md#Field)\\[] | [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns this ### [**](#offset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L721)inheritedoffset * ****offset**(offset): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.offset #### Parameters * ##### optionaloffset: number #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#onConflict)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L651)inheritedonConflict * ****onConflict**(fields): [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ - Inherited from RunQueryBuilder.onConflict #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] = \[] #### Returns [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md)\ ### [**](#orderBy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L597)inheritedorderBy * ****orderBy**(orderBy): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orderBy #### Parameters * ##### orderBy: [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\ | [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap)\\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orHaving)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L647)inheritedorHaving * ****orHaving**(cond, params): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.orHaving #### Parameters * ##### optionalcond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) * ##### optionalparams: any\[] #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#orWhere)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L591)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L592)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L593)inheritedorWhere * ****orWhere**(cond): this * ****orWhere**(cond, params): this - Inherited from RunQueryBuilder.orWhere #### Parameters * ##### cond: [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ #### Returns this ### [**](#returning)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L689)inheritedreturning * ****returning**(fields): this - Inherited from RunQueryBuilder.returning #### Parameters * ##### optionalfields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] #### Returns this ### [**](#select)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L234)inheritedselect * ****select**(fields, distinct): [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ - Inherited from RunQueryBuilder.select #### Parameters * ##### fields: [Field](https://mikro-orm.io/api/knex.md#Field)\ | [Field](https://mikro-orm.io/api/knex.md#Field)\\[] * ##### distinct: boolean = false #### Returns [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md)\ ### [**](#setFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L753)inheritedsetFlag * ****setFlag**(flag): this - Inherited from RunQueryBuilder.setFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#setFlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L747)inheritedsetFlushMode * ****setFlushMode**(flushMode): this - Inherited from RunQueryBuilder.setFlushMode #### Parameters * ##### optionalflushMode: [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) #### Returns this ### [**](#setLockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L734)inheritedsetLockMode * ****setLockMode**(mode, tables): this - Inherited from RunQueryBuilder.setLockMode #### Parameters * ##### optionalmode: [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) * ##### optionaltables: string\[] #### Returns this ### [**](#setLoggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L1250)inheritedsetLoggerContext * ****setLoggerContext**(context): void - Inherited from RunQueryBuilder.setLoggerContext Sets logger context for this query builder. *** #### Parameters * ##### context: [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) & [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns void ### [**](#then)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2015)inheritedthen * ****then**\(onfulfilled, onrejected): Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> - Inherited from RunQueryBuilder.then Provides promise-like interface so we can await the QB instance. *** #### Parameters * ##### optionalonfulfilled: null | (value) => TResult1 | PromiseLike\ * ##### optionalonrejected: null | (reason) => TResult2 | PromiseLike\ #### Returns Promise<[QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md)\> ### [**](#toQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L886)inheritedtoQuery * ****toQuery**(): { \_sql: Sql; params: readonly unknown\[]; sql: string } - Inherited from RunQueryBuilder.toQuery #### Returns { \_sql: Sql; params: readonly unknown\[]; sql: string } * ##### \_sql: Sql * ##### params: readonly unknown\[] * ##### sql: string ### [**](#truncate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L279)inheritedtruncate * ****truncate**(): [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ - Inherited from RunQueryBuilder.truncate #### Returns [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md)\ ### [**](#unsetFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L759)inheritedunsetFlag * ****unsetFlag**(flag): this - Inherited from RunQueryBuilder.unsetFlag #### Parameters * ##### flag: [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) #### Returns this ### [**](#update)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L271)inheritedupdate * ****update**(data): [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ - Inherited from RunQueryBuilder.update #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ #### Returns [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md)\ ### [**](#where)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2013)inheritedwhere * ****where**(cond, params, operator): this - Inherited from RunQueryBuilder.where #### Parameters * ##### cond: string | [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery)\ * ##### optionalparams: any\[] | $and | $or * ##### optionaloperator: $and | $or #### Returns this ### [**](#withSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L727)inheritedwithSchema * ****withSchema**(schema): this - Inherited from RunQueryBuilder.withSchema #### Parameters * ##### optionalschema: string #### Returns this ### [**](#withSubQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L526)inheritedwithSubQuery * ****withSubQuery**(subQuery, alias): this - Inherited from RunQueryBuilder.withSubQuery #### Parameters * ##### subQuery: QueryBuilder\ * ##### alias: string #### Returns this --- # Source: https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md # UpdateSchemaOptions \ ## Index[**](#Index) ### Properties * [**dropDb](#dropDb) * [**dropTables](#dropTables) * [**fromSchema](#fromSchema) * [**safe](#safe) * [**schema](#schema) * [**wrap](#wrap) ## Properties[**](#Properties) ### [**](#dropDb)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L896)optionaldropDb **dropDb? : boolean ### [**](#dropTables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L897)optionaldropTables **dropTables? : boolean ### [**](#fromSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L899)optionalfromSchema **fromSchema? : DatabaseSchema ### [**](#safe)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L895)optionalsafe **safe? : boolean ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L898)optionalschema **schema? : string ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/typings.ts#L894)optionalwrap **wrap? : boolean --- # Source: https://mikro-orm.io/api/core/interface/UpsertManyOptions.md # UpsertManyOptions \ ### Hierarchy * [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md)\ * *UpsertManyOptions* ## Index[**](#Index) ### Properties * [**batchSize](#batchSize) * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**loggerContext](#loggerContext) * [**onConflictAction](#onConflictAction) * [**onConflictExcludeFields](#onConflictExcludeFields) * [**onConflictFields](#onConflictFields) * [**onConflictMergeFields](#onConflictMergeFields) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#batchSize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L240)optionalbatchSize **batchSize? : number ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L219)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from UpsertOptions.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L220)optionalinheritedctx **ctx? : any Inherited from UpsertOptions.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L236)optionalinheriteddisableIdentityMap **disableIdentityMap? : boolean Inherited from UpsertOptions.disableIdentityMap ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L224)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from UpsertOptions.loggerContext ### [**](#onConflictAction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L233)optionalinheritedonConflictAction **onConflictAction? : merge | ignore Inherited from UpsertOptions.onConflictAction ### [**](#onConflictExcludeFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L235)optionalinheritedonConflictExcludeFields **onConflictExcludeFields? : [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from UpsertOptions.onConflictExcludeFields ### [**](#onConflictFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L232)optionalinheritedonConflictFields **onConflictFields? : [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) | keyof Entity\[] Inherited from UpsertOptions.onConflictFields ### [**](#onConflictMergeFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L234)optionalinheritedonConflictMergeFields **onConflictMergeFields? : [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] Inherited from UpsertOptions.onConflictMergeFields ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L221)optionalinheritedschema **schema? : string Inherited from UpsertOptions.schema --- # Source: https://mikro-orm.io/api/core/interface/UpsertOptions.md # UpsertOptions \ ### Hierarchy * Omit<[NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md)\, upsert> * *UpsertOptions* * [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md) ## Index[**](#Index) ### Properties * [**convertCustomTypes](#convertCustomTypes) * [**ctx](#ctx) * [**disableIdentityMap](#disableIdentityMap) * [**loggerContext](#loggerContext) * [**onConflictAction](#onConflictAction) * [**onConflictExcludeFields](#onConflictExcludeFields) * [**onConflictFields](#onConflictFields) * [**onConflictMergeFields](#onConflictMergeFields) * [**schema](#schema) ## Properties[**](#Properties) ### [**](#convertCustomTypes)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L219)optionalinheritedconvertCustomTypes **convertCustomTypes? : boolean Inherited from Omit.convertCustomTypes ### [**](#ctx)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L220)optionalinheritedctx **ctx? : any Inherited from Omit.ctx ### [**](#disableIdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L236)optionaldisableIdentityMap **disableIdentityMap? : boolean ### [**](#loggerContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L224)optionalinheritedloggerContext **loggerContext? : [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) Inherited from Omit.loggerContext ### [**](#onConflictAction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L233)optionalonConflictAction **onConflictAction? : merge | ignore ### [**](#onConflictExcludeFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L235)optionalonConflictExcludeFields **onConflictExcludeFields? : [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] ### [**](#onConflictFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L232)optionalonConflictFields **onConflictFields? : [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) | keyof Entity\[] ### [**](#onConflictMergeFields)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L234)optionalonConflictMergeFields **onConflictMergeFields? : [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] ### [**](#schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L221)optionalinheritedschema **schema? : string Inherited from Omit.schema --- # Source: https://mikro-orm.io/api/core/class/Utils.md # Utils ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**PK\_SEPARATOR](#PK_SEPARATOR) ### Methods * [**absolutePath](#absolutePath) * [**asArray](#asArray) * [**callCompiledFunction](#callCompiledFunction) * [**className](#className) * [**copy](#copy) * [**createFunction](#createFunction) * [**defaultValue](#defaultValue) * [**detectTsNode](#detectTsNode) * [**diff](#diff) * [**dropUndefinedProperties](#dropUndefinedProperties) * [**dynamicImport](#dynamicImport) * [**dynamicImportProvider](#dynamicImportProvider) * [**entries](#entries) * [**equals](#equals) * [**extractChildElements](#extractChildElements) * [**extractEnumValues](#extractEnumValues) * [**extractPK](#extractPK) * [**fileURLToPath](#fileURLToPath) * [**findDuplicates](#findDuplicates) * [**flatten](#flatten) * [**getCompositeKeyHash](#getCompositeKeyHash) * [**getCompositeKeyValue](#getCompositeKeyValue) * [**getGlobalStorage](#getGlobalStorage) * [**getObjectKeysSize](#getObjectKeysSize) * [**getObjectType](#getObjectType) * [**getOrderedPrimaryKeys](#getOrderedPrimaryKeys) * [**getORMVersion](#getORMVersion) * [**getParamNames](#getParamNames) * [**getPrimaryKeyCond](#getPrimaryKeyCond) * [**getPrimaryKeyCondFromArray](#getPrimaryKeyCondFromArray) * [**getPrimaryKeyHash](#getPrimaryKeyHash) * [**getPrimaryKeyValues](#getPrimaryKeyValues) * [**getRootEntity](#getRootEntity) * [**hash](#hash) * [**hasNestedKey](#hasNestedKey) * [**hasObjectKeys](#hasObjectKeys) * [**isArrayOperator](#isArrayOperator) * [**isCollection](#isCollection) * [**isDefined](#isDefined) * [**isEmpty](#isEmpty) * [**isEntity](#isEntity) * [**isGroupOperator](#isGroupOperator) * [**isIterable](#isIterable) * [**isJsonKeyOperator](#isJsonKeyOperator) * [**isNotObject](#isNotObject) * [**isNumber](#isNumber) * [**isObject](#isObject) * [**isObjectID](#isObjectID) * [**isOperator](#isOperator) * [**isPlainObject](#isPlainObject) * [**isPrimaryKey](#isPrimaryKey) * [**isRawSql](#isRawSql) * [**isScalarReference](#isScalarReference) * [**isString](#isString) * [**keys](#keys) * [**lookupPathFromDecorator](#lookupPathFromDecorator) * [**mapFlatCompositePrimaryKey](#mapFlatCompositePrimaryKey) * [**merge](#merge) * [**mergeConfig](#mergeConfig) * [**normalizePath](#normalizePath) * [**parseArgs](#parseArgs) * [**pathExists](#pathExists) * [**primaryKeyToObject](#primaryKeyToObject) * [**propertyDecoratorReturnValue](#propertyDecoratorReturnValue) * [**randomInt](#randomInt) * [**relativePath](#relativePath) * [**removeDuplicates](#removeDuplicates) * [**renameKey](#renameKey) * [**requireFrom](#requireFrom) * [**resolveModulePath](#resolveModulePath) * [**runIfNotEmpty](#runIfNotEmpty) * [**runSerial](#runSerial) * [**setDynamicImportProvider](#setDynamicImportProvider) * [**setPayloadProperty](#setPayloadProperty) * [**splitPrimaryKeys](#splitPrimaryKeys) * [**stripRelativePath](#stripRelativePath) * [**tokenize](#tokenize) * [**tryRequire](#tryRequire) * [**unique](#unique) * [**unwrapProperty](#unwrapProperty) * [**values](#values) * [**xor](#xor) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new Utils**(): [Utils](https://mikro-orm.io/api/core/class/Utils.md) - #### Returns [Utils](https://mikro-orm.io/api/core/class/Utils.md) ## Properties[**](#Properties) ### [**](#PK_SEPARATOR)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L187)staticreadonlyPK\_SEPARATOR **PK\_SEPARATOR: \~\~\~ = '\~\~\~' ## Methods[**](#Methods) ### [**](#absolutePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L989)staticabsolutePath * ****absolutePath**(path, baseDir): string - Computes the absolute path to for the given path relative to the provided base directory. If either `path` or `baseDir` are `file:` URLs, they are converted to local paths. *** #### Parameters * ##### path: string * ##### baseDir: string = ... #### Returns string ### [**](#asArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L430)staticasArray * ****asArray**\(data, strict): T\[] - Normalize the argument to always be an array. *** #### Parameters * ##### optionaldata: T | readonly T\[] | Iterable\ * ##### strict: boolean = false #### Returns T\[] ### [**](#callCompiledFunction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1203)staticcallCompiledFunction * ****callCompiledFunction**\(fn, ...args): R - #### Parameters * ##### fn: (...args) => R * ##### rest...args: T #### Returns R ### [**](#className)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L805)staticclassName * ****className**\(classOrName): string - Gets string name of given class. *** #### Parameters * ##### classOrName: [EntityName](https://mikro-orm.io/api/core.md#EntityName)\ #### Returns string ### [**](#copy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L423)staticcopy * ****copy**\(entity, respectCustomCloneMethod): T - Creates deep copy of given object. *** #### Parameters * ##### entity: T * ##### respectCustomCloneMethod: boolean = true #### Returns T ### [**](#createFunction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1192)staticcreateFunction * ****createFunction**(context, code): any - #### Parameters * ##### context: Map\ * ##### code: string #### Returns any ### [**](#defaultValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1018)staticdefaultValue * ****defaultValue**\(prop, option, defaultValue): void - #### Parameters * ##### prop: T * ##### option: keyof T * ##### defaultValue: any #### Returns void ### [**](#detectTsNode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L822)staticdetectTsNode * ****detectTsNode**(): boolean - Tries to detect `ts-node` runtime. *** #### Returns boolean ### [**](#diff)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L406)staticdiff * ****diff**(a, b): Record\ - Computes difference between two objects, ignoring items missing in `b`. *** #### Parameters * ##### a: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) * ##### b: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns Record\ ### [**](#dropUndefinedProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L247)staticdropUndefinedProperties * ****dropUndefinedProperties**\(o, value, visited): void - Removes `undefined` properties (recursively) so they are not saved as nulls *** #### Parameters * ##### o: any * ##### optionalvalue: null * ##### visited: Set\ = ... #### Returns void ### [**](#dynamicImport)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1151)staticdynamicImport * ****dynamicImport**\(id): Promise\ - #### Parameters * ##### id: string #### Returns Promise\ ### [**](#dynamicImportProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L190)staticdynamicImportProvider * ****dynamicImportProvider**(id): Promise\ - #### Parameters * ##### id: string #### Returns Promise\ ### [**](#entries)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1386)staticentries * ****entries**\(obj): \[keyof T, T\[keyof T]]\[] - #### Parameters * ##### obj: T #### Returns \[keyof T, T\[keyof T]]\[] ### [**](#equals)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L321)staticequals * ****equals**(a, b): boolean - Checks if arguments are deeply (but not strictly) equal. *** #### Parameters * ##### a: any * ##### b: any #### Returns boolean ### [**](#extractChildElements)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L813)staticextractChildElements * ****extractChildElements**(items, prefix, allSymbol): string\[] - #### Parameters * ##### items: string\[] * ##### prefix: string * ##### optionalallSymbol: string #### Returns string\[] ### [**](#extractEnumValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1057)staticextractEnumValues * ****extractEnumValues**(target): (string | number)\[] - Extracts all possible values of a TS enum. Works with both string and numeric enums. *** #### Parameters * ##### target: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns (string | number)\[] ### [**](#extractPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L552)staticextractPK * ****extractPK**\(data, meta, strict): null | string | (T extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id? : PK } ? string | ReadonlyPrimary\ : T extends { id? : PK } ? ReadonlyPrimary\ : T extends { uuid? : PK } ? ReadonlyPrimary\ : T) - Extracts primary key from `data`. Accepts objects or primary keys directly. *** #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### strict: boolean = false #### Returns null | string | (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T) ### [**](#fileURLToPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L932)staticfileURLToPath * ****fileURLToPath**(url): string - #### Parameters * ##### url: string | URL #### Returns string ### [**](#findDuplicates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1022)staticfindDuplicates * ****findDuplicates**\(items): T\[] - #### Parameters * ##### items: T\[] #### Returns T\[] ### [**](#flatten)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1073)staticflatten * ****flatten**\(arrays): T\[] - #### Parameters * ##### arrays: T\[]\[] #### Returns T\[] ### [**](#getCompositeKeyHash)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L605)staticgetCompositeKeyHash * ****getCompositeKeyHash**\(data, meta, convertCustomTypes, platform, flat): string - #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### convertCustomTypes: boolean = false * ##### optionalplatform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### flat: boolean = false #### Returns string ### [**](#getCompositeKeyValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L582)staticgetCompositeKeyValue * ****getCompositeKeyValue**\(data, meta, convertCustomTypes, platform): [Primary](https://mikro-orm.io/api/core.md#Primary)\ - #### Parameters * ##### data: [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### convertCustomTypes: boolean | convertToDatabaseValue | convertToJSValue = false * ##### optionalplatform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns [Primary](https://mikro-orm.io/api/core.md#Primary)\ ### [**](#getGlobalStorage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1113)staticgetGlobalStorage * ****getGlobalStorage**(namespace): [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) - #### Parameters * ##### namespace: string #### Returns [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#getObjectKeysSize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L276)staticgetObjectKeysSize * ****getObjectKeysSize**(object): number - Returns the number of properties on `obj`. This is 20x faster than Object.keys(obj).length. * **@see** *** #### Parameters * ##### object: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns number ### [**](#getObjectType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L884)staticgetObjectType * ****getObjectType**(value): string - Gets the type of the argument. *** #### Parameters * ##### value: any #### Returns string ### [**](#getOrderedPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L730)staticgetOrderedPrimaryKeys * ****getOrderedPrimaryKeys**\(id, meta, platform, convertCustomTypes, allowScalar): [Primary](https://mikro-orm.io/api/core.md#Primary)\\[] - #### Parameters * ##### id: [Primary](https://mikro-orm.io/api/core.md#Primary)\ | Record\> * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### optionalplatform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### convertCustomTypes: boolean = false * ##### allowScalar: boolean = false #### Returns [Primary](https://mikro-orm.io/api/core.md#Primary)\\[] ### [**](#getORMVersion)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1174)staticgetORMVersion * ****getORMVersion**(): string - #### Returns string ### [**](#getParamNames)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L485)staticgetParamNames * ****getParamNames**(func, methodName): string\[] - Returns array of functions argument names. Uses `esprima` for source code analysis. *** #### Parameters * ##### func: string | { toString: any } | { type: string; value: string }\[] * * ##### toString: ##### optionalmethodName: string #### Returns string\[] ### [**](#getPrimaryKeyCond)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L683)staticgetPrimaryKeyCond * ****getPrimaryKeyCond**\(entity, primaryKeys): null | Record\> - #### Parameters * ##### entity: T * ##### primaryKeys: [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] #### Returns null | Record\> ### [**](#getPrimaryKeyCondFromArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L718)staticgetPrimaryKeyCondFromArray * ****getPrimaryKeyCondFromArray**\(pks, meta): Record\ : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id? : PK } ? string | ReadonlyPrimary\ : T extends { id? : PK } ? ReadonlyPrimary\ : T extends { uuid? : PK } ? ReadonlyPrimary\ : T> - #### Parameters * ##### pks: (T extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T)\[] * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns Record\: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof T\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof T\\[] ? ReadonlyPrimary\, PK\>> : PK : T extends { \_id?: PK } ? string | ReadonlyPrimary\ : T extends { id?: PK } ? ReadonlyPrimary\ : T extends { uuid?: PK } ? ReadonlyPrimary\ : T> ### [**](#getPrimaryKeyHash)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L615)staticgetPrimaryKeyHash * ****getPrimaryKeyHash**(pks): string - #### Parameters * ##### pks: (string | Date | Buffer\)\[] #### Returns string ### [**](#getPrimaryKeyValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L634)staticgetPrimaryKeyValues * ****getPrimaryKeyValues**\(entity, primaryKeys, allowScalar, convertCustomTypes): any - #### Parameters * ##### entity: T * ##### primaryKeys: string\[] | [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### allowScalar: boolean = false * ##### convertCustomTypes: boolean = false #### Returns any ### [**](#getRootEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L387)staticgetRootEntity * ****getRootEntity**(metadata, meta): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Parameters * ##### metadata: IMetadataStorage * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#hash)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1001)statichash * ****hash**(data, length, algorithm): string - #### Parameters * ##### data: string * ##### optionallength: number * ##### optionalalgorithm: md5 | sha256 #### Returns string ### [**](#hasNestedKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1097)statichasNestedKey * ****hasNestedKey**(object, key): boolean - #### Parameters * ##### object: unknown * ##### key: string #### Returns boolean ### [**](#hasObjectKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L293)statichasObjectKeys * ****hasObjectKeys**(object): boolean - Returns true if `obj` has at least one property. This is 20x faster than Object.keys(obj).length. * **@see** *** #### Parameters * ##### object: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) #### Returns boolean ### [**](#isArrayOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1089)staticisArrayOperator * ****isArrayOperator**(key): boolean - #### Parameters * ##### key: PropertyKey #### Returns boolean ### [**](#isCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L928)staticisCollection * ****isCollection**\(item): item is [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ - #### Parameters * ##### item: any #### Returns item is [Collection](https://mikro-orm.io/api/core/class/Collection.md)\ ### [**](#isDefined)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L195)staticisDefined * ****isDefined**\(data): data is T - Checks if the argument is not undefined *** #### Parameters * ##### data: any #### Returns data is T ### [**](#isEmpty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L790)staticisEmpty * ****isEmpty**(data): boolean - Checks whether the argument is empty (array without items, object without keys or falsy value). *** #### Parameters * ##### data: any #### Returns boolean ### [**](#isEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L761)staticisEntity * ****isEntity**\(data, allowReference): data is T & {} - Checks whether given object is an entity instance. *** #### Parameters * ##### data: any * ##### allowReference: boolean = false #### Returns data is T & {} ### [**](#isGroupOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1085)staticisGroupOperator * ****isGroupOperator**(key): boolean - #### Parameters * ##### key: PropertyKey #### Returns boolean ### [**](#isIterable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L445)staticisIterable * ****isIterable**\(value): value is Iterable\ - Checks if the value is iterable, but considers strings and buffers as not iterable. *** #### Parameters * ##### value: unknown #### Returns value is Iterable\ ### [**](#isJsonKeyOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1093)staticisJsonKeyOperator * ****isJsonKeyOperator**(key): boolean - #### Parameters * ##### key: PropertyKey #### Returns boolean ### [**](#isNotObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L240)staticisNotObject * ****isNotObject**\(o, not): o is T - Checks if the argument is instance of `Object`, but not one of the blacklisted types. Returns false for arrays. *** #### Parameters * ##### o: any * ##### not: any\[] #### Returns o is T ### [**](#isNumber)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L314)staticisNumber * ****isNumber**\(s): s is T - Checks if the argument is number *** #### Parameters * ##### s: any #### Returns s is T ### [**](#isObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L202)staticisObject * ****isObject**\(o): o is T - Checks if the argument is instance of `Object`. Returns false for arrays. *** #### Parameters * ##### o: any #### Returns o is T ### [**](#isObjectID)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L783)staticisObjectID * ****isObjectID**(key): boolean - Checks whether the argument is ObjectId instance *** #### Parameters * ##### key: any #### Returns boolean ### [**](#isOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1077)staticisOperator * ****isOperator**(key, includeGroupOperators): boolean - #### Parameters * ##### key: PropertyKey * ##### includeGroupOperators: boolean = true #### Returns boolean ### [**](#isPlainObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L904)staticisPlainObject * ****isPlainObject**\(value): value is T - Checks whether the value is POJO (e.g. `{ foo: 'bar' }`, and not instance of `Foo`) *** #### Parameters * ##### value: any #### Returns value is T ### [**](#isPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L528)staticisPrimaryKey * ****isPrimaryKey**\(key, allowComposite): key is [Primary](https://mikro-orm.io/api/core.md#Primary)\ - Checks whether the argument looks like primary key (string, number or ObjectId). *** #### Parameters * ##### key: any * ##### allowComposite: boolean = false #### Returns key is [Primary](https://mikro-orm.io/api/core.md#Primary)\ ### [**](#isRawSql)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1390)staticisRawSql * ****isRawSql**\(value): value is T - #### Parameters * ##### value: unknown #### Returns value is T ### [**](#isScalarReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L776)staticisScalarReference * ****isScalarReference**\(data, allowReference): data is [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md)\ - Checks whether given object is a scalar reference. *** #### Parameters * ##### data: any * ##### allowReference: boolean = false #### Returns data is [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md)\ ### [**](#isString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L307)staticisString * ****isString**(s): s is string - Checks if the argument is string *** #### Parameters * ##### s: any #### Returns s is string ### [**](#keys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1378)statickeys * ****keys**\(obj): keyof T\[] - #### Parameters * ##### obj: T #### Returns keyof T\[] ### [**](#lookupPathFromDecorator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L842)staticlookupPathFromDecorator * ****lookupPathFromDecorator**(name, stack): string - Uses some dark magic to get source path to caller where decorator is used. Analyses stack trace of error created inside the function call. *** #### Parameters * ##### name: string * ##### optionalstack: string\[] #### Returns string ### [**](#mapFlatCompositePrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L699)staticmapFlatCompositePrimaryKey * ****mapFlatCompositePrimaryKey**(fk, prop, fieldNames, idx): any - Maps nested FKs from `[1, 2, 3]` to `[1, [2, 3]]`. *** #### Parameters * ##### fk: any\[] * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### fieldNames: string\[] = prop.fieldNames * ##### idx: number = 0 #### Returns any ### [**](#merge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L339)staticmerge * ****merge**(target, ...sources): any - Merges all sources into the target recursively. *** #### Parameters * ##### target: any * ##### rest...sources: any\[] #### Returns any ### [**](#mergeConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L346)staticmergeConfig * ****mergeConfig**(target, ...sources): any - Merges all sources into the target recursively. Ignores `undefined` values. *** #### Parameters * ##### target: any * ##### rest...sources: any\[] #### Returns any ### [**](#normalizePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L944)staticnormalizePath * ****normalizePath**(...parts): string - Resolves and normalizes a series of path parts relative to each preceding part. If any part is a `file:` URL, it is converted to a local path. If any part is an absolute path, it replaces preceding paths (similar to `path.resolve` in NodeJS). Trailing directory separators are removed, and all directory separators are converted to POSIX-style separators (`/`). *** #### Parameters * ##### rest...parts: string\[] #### Returns string ### [**](#parseArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1356)staticparseArgs * ****parseArgs**\(): T - simple process.argv parser, supports only properties with long names, prefixed with `--` *** #### Returns T ### [**](#pathExists)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1045)staticpathExists * ****pathExists**(path, options): Promise\ - #### Parameters * ##### path: string * ##### options: GlobbyOptions = {} #### Returns Promise\ ### [**](#primaryKeyToObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1394)staticprimaryKeyToObject * ****primaryKeyToObject**\(meta, primaryKey, visible): T - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### primaryKey: T | [Primary](https://mikro-orm.io/api/core.md#Primary)\ * ##### optionalvisible: keyof T\[] #### Returns T ### [**](#propertyDecoratorReturnValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1234)staticpropertyDecoratorReturnValue * ****propertyDecoratorReturnValue**(): any - - **@see** *** #### Returns any ### [**](#randomInt)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1041)staticrandomInt * ****randomInt**(min, max): number - #### Parameters * ##### min: number * ##### max: number #### Returns number ### [**](#relativePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L969)staticrelativePath * ****relativePath**(path, relativeTo): string - Determines the relative path between two paths. If either path is a `file:` URL, it is converted to a local path. *** #### Parameters * ##### path: string * ##### relativeTo: string #### Returns string ### [**](#removeDuplicates)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1028)staticremoveDuplicates * ****removeDuplicates**\(items): T\[] - #### Parameters * ##### items: T\[] #### Returns T\[] ### [**](#renameKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L456)staticrenameKey * ****renameKey**\(payload, from, to): void - Renames object key, keeps order of properties. *** #### Parameters * ##### payload: T * ##### from: string | keyof T * ##### to: string #### Returns void ### [**](#requireFrom)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1125)staticrequireFrom * ****requireFrom**\(id, from): T - Require a module from a specific location *** #### Parameters * ##### id: string The module to require * ##### optionalfrom: string = ... Location to start the node resolution #### Returns T ### [**](#resolveModulePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1138)staticresolveModulePath * ****resolveModulePath**(id, from): string - Resolve path to a module. *** #### Parameters * ##### id: string The module to require * ##### optionalfrom: string = ... Location to start the node resolution #### Returns string ### [**](#runIfNotEmpty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1012)staticrunIfNotEmpty * ****runIfNotEmpty**(clause, data): void - #### Parameters * ##### clause: () => any * ##### data: any #### Returns void ### [**](#runSerial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L918)staticrunSerial * ****runSerial**\(items, cb): Promise\ - Executes the `cb` promise serially on every element of the `items` array and returns array of resolved values. *** #### Parameters * ##### items: Iterable\ * ##### cb: (item) => Promise\ #### Returns Promise\ ### [**](#setDynamicImportProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1170)staticsetDynamicImportProvider * ****setDynamicImportProvider**(provider): void - #### Parameters * ##### provider: (id) => Promise\ #### Returns void ### [**](#setPayloadProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1289)staticsetPayloadProperty * ****setPayloadProperty**\(entity, meta, prop, value, idx): void - #### Parameters * ##### entity: [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### value: unknown * ##### idx: number\[] #### Returns void ### [**](#splitPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L629)staticsplitPrimaryKeys * ****splitPrimaryKeys**\(key): [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] - #### Parameters * ##### key: string #### Returns [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] ### [**](#stripRelativePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1349)staticstripRelativePath * ****stripRelativePath**(str): string - #### Parameters * ##### str: string #### Returns string ### [**](#tokenize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L469)statictokenize * ****tokenize**(func): { type: string; value: string }\[] - Returns array of functions argument names. Uses `esprima` for source code analysis. *** #### Parameters * ##### func: string | { toString: any } | { type: string; value: string }\[] * ##### toString: #### Returns { type: string; value: string }\[] ### [**](#tryRequire)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1331)statictryRequire * ****tryRequire**\(\_\_namedParameters): undefined | T - #### Parameters * ##### \_\_namedParameters: { allowError?: string; from?: string; module: string; warning: string } * ##### optionalallowError: string * ##### optionalfrom: string * ##### module: string * ##### warning: string #### Returns undefined | T ### [**](#unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L328)staticunique * ****unique**\(items): T\[] - Gets array without duplicates. *** #### Parameters * ##### items: T\[] #### Returns T\[] ### [**](#unwrapProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1240)staticunwrapProperty * ****unwrapProperty**\(entity, meta, prop, payload): \[unknown, number\[]]\[] - #### Parameters * ##### entity: T * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### payload: boolean = false #### Returns \[unknown, number\[]]\[] ### [**](#values)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1382)staticvalues * ****values**\(obj): T\[keyof T]\[] - #### Parameters * ##### obj: T #### Returns T\[keyof T]\[] ### [**](#xor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L1374)staticxor * ****xor**(a, b): boolean - #### Parameters * ##### a: boolean * ##### b: boolean #### Returns boolean --- # Source: https://mikro-orm.io/api/core/class/UuidType.md # UuidType ### Hierarchy * [Type](https://mikro-orm.io/api/core/class/Type.md)\ * *UuidType* ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**meta](#meta) * [**platform](#platform) * [**prop](#prop) ### Accessors * [**name](#name) * [**runtimeType](#runtimeType) ### Methods * [**compareAsType](#compareAsType) * [**compareValues](#compareValues) * [**convertToDatabaseValue](#convertToDatabaseValue) * [**convertToDatabaseValueSQL](#convertToDatabaseValueSQL) * [**convertToJSValue](#convertToJSValue) * [**convertToJSValueSQL](#convertToJSValueSQL) * [**ensureComparable](#ensureComparable) * [**getColumnType](#getColumnType) * [**getDefaultLength](#getDefaultLength) * [**toJSON](#toJSON) * [**getType](#getType) * [**isMappedType](#isMappedType) ## Constructors[**](#Constructors) ### [**](#constructor)constructor * ****new UuidType**(): [UuidType](https://mikro-orm.io/api/core/class/UuidType.md) - Inherited from Type.constructor #### Returns [UuidType](https://mikro-orm.io/api/core/class/UuidType.md) ## Properties[**](#Properties) ### [**](#meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L23)optionalinheritedmeta **meta? : [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ Inherited from Type.meta ### [**](#platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L22)optionalinheritedplatform **platform? : [Platform](https://mikro-orm.io/api/core/class/Platform.md) Inherited from Type.platform ### [**](#prop)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L24)optionalinheritedprop **prop? : [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ Inherited from Type.prop ## Accessors[**](#Accessors) ### [**](#name)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L68)inheritedname * **get name(): string - Inherited from Type.name #### Returns string ### [**](#runtimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L63)inheritedruntimeType * **get runtimeType(): string - Inherited from Type.runtimeType #### Returns string ## Methods[**](#Methods) ### [**](#compareAsType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UuidType.ts#L11)compareAsType * ****compareAsType**(): string - Overrides Type.compareAsType How should the raw database values be compared? Used in `EntityComparator`. Possible values: string | number | bigint | boolean | date | any | buffer | array *** #### Returns string ### [**](#compareValues)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L61)optionalinheritedcompareValues * ****compareValues**(a, b): boolean - Inherited from Type.compareValues Allows to override the internal comparison logic. *** #### Parameters * ##### a: undefined | null | string * ##### b: undefined | null | string #### Returns boolean ### [**](#convertToDatabaseValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L29)inheritedconvertToDatabaseValue * ****convertToDatabaseValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToDatabaseValue Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToDatabaseValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L43)optionalinheritedconvertToDatabaseValueSQL * ****convertToDatabaseValueSQL**(key, platform): string - Inherited from Type.convertToDatabaseValueSQL Converts a value from its JS representation to its database representation of this type. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#convertToJSValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L36)inheritedconvertToJSValue * ****convertToJSValue**(value, platform, context): undefined | null | string - Inherited from Type.convertToJSValue Converts a value from its database representation to its JS representation of this type. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) * ##### optionalcontext: [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) #### Returns undefined | null | string ### [**](#convertToJSValueSQL)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L48)optionalinheritedconvertToJSValueSQL * ****convertToJSValueSQL**(key, platform): string - Inherited from Type.convertToJSValueSQL Modifies the SQL expression (identifier, parameter) to convert to a JS value. *** #### Parameters * ##### key: string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#ensureComparable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UuidType.ts#L15)ensureComparable * ****ensureComparable**(): boolean - Overrides Type.ensureComparable When a value is hydrated, we convert it back to the database value to ensure comparability, as often the raw database response is not the same as the `convertToDatabaseValue` result. This allows to disable the additional conversion in case you know it is not needed. *** #### Returns boolean ### [**](#getColumnType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/UuidType.ts#L7)getColumnType * ****getColumnType**(prop, platform): string - Overrides Type.getColumnType Gets the SQL declaration snippet for a field of this type. *** #### Parameters * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns string ### [**](#getDefaultLength)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L110)optionalinheritedgetDefaultLength * ****getDefaultLength**(platform): number - Inherited from Type.getDefaultLength Get the default length for values of this type When doing schema generation, if neither "length" nor "columnType" option is provided, the length will be defaulted to this value. When doing entity generation, if the type is recognized to this type, and the inferred length is this value, the length option will be omitted in the output. If this method is not defined, length is always outputted based on what is in the database metadata. *** #### Parameters * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) The platform the default will be used for. #### Returns number The default value for the given platform. ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L85)inheritedtoJSON * ****toJSON**(value, platform): undefined | null | string - Inherited from Type.toJSON Converts a value from its JS representation to its serialized JSON form of this type. By default uses the runtime value. *** #### Parameters * ##### value: undefined | null | string * ##### platform: [Platform](https://mikro-orm.io/api/core/class/Platform.md) #### Returns undefined | null | string ### [**](#getType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L112)staticinheritedgetType * ****getType**\(cls): InstanceType\ - Inherited from Type.getType #### Parameters * ##### cls: TypeClass #### Returns InstanceType\ ### [**](#isMappedType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/Type.ts#L125)staticinheritedisMappedType * ****isMappedType**(data): data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ - Inherited from Type.isMappedType Checks whether the argument is instance of `Type`. *** #### Parameters * ##### data: any #### Returns data is [Type](https://mikro-orm.io/api/core/class/Type.md)\ --- # Source: https://mikro-orm.io/api/core/class/ValidationError.md # ValidationError \ ### Hierarchy * Error * *ValidationError* * [CursorError](https://mikro-orm.io/api/core/class/CursorError.md) * [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md) * [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md) * [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md) * [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**cause](#cause) * [**entity](#entity) * [**message](#message) * [**name](#name) * [**stack](#stack) * [**stackTraceLimit](#stackTraceLimit) ### Methods * [**getEntity](#getEntity) * [**cannotCommit](#cannotCommit) * [**cannotModifyInverseCollection](#cannotModifyInverseCollection) * [**cannotModifyReadonlyCollection](#cannotModifyReadonlyCollection) * [**cannotRemoveFromCollectionWithoutOrphanRemoval](#cannotRemoveFromCollectionWithoutOrphanRemoval) * [**cannotUseGlobalContext](#cannotUseGlobalContext) * [**cannotUseGroupOperatorsInsideScalars](#cannotUseGroupOperatorsInsideScalars) * [**cannotUseOperatorsInsideEmbeddables](#cannotUseOperatorsInsideEmbeddables) * [**captureStackTrace](#captureStackTrace) * [**entityNotManaged](#entityNotManaged) * [**fromCollectionNotInitialized](#fromCollectionNotInitialized) * [**fromMergeWithoutPK](#fromMergeWithoutPK) * [**fromWrongPropertyType](#fromWrongPropertyType) * [**fromWrongRepositoryType](#fromWrongRepositoryType) * [**invalidCompositeIdentifier](#invalidCompositeIdentifier) * [**invalidEmbeddableQuery](#invalidEmbeddableQuery) * [**invalidPropertyName](#invalidPropertyName) * [**invalidType](#invalidType) * [**notDiscoveredEntity](#notDiscoveredEntity) * [**notEntity](#notEntity) * [**prepareStackTrace](#prepareStackTrace) * [**propertyRequired](#propertyRequired) * [**transactionRequired](#transactionRequired) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)constructor * ****new ValidationError**\(message, entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\ - Overrides Error.constructor #### Parameters * ##### message: string * ##### optionalentity: T #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\ ## Properties[**](#Properties) ### [**](#cause)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es2022.error.d.ts#L26)optionalinheritedcause **cause? : unknown Inherited from Error.cause ### [**](#entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L6)optionalreadonlyentity **entity? : T ### [**](#message)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1077)inheritedmessage **message: string Inherited from Error.message ### [**](#name)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1076)inheritedname **name: string Inherited from Error.name ### [**](#stack)[**](https://undefined/mikro-orm/mikro-orm/blob/master/docs/node_modules/typescript/src/lib.es5.d.ts#L1078)optionalinheritedstack **stack? : string Inherited from Error.stack ### [**](#stackTraceLimit)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L68)staticinheritedstackTraceLimit **stackTraceLimit: number Inherited from Error.stackTraceLimit The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured *after* the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ## Methods[**](#Methods) ### [**](#getEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L17)getEntity * ****getEntity**(): undefined | Partial\ - Gets instance of entity that caused this error. *** #### Returns undefined | Partial\ ### [**](#cannotCommit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L116)staticcannotCommit * ****cannotCommit**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyInverseCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L90)staticcannotModifyInverseCollection * ****cannotModifyInverseCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotModifyReadonlyCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L99)staticcannotModifyReadonlyCollection * ****cannotModifyReadonlyCollection**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotRemoveFromCollectionWithoutOrphanRemoval)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L103)staticcannotRemoveFromCollectionWithoutOrphanRemoval * ****cannotRemoveFromCollectionWithoutOrphanRemoval**(owner, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### owner: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGlobalContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L120)staticcannotUseGlobalContext * ****cannotUseGlobalContext**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseGroupOperatorsInsideScalars)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L128)staticcannotUseGroupOperatorsInsideScalars * ****cannotUseGroupOperatorsInsideScalars**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#cannotUseOperatorsInsideEmbeddables)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L124)staticcannotUseOperatorsInsideEmbeddables * ****cannotUseOperatorsInsideEmbeddables**(className, propName, payload): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### className: string * ##### propName: string * ##### payload: unknown #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#captureStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L52)staticinheritedcaptureStackTrace * ****captureStackTrace**(targetObject, constructorOpt): void - Inherited from Error.captureStackTrace Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ``` const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ``` function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` *** #### Parameters * ##### targetObject: object * ##### optionalconstructorOpt: Function #### Returns void ### [**](#entityNotManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L49)staticentityNotManaged * ****entityNotManaged**(entity): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entity: Partial\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromCollectionNotInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L34)staticfromCollectionNotInitialized * ****fromCollectionNotInitialized**(entity, prop): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entity: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromMergeWithoutPK)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L41)staticfromMergeWithoutPK * ****fromMergeWithoutPK**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongPropertyType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L21)staticfromWrongPropertyType * ****fromWrongPropertyType**(entity, property, expectedType, givenType, givenValue): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entity: Partial\ * ##### property: string * ##### expectedType: string * ##### givenType: string * ##### givenValue: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#fromWrongRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L28)staticfromWrongRepositoryType * ****fromWrongRepositoryType**(entityName, repoType, method): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entityName: string * ##### repoType: string * ##### method: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidCompositeIdentifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L112)staticinvalidCompositeIdentifier * ****invalidCompositeIdentifier**(meta): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### meta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidEmbeddableQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L132)staticinvalidEmbeddableQuery * ****invalidEmbeddableQuery**(className, propName, embeddableType): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### className: string * ##### propName: string * ##### embeddableType: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidPropertyName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L71)staticinvalidPropertyName * ****invalidPropertyName**(entityName, invalid): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entityName: string * ##### invalid: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#invalidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L75)staticinvalidType * ****invalidType**(type, value, mode): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### type: [Constructor](https://mikro-orm.io/api/core.md#Constructor)\ * ##### value: any * ##### mode: string #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notDiscoveredEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L58)staticnotDiscoveredEntity * ****notDiscoveredEntity**(data, meta, action): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### data: any * ##### optionalmeta: [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ * ##### action: string = 'persist' #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#notEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L53)staticnotEntity * ****notEntity**(owner, prop, data): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### owner: Partial\ * ##### prop: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ * ##### data: any #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#prepareStackTrace)[**](https://undefined/mikro-orm/mikro-orm/blob/master/node_modules/@types/node/globals.d.ts#L56)staticinheritedprepareStackTrace * ****prepareStackTrace**(err, stackTraces): any - Inherited from Error.prepareStackTrace * **@see** *** #### Parameters * ##### err: Error * ##### stackTraces: CallSite\[] #### Returns any ### [**](#propertyRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L85)staticpropertyRequired * ****propertyRequired**(entity, property): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Parameters * ##### entity: Partial\ * ##### property: [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md)\ #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> ### [**](#transactionRequired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L45)statictransactionRequired * ****transactionRequired**(): [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> - #### Returns [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md)\> --- # Source: https://mikro-orm.io/api/core/class/WrappedEntity.md # WrappedEntity \ ## Index[**](#Index) ### Constructors * [**constructor](#constructor) ### Properties * [**\_\_data](#__data) * [**\_\_em](#__em) * [**\_\_identifier](#__identifier) * [**\_\_initialized](#__initialized) * [**\_\_loadedProperties](#__loadedProperties) * [**\_\_managed](#__managed) * [**\_\_onLoadFired](#__onLoadFired) * [**\_\_originalEntityData](#__originalEntityData) * [**\_\_pk](#__pk) * [**\_\_populated](#__populated) * [**\_\_processing](#__processing) * [**\_\_reference](#__reference) * [**\_\_schema](#__schema) * [**\_\_serializationContext](#__serializationContext) * [**\_\_touched](#__touched) ### Accessors * [**\_\_config](#__config) * [**\_\_meta](#__meta) * [**\_\_platform](#__platform) * [**\_\_primaryKeys](#__primaryKeys) ### Methods * [**assign](#assign) * [**getPrimaryKey](#getPrimaryKey) * [**getPrimaryKeys](#getPrimaryKeys) * [**getSchema](#getSchema) * [**getSerializedPrimaryKey](#getSerializedPrimaryKey) * [**hasPrimaryKey](#hasPrimaryKey) * [**init](#init) * [**isInitialized](#isInitialized) * [**isManaged](#isManaged) * [**isTouched](#isTouched) * [**populate](#populate) * [**populated](#populated) * [**serialize](#serialize) * [**setPrimaryKey](#setPrimaryKey) * [**setSchema](#setSchema) * [**setSerializationContext](#setSerializationContext) * [**toJSON](#toJSON) * [**toObject](#toObject) * [**toPOJO](#toPOJO) * [**toReference](#toReference) ## Constructors[**](#Constructors) ### [**](#constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L76)constructor * ****new WrappedEntity**\(entity, hydrator, pkGetter, pkSerializer, pkGetterConverted): [WrappedEntity](https://mikro-orm.io/api/core/class/WrappedEntity.md)\ - #### Parameters * ##### entity: Entity * ##### hydrator: IHydrator * ##### optionalpkGetter: (e) => Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity * ##### optionalpkSerializer: (e) => string * ##### optionalpkGetterConverted: (e) => Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity #### Returns [WrappedEntity](https://mikro-orm.io/api/core/class/WrappedEntity.md)\ ## Properties[**](#Properties) ### [**](#__data)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L49)\_\_data **\_\_data: [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#__em)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L47)optional\_\_em **\_\_em? : [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>> ### [**](#__identifier)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L68)optional\_\_identifier **\_\_identifier? : EntityIdentifier holds wrapped primary key, so we can compute change set without eager commit ### [**](#__initialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L41)\_\_initialized **\_\_initialized: boolean ### [**](#__loadedProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L48)\_\_loadedProperties **\_\_loadedProperties: Set\ ### [**](#__managed)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L44)optional\_\_managed **\_\_managed? : boolean ### [**](#__onLoadFired)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L45)optional\_\_onLoadFired **\_\_onLoadFired? : boolean ### [**](#__originalEntityData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L65)optional\_\_originalEntityData **\_\_originalEntityData? : [EntityData](https://mikro-orm.io/api/core.md#EntityData)\ holds last entity data snapshot, so we can compute changes when persisting managed entities ### [**](#__pk)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L59)optional\_\_pk **\_\_pk? : Entity extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity stores last known primary key, as its current state might be broken due to propagation/orphan removal, but we need to know the PK to be able t remove the entity ### [**](#__populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L43)optional\_\_populated **\_\_populated? : boolean ### [**](#__processing)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L50)\_\_processing **\_\_processing: boolean ### [**](#__reference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L62)optional\_\_reference **\_\_reference? : [Reference](https://mikro-orm.io/api/core/class/Reference.md)\ holds the reference wrapper instance (if created), so we can maintain the identity on reference wrappers too ### [**](#__schema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L46)optional\_\_schema **\_\_schema? : string ### [**](#__serializationContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L51)\_\_serializationContext **\_\_serializationContext: { exclude? : readonly string\[]; fields? : Set\; populate? : [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[]; root? : [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md)\ } #### Type declaration * ##### optionalexclude?: readonly string\[] * ##### optionalfields?: Set\ * ##### optionalpopulate?: [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions)\\[] * ##### optionalroot?: [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md)\ ### [**](#__touched)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L42)\_\_touched **\_\_touched: boolean ## Accessors[**](#Accessors) ### [**](#__config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L270)\_\_config * **get \_\_config(): [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> - #### Returns [Configuration](https://mikro-orm.io/api/core/class/Configuration.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>, [EntityManager](https://mikro-orm.io/api/core/class/EntityManager.md)<[IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md)<[Connection](https://mikro-orm.io/api/core/class/Connection.md)>>> ### [**](#__meta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L262)\_\_meta * **get \_\_meta(): [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ - #### Returns [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md)\ ### [**](#__platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L266)\_\_platform * **get \_\_platform(): [Platform](https://mikro-orm.io/api/core/class/Platform.md) - #### Returns [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#__primaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L274)\_\_primaryKeys * **get \_\_primaryKeys(): (Entity extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity)\[] - #### Returns (Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity)\[] ## Methods[**](#Methods) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L154)assign * ****assign**\(data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> - #### Parameters * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### optionaloptions: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> ### [**](#getPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L197)getPrimaryKey * ****getPrimaryKey**(convertCustomTypes): null | (Entity extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity) - #### Parameters * ##### convertCustomTypes: boolean = false #### Returns null | (Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity) ### [**](#getPrimaryKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L220)getPrimaryKeys * ****getPrimaryKeys**(convertCustomTypes): null | (Entity extends { \[PrimaryKeyProp]? : PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id? : PK } ? string | ReadonlyPrimary\ : Entity extends { id? : PK } ? ReadonlyPrimary\ : Entity extends { uuid? : PK } ? ReadonlyPrimary\ : Entity)\[] - #### Parameters * ##### convertCustomTypes: boolean = false #### Returns null | (Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity)\[] ### [**](#getSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L245)getSchema * ****getSchema**(): undefined | string - #### Returns undefined | string ### [**](#getSerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L258)getSerializedPrimaryKey * ****getSerializedPrimaryKey**(): string - #### Returns string ### [**](#hasPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L192)hasPrimaryKey * ****hasPrimaryKey**(): boolean - #### Returns boolean ### [**](#init)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L166)init * ****init**\(options): Promise\> - #### Parameters * ##### optionaloptions: [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md)\ #### Returns Promise\> ### [**](#isInitialized)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L96)isInitialized * ****isInitialized**(): boolean - #### Returns boolean ### [**](#isManaged)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L104)isManaged * ****isManaged**(): boolean - #### Returns boolean ### [**](#isTouched)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L100)isTouched * ****isTouched**(): boolean - #### Returns boolean ### [**](#populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L178)populate * ****populate**\(populate, options): Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - #### Parameters * ##### populate: false | [AutoPath](https://mikro-orm.io/api/core.md#AutoPath)\\[] * ##### options: [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions)\ = {} #### Returns Promise<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#populated)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L108)populated * ****populated**(populated): void - #### Parameters * ##### populated: undefined | boolean = true #### Returns void ### [**](#serialize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L141)serialize * ****serialize**\(options): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> - #### Parameters * ##### optionaloptions: [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)\ #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\> ### [**](#setPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L253)setPrimaryKey * ****setPrimaryKey**(id): void - #### Parameters * ##### id: null | (Entity extends { \[PrimaryKeyProp]?: PK } ? PK extends undefined ? Omit\, typeof [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp)> : PK extends keyof Entity\ ? ReadonlyPrimary\\[PK\]>> : PK extends keyof Entity\\[] ? ReadonlyPrimary\, PK\>> : PK : Entity extends { \_id?: PK } ? string | ReadonlyPrimary\ : Entity extends { id?: PK } ? ReadonlyPrimary\ : Entity extends { uuid?: PK } ? ReadonlyPrimary\ : Entity) #### Returns void ### [**](#setSchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L249)setSchema * ****setSchema**(schema): void - #### Parameters * ##### optionalschema: string #### Returns void ### [**](#setSerializationContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L112)setSerializationContext * ****setSerializationContext**\(options): void - #### Parameters * ##### options: [LoadHint](https://mikro-orm.io/api/core/interface/LoadHint.md)\ #### Returns void ### [**](#toJSON)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L149)toJSON * ****toJSON**(...args): [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ - #### Parameters * ##### rest...args: any\[] #### Returns [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary)\ ### [**](#toObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L137)toObject * ****toObject**\(ignoreFields): Omit<[EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\, Ignored> - #### Parameters * ##### optionalignoreFields: Ignored\[] #### Returns Omit<[EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\, Ignored> ### [**](#toPOJO)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L145)toPOJO * ****toPOJO**(): [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ - #### Returns [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)\ ### [**](#toReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L132)toReference * ****toReference**(): [Ref](https://mikro-orm.io/api/core.md#Ref)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> - #### Returns [Ref](https://mikro-orm.io/api/core.md#Ref)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>> --- # Source: https://mikro-orm.io/docs/guide/advanced.md # Source: https://mikro-orm.io/docs/advanced.md ## [📄️ Filters](https://mikro-orm.io/docs/filters.md) [MikroORM has the ability to pre-define filter criteria and attach those filters to given entities. The application can then decide at runtime whether certain filters should be enabled and what their parameter values should be. Filters can be used like database views, but they are parameterized inside the application.](https://mikro-orm.io/docs/filters.md) --- # Source: https://mikro-orm.io/api.md # API ### Packages * [v](https://mikro-orm.io/api/better-sqlite.md) [6.6.0 @mikro-orm/better-sqlite](https://mikro-orm.io/api/better-sqlite.md) * [v](https://mikro-orm.io/api/cli.md) [6.6.0 @mikro-orm/cli](https://mikro-orm.io/api/cli.md) * [v](https://mikro-orm.io/api/core.md) [6.6.0 @mikro-orm/core](https://mikro-orm.io/api/core.md) * [v](https://mikro-orm.io/api/entity-generator.md) [6.6.0 @mikro-orm/entity-generator](https://mikro-orm.io/api/entity-generator.md) * [v](https://mikro-orm.io/api/knex.md) [6.6.0 @mikro-orm/knex](https://mikro-orm.io/api/knex.md) * [v](https://mikro-orm.io/api/libsql.md) [6.6.0 @mikro-orm/libsql](https://mikro-orm.io/api/libsql.md) * [v](https://mikro-orm.io/api/mariadb.md) [6.6.0 @mikro-orm/mariadb](https://mikro-orm.io/api/mariadb.md) * [v](https://mikro-orm.io/api/migrations.md) [6.6.0 @mikro-orm/migrations](https://mikro-orm.io/api/migrations.md) * [v](https://mikro-orm.io/api/mongodb.md) [6.6.0 @mikro-orm/mongodb](https://mikro-orm.io/api/mongodb.md) * [v](https://mikro-orm.io/api/mssql.md) [6.6.0 @mikro-orm/mssql](https://mikro-orm.io/api/mssql.md) * [v](https://mikro-orm.io/api/mysql.md) [6.6.0 @mikro-orm/mysql](https://mikro-orm.io/api/mysql.md) * [v](https://mikro-orm.io/api/postgresql.md) [6.6.0 @mikro-orm/postgresql](https://mikro-orm.io/api/postgresql.md) * [v](https://mikro-orm.io/api/reflection.md) [6.6.0 @mikro-orm/reflection](https://mikro-orm.io/api/reflection.md) * [v](https://mikro-orm.io/api/seeder.md) [6.6.0 @mikro-orm/seeder](https://mikro-orm.io/api/seeder.md) * [v](https://mikro-orm.io/api/sqlite.md) [6.6.0 @mikro-orm/sqlite](https://mikro-orm.io/api/sqlite.md) --- # Source: https://mikro-orm.io/blog/archive.md ### 2025[​](#2025 "Direct link to 2025") * [August 27](https://mikro-orm.io/blog/mikro-orm-6-5-released.md) [ - ](https://mikro-orm.io/blog/mikro-orm-6-5-released.md) [MikroORM 6.5](https://mikro-orm.io/blog/mikro-orm-6-5-released.md) * [November 11](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) [ - ](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) [MikroORM 6.6](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) --- # Source: https://mikro-orm.io/api/core/function/assign.md # assign ### Callable * ****assign**\(entity, data, options): [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> *** * #### Parameters * ##### entity: Entity * ##### data: Data & [IsSubset](https://mikro-orm.io/api/core.md#IsSubset)<[EntityData](https://mikro-orm.io/api/core.md#EntityData)\, Data> * ##### options: [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md)\ = {} #### Returns [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected)\ Data & string> --- # Source: https://mikro-orm.io/blog/authors.md # Authors * [![Martin Adámek](https://avatars1.githubusercontent.com/u/615580?s=460\&v=4)](https://github.com/B4nan) ## [Martin Adámek](https://github.com/B4nan) 13 Author of MikroORM [](https://x.com/B4nan "X")[](https://github.com/B4nan "GitHub") --- # Source: https://mikro-orm.io/api/better-sqlite.md # @mikro-orm/better-sqlite ## Index[**](#Index) ### References * [**AbstractNamingStrategy](https://mikro-orm.io/api/better-sqlite.md#AbstractNamingStrategy) * [**AbstractSchemaGenerator](https://mikro-orm.io/api/better-sqlite.md#AbstractSchemaGenerator) * [**AbstractSqlConnection](https://mikro-orm.io/api/better-sqlite.md#AbstractSqlConnection) * [**AbstractSqlDriver](https://mikro-orm.io/api/better-sqlite.md#AbstractSqlDriver) * [**AbstractSqlPlatform](https://mikro-orm.io/api/better-sqlite.md#AbstractSqlPlatform) * [**AfterCreate](https://mikro-orm.io/api/better-sqlite.md#AfterCreate) * [**AfterDelete](https://mikro-orm.io/api/better-sqlite.md#AfterDelete) * [**AfterUpdate](https://mikro-orm.io/api/better-sqlite.md#AfterUpdate) * [**AfterUpsert](https://mikro-orm.io/api/better-sqlite.md#AfterUpsert) * [**Alias](https://mikro-orm.io/api/better-sqlite.md#Alias) * [**AnyEntity](https://mikro-orm.io/api/better-sqlite.md#AnyEntity) * [**AnyString](https://mikro-orm.io/api/better-sqlite.md#AnyString) * [**ARRAY\_OPERATORS](https://mikro-orm.io/api/better-sqlite.md#ARRAY_OPERATORS) * [**ArrayCollection](https://mikro-orm.io/api/better-sqlite.md#ArrayCollection) * [**ArrayType](https://mikro-orm.io/api/better-sqlite.md#ArrayType) * [**assign](https://mikro-orm.io/api/better-sqlite.md#assign) * [**AssignOptions](https://mikro-orm.io/api/better-sqlite.md#AssignOptions) * [**AutoPath](https://mikro-orm.io/api/better-sqlite.md#AutoPath) * [**BaseEntity](https://mikro-orm.io/api/better-sqlite.md#BaseEntity) * [**BaseSqliteConnection](https://mikro-orm.io/api/better-sqlite.md#BaseSqliteConnection) * [**BaseSqlitePlatform](https://mikro-orm.io/api/better-sqlite.md#BaseSqlitePlatform) * [**BaseSqliteSchemaHelper](https://mikro-orm.io/api/better-sqlite.md#BaseSqliteSchemaHelper) * [**BeforeCreate](https://mikro-orm.io/api/better-sqlite.md#BeforeCreate) * [**BeforeDelete](https://mikro-orm.io/api/better-sqlite.md#BeforeDelete) * [**BeforeUpdate](https://mikro-orm.io/api/better-sqlite.md#BeforeUpdate) * [**BeforeUpsert](https://mikro-orm.io/api/better-sqlite.md#BeforeUpsert) * [**BetterSqliteKnexDialect](https://mikro-orm.io/api/better-sqlite.md#BetterSqliteKnexDialect) * [**BigIntType](https://mikro-orm.io/api/better-sqlite.md#BigIntType) * [**BlobType](https://mikro-orm.io/api/better-sqlite.md#BlobType) * [**BooleanType](https://mikro-orm.io/api/better-sqlite.md#BooleanType) * [**CacheAdapter](https://mikro-orm.io/api/better-sqlite.md#CacheAdapter) * [**Cascade](https://mikro-orm.io/api/better-sqlite.md#Cascade) * [**Cast](https://mikro-orm.io/api/better-sqlite.md#Cast) * [**ChangeSet](https://mikro-orm.io/api/better-sqlite.md#ChangeSet) * [**ChangeSetComputer](https://mikro-orm.io/api/better-sqlite.md#ChangeSetComputer) * [**ChangeSetPersister](https://mikro-orm.io/api/better-sqlite.md#ChangeSetPersister) * [**ChangeSetType](https://mikro-orm.io/api/better-sqlite.md#ChangeSetType) * [**CharacterType](https://mikro-orm.io/api/better-sqlite.md#CharacterType) * [**Check](https://mikro-orm.io/api/better-sqlite.md#Check) * [**CheckCallback](https://mikro-orm.io/api/better-sqlite.md#CheckCallback) * [**CheckConstraintViolationException](https://mikro-orm.io/api/better-sqlite.md#CheckConstraintViolationException) * [**CheckDef](https://mikro-orm.io/api/better-sqlite.md#CheckDef) * [**CheckOptions](https://mikro-orm.io/api/better-sqlite.md#CheckOptions) * [**ClearDatabaseOptions](https://mikro-orm.io/api/better-sqlite.md#ClearDatabaseOptions) * [**Collection](https://mikro-orm.io/api/better-sqlite.md#Collection) * [**Column](https://mikro-orm.io/api/better-sqlite.md#Column) * [**ColumnDifference](https://mikro-orm.io/api/better-sqlite.md#ColumnDifference) * [**compareArrays](https://mikro-orm.io/api/better-sqlite.md#compareArrays) * [**compareBooleans](https://mikro-orm.io/api/better-sqlite.md#compareBooleans) * [**compareBuffers](https://mikro-orm.io/api/better-sqlite.md#compareBuffers) * [**compareObjects](https://mikro-orm.io/api/better-sqlite.md#compareObjects) * [**Config](https://mikro-orm.io/api/better-sqlite.md#Config) * [**Configuration](https://mikro-orm.io/api/better-sqlite.md#Configuration) * [**Connection](https://mikro-orm.io/api/better-sqlite.md#Connection) * [**ConnectionConfig](https://mikro-orm.io/api/better-sqlite.md#ConnectionConfig) * [**ConnectionException](https://mikro-orm.io/api/better-sqlite.md#ConnectionException) * [**ConnectionOptions](https://mikro-orm.io/api/better-sqlite.md#ConnectionOptions) * [**ConnectionType](https://mikro-orm.io/api/better-sqlite.md#ConnectionType) * [**ConstraintViolationException](https://mikro-orm.io/api/better-sqlite.md#ConstraintViolationException) * [**Constructor](https://mikro-orm.io/api/better-sqlite.md#Constructor) * [**CountOptions](https://mikro-orm.io/api/better-sqlite.md#CountOptions) * [**CountQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#CountQueryBuilder) * [**CreateContextOptions](https://mikro-orm.io/api/better-sqlite.md#CreateContextOptions) * [**CreateOptions](https://mikro-orm.io/api/better-sqlite.md#CreateOptions) * [**CreateRequestContext](https://mikro-orm.io/api/better-sqlite.md#CreateRequestContext) * [**CreateSchemaOptions](https://mikro-orm.io/api/better-sqlite.md#CreateSchemaOptions) * [**createSqlFunction](https://mikro-orm.io/api/better-sqlite.md#createSqlFunction) * [**Cursor](https://mikro-orm.io/api/better-sqlite.md#Cursor) * [**CursorError](https://mikro-orm.io/api/better-sqlite.md#CursorError) * [**DatabaseDriver](https://mikro-orm.io/api/better-sqlite.md#DatabaseDriver) * [**DatabaseObjectExistsException](https://mikro-orm.io/api/better-sqlite.md#DatabaseObjectExistsException) * [**DatabaseObjectNotFoundException](https://mikro-orm.io/api/better-sqlite.md#DatabaseObjectNotFoundException) * [**DataloaderType](https://mikro-orm.io/api/better-sqlite.md#DataloaderType) * [**DataloaderUtils](https://mikro-orm.io/api/better-sqlite.md#DataloaderUtils) * [**DateTimeType](https://mikro-orm.io/api/better-sqlite.md#DateTimeType) * [**DateType](https://mikro-orm.io/api/better-sqlite.md#DateType) * [**DeadlockException](https://mikro-orm.io/api/better-sqlite.md#DeadlockException) * [**DecimalType](https://mikro-orm.io/api/better-sqlite.md#DecimalType) * [**DeepPartial](https://mikro-orm.io/api/better-sqlite.md#DeepPartial) * [**DefaultLogger](https://mikro-orm.io/api/better-sqlite.md#DefaultLogger) * [**DeferMode](https://mikro-orm.io/api/better-sqlite.md#DeferMode) * [**DefineConfig](https://mikro-orm.io/api/better-sqlite.md#DefineConfig) * [**defineEntity](https://mikro-orm.io/api/better-sqlite.md#defineEntity) * [**DefineEntityHooks](https://mikro-orm.io/api/better-sqlite.md#DefineEntityHooks) * [**DeleteOptions](https://mikro-orm.io/api/better-sqlite.md#DeleteOptions) * [**DeleteQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#DeleteQueryBuilder) * [**Dictionary](https://mikro-orm.io/api/better-sqlite.md#Dictionary) * [**DoubleType](https://mikro-orm.io/api/better-sqlite.md#DoubleType) * [**DriverException](https://mikro-orm.io/api/better-sqlite.md#DriverException) * [**DriverMethodOptions](https://mikro-orm.io/api/better-sqlite.md#DriverMethodOptions) * [**DropSchemaOptions](https://mikro-orm.io/api/better-sqlite.md#DropSchemaOptions) * [**DynamicPassword](https://mikro-orm.io/api/better-sqlite.md#DynamicPassword) * [**EagerProps](https://mikro-orm.io/api/better-sqlite.md#EagerProps) * [**Edge](https://mikro-orm.io/api/better-sqlite.md#Edge) * [**Embeddable](https://mikro-orm.io/api/better-sqlite.md#Embeddable) * [**EmbeddableOptions](https://mikro-orm.io/api/better-sqlite.md#EmbeddableOptions) * [**Embedded](https://mikro-orm.io/api/better-sqlite.md#Embedded) * [**EmbeddedOptions](https://mikro-orm.io/api/better-sqlite.md#EmbeddedOptions) * [**EmbeddedPrefixMode](https://mikro-orm.io/api/better-sqlite.md#EmbeddedPrefixMode) * [**EmptyOptions](https://mikro-orm.io/api/better-sqlite.md#EmptyOptions) * [**EnsureDatabaseOptions](https://mikro-orm.io/api/better-sqlite.md#EnsureDatabaseOptions) * [**EnsureRequestContext](https://mikro-orm.io/api/better-sqlite.md#EnsureRequestContext) * [**Entity](https://mikro-orm.io/api/better-sqlite.md#Entity) * [**EntityAssigner](https://mikro-orm.io/api/better-sqlite.md#EntityAssigner) * [**EntityCaseNamingStrategy](https://mikro-orm.io/api/better-sqlite.md#EntityCaseNamingStrategy) * [**EntityClass](https://mikro-orm.io/api/better-sqlite.md#EntityClass) * [**EntityClassGroup](https://mikro-orm.io/api/better-sqlite.md#EntityClassGroup) * [**EntityComparator](https://mikro-orm.io/api/better-sqlite.md#EntityComparator) * [**EntityData](https://mikro-orm.io/api/better-sqlite.md#EntityData) * [**EntityDataValue](https://mikro-orm.io/api/better-sqlite.md#EntityDataValue) * [**EntityDictionary](https://mikro-orm.io/api/better-sqlite.md#EntityDictionary) * [**EntityDTO](https://mikro-orm.io/api/better-sqlite.md#EntityDTO) * [**EntityFactory](https://mikro-orm.io/api/better-sqlite.md#EntityFactory) * [**EntityField](https://mikro-orm.io/api/better-sqlite.md#EntityField) * [**EntityKey](https://mikro-orm.io/api/better-sqlite.md#EntityKey) * [**EntityLoader](https://mikro-orm.io/api/better-sqlite.md#EntityLoader) * [**EntityLoaderOptions](https://mikro-orm.io/api/better-sqlite.md#EntityLoaderOptions) * [**EntityManager](https://mikro-orm.io/api/better-sqlite.md#EntityManager) * [**EntityManagerType](https://mikro-orm.io/api/better-sqlite.md#EntityManagerType) * [**EntityMetadata](https://mikro-orm.io/api/better-sqlite.md#EntityMetadata) * [**EntityName](https://mikro-orm.io/api/better-sqlite.md#EntityName) * [**EntityOptions](https://mikro-orm.io/api/better-sqlite.md#EntityOptions) * [**EntityProperty](https://mikro-orm.io/api/better-sqlite.md#EntityProperty) * [**EntityProps](https://mikro-orm.io/api/better-sqlite.md#EntityProps) * [**EntityRef](https://mikro-orm.io/api/better-sqlite.md#EntityRef) * [**EntityRepository](https://mikro-orm.io/api/better-sqlite.md#EntityRepository) * [**EntityRepositoryType](https://mikro-orm.io/api/better-sqlite.md#EntityRepositoryType) * [**EntitySchema](https://mikro-orm.io/api/better-sqlite.md#EntitySchema) * [**EntitySchemaMetadata](https://mikro-orm.io/api/better-sqlite.md#EntitySchemaMetadata) * [**EntitySchemaProperty](https://mikro-orm.io/api/better-sqlite.md#EntitySchemaProperty) * [**EntitySerializer](https://mikro-orm.io/api/better-sqlite.md#EntitySerializer) * [**EntityTransformer](https://mikro-orm.io/api/better-sqlite.md#EntityTransformer) * [**EntityType](https://mikro-orm.io/api/better-sqlite.md#EntityType) * [**EntityValidator](https://mikro-orm.io/api/better-sqlite.md#EntityValidator) * [**EntityValue](https://mikro-orm.io/api/better-sqlite.md#EntityValue) * [**Enum](https://mikro-orm.io/api/better-sqlite.md#Enum) * [**EnumArrayType](https://mikro-orm.io/api/better-sqlite.md#EnumArrayType) * [**EnumOptions](https://mikro-orm.io/api/better-sqlite.md#EnumOptions) * [**EnumType](https://mikro-orm.io/api/better-sqlite.md#EnumType) * [**equals](https://mikro-orm.io/api/better-sqlite.md#equals) * [**EventArgs](https://mikro-orm.io/api/better-sqlite.md#EventArgs) * [**EventManager](https://mikro-orm.io/api/better-sqlite.md#EventManager) * [**EventSubscriber](https://mikro-orm.io/api/better-sqlite.md#EventSubscriber) * [**EventType](https://mikro-orm.io/api/better-sqlite.md#EventType) * [**EventTypeMap](https://mikro-orm.io/api/better-sqlite.md#EventTypeMap) * [**ExceptionConverter](https://mikro-orm.io/api/better-sqlite.md#ExceptionConverter) * [**ExecuteOptions](https://mikro-orm.io/api/better-sqlite.md#ExecuteOptions) * [**ExpandHint](https://mikro-orm.io/api/better-sqlite.md#ExpandHint) * [**ExpandProperty](https://mikro-orm.io/api/better-sqlite.md#ExpandProperty) * [**ExpandQuery](https://mikro-orm.io/api/better-sqlite.md#ExpandQuery) * [**ExpandScalar](https://mikro-orm.io/api/better-sqlite.md#ExpandScalar) * [**FactoryOptions](https://mikro-orm.io/api/better-sqlite.md#FactoryOptions) * [**Field](https://mikro-orm.io/api/better-sqlite.md#Field) * [**FileCacheAdapter](https://mikro-orm.io/api/better-sqlite.md#FileCacheAdapter) * [**Filter](https://mikro-orm.io/api/better-sqlite.md#Filter) * [**FilterItemValue](https://mikro-orm.io/api/better-sqlite.md#FilterItemValue) * [**FilterKey](https://mikro-orm.io/api/better-sqlite.md#FilterKey) * [**FilterObject](https://mikro-orm.io/api/better-sqlite.md#FilterObject) * [**FilterOptions](https://mikro-orm.io/api/better-sqlite.md#FilterOptions) * [**FilterQuery](https://mikro-orm.io/api/better-sqlite.md#FilterQuery) * [**FilterValue](https://mikro-orm.io/api/better-sqlite.md#FilterValue) * [**FindAllOptions](https://mikro-orm.io/api/better-sqlite.md#FindAllOptions) * [**FindByCursorOptions](https://mikro-orm.io/api/better-sqlite.md#FindByCursorOptions) * [**FindOneOptions](https://mikro-orm.io/api/better-sqlite.md#FindOneOptions) * [**FindOneOrFailOptions](https://mikro-orm.io/api/better-sqlite.md#FindOneOrFailOptions) * [**FindOptions](https://mikro-orm.io/api/better-sqlite.md#FindOptions) * [**FlatQueryOrderMap](https://mikro-orm.io/api/better-sqlite.md#FlatQueryOrderMap) * [**FloatType](https://mikro-orm.io/api/better-sqlite.md#FloatType) * [**FlushEventArgs](https://mikro-orm.io/api/better-sqlite.md#FlushEventArgs) * [**FlushMode](https://mikro-orm.io/api/better-sqlite.md#FlushMode) * [**ForeignKey](https://mikro-orm.io/api/better-sqlite.md#ForeignKey) * [**ForeignKeyConstraintViolationException](https://mikro-orm.io/api/better-sqlite.md#ForeignKeyConstraintViolationException) * [**ForkOptions](https://mikro-orm.io/api/better-sqlite.md#ForkOptions) * [**Formula](https://mikro-orm.io/api/better-sqlite.md#Formula) * [**FormulaOptions](https://mikro-orm.io/api/better-sqlite.md#FormulaOptions) * [**FromEntityType](https://mikro-orm.io/api/better-sqlite.md#FromEntityType) * [**GeneratedCacheAdapter](https://mikro-orm.io/api/better-sqlite.md#GeneratedCacheAdapter) * [**GenerateOptions](https://mikro-orm.io/api/better-sqlite.md#GenerateOptions) * [**GetReferenceOptions](https://mikro-orm.io/api/better-sqlite.md#GetReferenceOptions) * [**GetRepository](https://mikro-orm.io/api/better-sqlite.md#GetRepository) * [**GroupOperator](https://mikro-orm.io/api/better-sqlite.md#GroupOperator) * [**Hidden](https://mikro-orm.io/api/better-sqlite.md#Hidden) * [**HiddenProps](https://mikro-orm.io/api/better-sqlite.md#HiddenProps) * [**Highlighter](https://mikro-orm.io/api/better-sqlite.md#Highlighter) * [**Hydrator](https://mikro-orm.io/api/better-sqlite.md#Hydrator) * [**IConfiguration](https://mikro-orm.io/api/better-sqlite.md#IConfiguration) * [**ICriteriaNode](https://mikro-orm.io/api/better-sqlite.md#ICriteriaNode) * [**ICriteriaNodeProcessOptions](https://mikro-orm.io/api/better-sqlite.md#ICriteriaNodeProcessOptions) * [**IDatabaseDriver](https://mikro-orm.io/api/better-sqlite.md#IDatabaseDriver) * [**IdentityMap](https://mikro-orm.io/api/better-sqlite.md#IdentityMap) * [**IEntityGenerator](https://mikro-orm.io/api/better-sqlite.md#IEntityGenerator) * [**IMigrationGenerator](https://mikro-orm.io/api/better-sqlite.md#IMigrationGenerator) * [**IMigrator](https://mikro-orm.io/api/better-sqlite.md#IMigrator) * [**ImportsResolver](https://mikro-orm.io/api/better-sqlite.md#ImportsResolver) * [**Index](https://mikro-orm.io/api/better-sqlite.md#Index) * [**IndexCallback](https://mikro-orm.io/api/better-sqlite.md#IndexCallback) * [**IndexDef](https://mikro-orm.io/api/better-sqlite.md#IndexDef) * [**IndexOptions](https://mikro-orm.io/api/better-sqlite.md#IndexOptions) * [**InferEntity](https://mikro-orm.io/api/better-sqlite.md#InferEntity) * [**InferEntityFromProperties](https://mikro-orm.io/api/better-sqlite.md#InferEntityFromProperties) * [**InferPrimaryKey](https://mikro-orm.io/api/better-sqlite.md#InferPrimaryKey) * [**InitCollectionOptions](https://mikro-orm.io/api/better-sqlite.md#InitCollectionOptions) * [**InsertQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#InsertQueryBuilder) * [**IntegerType](https://mikro-orm.io/api/better-sqlite.md#IntegerType) * [**IntervalType](https://mikro-orm.io/api/better-sqlite.md#IntervalType) * [**InvalidFieldNameException](https://mikro-orm.io/api/better-sqlite.md#InvalidFieldNameException) * [**IPrimaryKey](https://mikro-orm.io/api/better-sqlite.md#IPrimaryKey) * [**IQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#IQueryBuilder) * [**ISchemaGenerator](https://mikro-orm.io/api/better-sqlite.md#ISchemaGenerator) * [**ISeedManager](https://mikro-orm.io/api/better-sqlite.md#ISeedManager) * [**IsolationLevel](https://mikro-orm.io/api/better-sqlite.md#IsolationLevel) * [**IsSubset](https://mikro-orm.io/api/better-sqlite.md#IsSubset) * [**IsUnknown](https://mikro-orm.io/api/better-sqlite.md#IsUnknown) * [**IType](https://mikro-orm.io/api/better-sqlite.md#IType) * [**IWrappedEntity](https://mikro-orm.io/api/better-sqlite.md#IWrappedEntity) * [**JoinOptions](https://mikro-orm.io/api/better-sqlite.md#JoinOptions) * [**JoinType](https://mikro-orm.io/api/better-sqlite.md#JoinType) * [**JSON\_KEY\_OPERATORS](https://mikro-orm.io/api/better-sqlite.md#JSON_KEY_OPERATORS) * [**JsonProperty](https://mikro-orm.io/api/better-sqlite.md#JsonProperty) * [**JsonType](https://mikro-orm.io/api/better-sqlite.md#JsonType) * [**KnexStringRef](https://mikro-orm.io/api/better-sqlite.md#KnexStringRef) * [**LibSqlKnexDialect](https://mikro-orm.io/api/better-sqlite.md#LibSqlKnexDialect) * [**LoadCountOptions](https://mikro-orm.io/api/better-sqlite.md#LoadCountOptions) * [**Loaded](https://mikro-orm.io/api/better-sqlite.md#Loaded) * [**LoadedCollection](https://mikro-orm.io/api/better-sqlite.md#LoadedCollection) * [**LoadedReference](https://mikro-orm.io/api/better-sqlite.md#LoadedReference) * [**LoadHint](https://mikro-orm.io/api/better-sqlite.md#LoadHint) * [**LoadReferenceOptions](https://mikro-orm.io/api/better-sqlite.md#LoadReferenceOptions) * [**LoadReferenceOrFailOptions](https://mikro-orm.io/api/better-sqlite.md#LoadReferenceOrFailOptions) * [**LoadStrategy](https://mikro-orm.io/api/better-sqlite.md#LoadStrategy) * [**LockMode](https://mikro-orm.io/api/better-sqlite.md#LockMode) * [**LockOptions](https://mikro-orm.io/api/better-sqlite.md#LockOptions) * [**LockWaitTimeoutException](https://mikro-orm.io/api/better-sqlite.md#LockWaitTimeoutException) * [**LogContext](https://mikro-orm.io/api/better-sqlite.md#LogContext) * [**Logger](https://mikro-orm.io/api/better-sqlite.md#Logger) * [**LoggerNamespace](https://mikro-orm.io/api/better-sqlite.md#LoggerNamespace) * [**LoggerOptions](https://mikro-orm.io/api/better-sqlite.md#LoggerOptions) * [**LoggingOptions](https://mikro-orm.io/api/better-sqlite.md#LoggingOptions) * [**ManyToMany](https://mikro-orm.io/api/better-sqlite.md#ManyToMany) * [**ManyToManyOptions](https://mikro-orm.io/api/better-sqlite.md#ManyToManyOptions) * [**ManyToOne](https://mikro-orm.io/api/better-sqlite.md#ManyToOne) * [**ManyToOneOptions](https://mikro-orm.io/api/better-sqlite.md#ManyToOneOptions) * [**MariaDbKnexDialect](https://mikro-orm.io/api/better-sqlite.md#MariaDbKnexDialect) * [**MatchingOptions](https://mikro-orm.io/api/better-sqlite.md#MatchingOptions) * [**MaybePromise](https://mikro-orm.io/api/better-sqlite.md#MaybePromise) * [**MediumIntType](https://mikro-orm.io/api/better-sqlite.md#MediumIntType) * [**MemoryCacheAdapter](https://mikro-orm.io/api/better-sqlite.md#MemoryCacheAdapter) * [**MergeLoaded](https://mikro-orm.io/api/better-sqlite.md#MergeLoaded) * [**MergeOptions](https://mikro-orm.io/api/better-sqlite.md#MergeOptions) * [**MergeSelected](https://mikro-orm.io/api/better-sqlite.md#MergeSelected) * [**MetadataDiscovery](https://mikro-orm.io/api/better-sqlite.md#MetadataDiscovery) * [**MetadataDiscoveryOptions](https://mikro-orm.io/api/better-sqlite.md#MetadataDiscoveryOptions) * [**MetadataError](https://mikro-orm.io/api/better-sqlite.md#MetadataError) * [**MetadataProcessor](https://mikro-orm.io/api/better-sqlite.md#MetadataProcessor) * [**MetadataProvider](https://mikro-orm.io/api/better-sqlite.md#MetadataProvider) * [**MetadataStorage](https://mikro-orm.io/api/better-sqlite.md#MetadataStorage) * [**MigrateOptions](https://mikro-orm.io/api/better-sqlite.md#MigrateOptions) * [**MigrationDiff](https://mikro-orm.io/api/better-sqlite.md#MigrationDiff) * [**MigrationObject](https://mikro-orm.io/api/better-sqlite.md#MigrationObject) * [**MigrationResult](https://mikro-orm.io/api/better-sqlite.md#MigrationResult) * [**MigrationRow](https://mikro-orm.io/api/better-sqlite.md#MigrationRow) * [**MigrationsOptions](https://mikro-orm.io/api/better-sqlite.md#MigrationsOptions) * [**MigratorEvent](https://mikro-orm.io/api/better-sqlite.md#MigratorEvent) * [**MikroORMOptions](https://mikro-orm.io/api/better-sqlite.md#MikroORMOptions) * [**ModifyContext](https://mikro-orm.io/api/better-sqlite.md#ModifyContext) * [**ModifyHint](https://mikro-orm.io/api/better-sqlite.md#ModifyHint) * [**MongoNamingStrategy](https://mikro-orm.io/api/better-sqlite.md#MongoNamingStrategy) * [**MonkeyPatchable](https://mikro-orm.io/api/better-sqlite.md#MonkeyPatchable) * [**MsSqlKnexDialect](https://mikro-orm.io/api/better-sqlite.md#MsSqlKnexDialect) * [**MySqlConnection](https://mikro-orm.io/api/better-sqlite.md#MySqlConnection) * [**MySqlExceptionConverter](https://mikro-orm.io/api/better-sqlite.md#MySqlExceptionConverter) * [**MySqlIncrementOptions](https://mikro-orm.io/api/better-sqlite.md#MySqlIncrementOptions) * [**MySqlKnexDialect](https://mikro-orm.io/api/better-sqlite.md#MySqlKnexDialect) * [**MySqlPlatform](https://mikro-orm.io/api/better-sqlite.md#MySqlPlatform) * [**MySqlSchemaHelper](https://mikro-orm.io/api/better-sqlite.md#MySqlSchemaHelper) * [**MySqlTableBuilder](https://mikro-orm.io/api/better-sqlite.md#MySqlTableBuilder) * [**NamingStrategy](https://mikro-orm.io/api/better-sqlite.md#NamingStrategy) * [**NativeDeleteOptions](https://mikro-orm.io/api/better-sqlite.md#NativeDeleteOptions) * [**NativeInsertUpdateManyOptions](https://mikro-orm.io/api/better-sqlite.md#NativeInsertUpdateManyOptions) * [**NativeInsertUpdateOptions](https://mikro-orm.io/api/better-sqlite.md#NativeInsertUpdateOptions) * [**New](https://mikro-orm.io/api/better-sqlite.md#New) * [**Node](https://mikro-orm.io/api/better-sqlite.md#Node) * [**NodeState](https://mikro-orm.io/api/better-sqlite.md#NodeState) * [**NoInfer](https://mikro-orm.io/api/better-sqlite.md#NoInfer) * [**NonUniqueFieldNameException](https://mikro-orm.io/api/better-sqlite.md#NonUniqueFieldNameException) * [**NotFoundError](https://mikro-orm.io/api/better-sqlite.md#NotFoundError) * [**NotNullConstraintViolationException](https://mikro-orm.io/api/better-sqlite.md#NotNullConstraintViolationException) * [**NullCacheAdapter](https://mikro-orm.io/api/better-sqlite.md#NullCacheAdapter) * [**NullHighlighter](https://mikro-orm.io/api/better-sqlite.md#NullHighlighter) * [**ObjectBindingPattern](https://mikro-orm.io/api/better-sqlite.md#ObjectBindingPattern) * [**ObjectHydrator](https://mikro-orm.io/api/better-sqlite.md#ObjectHydrator) * [**ObjectQuery](https://mikro-orm.io/api/better-sqlite.md#ObjectQuery) * [**OneToMany](https://mikro-orm.io/api/better-sqlite.md#OneToMany) * [**OneToManyOptions](https://mikro-orm.io/api/better-sqlite.md#OneToManyOptions) * [**OneToOne](https://mikro-orm.io/api/better-sqlite.md#OneToOne) * [**OneToOneOptions](https://mikro-orm.io/api/better-sqlite.md#OneToOneOptions) * [**OnInit](https://mikro-orm.io/api/better-sqlite.md#OnInit) * [**OnLoad](https://mikro-orm.io/api/better-sqlite.md#OnLoad) * [**Opt](https://mikro-orm.io/api/better-sqlite.md#Opt) * [**OptimisticLockError](https://mikro-orm.io/api/better-sqlite.md#OptimisticLockError) * [**OptionalProps](https://mikro-orm.io/api/better-sqlite.md#OptionalProps) * [**OrderDefinition](https://mikro-orm.io/api/better-sqlite.md#OrderDefinition) * [**p](https://mikro-orm.io/api/better-sqlite.md#p) * [**parseJsonSafe](https://mikro-orm.io/api/better-sqlite.md#parseJsonSafe) * [**PlainObject](https://mikro-orm.io/api/better-sqlite.md#PlainObject) * [**Platform](https://mikro-orm.io/api/better-sqlite.md#Platform) * [**PoolConfig](https://mikro-orm.io/api/better-sqlite.md#PoolConfig) * [**Populate](https://mikro-orm.io/api/better-sqlite.md#Populate) * [**PopulateHint](https://mikro-orm.io/api/better-sqlite.md#PopulateHint) * [**PopulateOptions](https://mikro-orm.io/api/better-sqlite.md#PopulateOptions) * [**PopulatePath](https://mikro-orm.io/api/better-sqlite.md#PopulatePath) * [**PostgreSqlKnexDialect](https://mikro-orm.io/api/better-sqlite.md#PostgreSqlKnexDialect) * [**Primary](https://mikro-orm.io/api/better-sqlite.md#Primary) * [**PrimaryKey](https://mikro-orm.io/api/better-sqlite.md#PrimaryKey) * [**PrimaryKeyOptions](https://mikro-orm.io/api/better-sqlite.md#PrimaryKeyOptions) * [**PrimaryKeyProp](https://mikro-orm.io/api/better-sqlite.md#PrimaryKeyProp) * [**Property](https://mikro-orm.io/api/better-sqlite.md#Property) * [**PropertyOptions](https://mikro-orm.io/api/better-sqlite.md#PropertyOptions) * [**QBField](https://mikro-orm.io/api/better-sqlite.md#QBField) * [**QBField2](https://mikro-orm.io/api/better-sqlite.md#QBField2) * [**QBFilterQuery](https://mikro-orm.io/api/better-sqlite.md#QBFilterQuery) * [**QBQueryOrderMap](https://mikro-orm.io/api/better-sqlite.md#QBQueryOrderMap) * [**QueryBuilder](https://mikro-orm.io/api/better-sqlite.md#QueryBuilder) * [**QueryFlag](https://mikro-orm.io/api/better-sqlite.md#QueryFlag) * [**QueryOperator](https://mikro-orm.io/api/better-sqlite.md#QueryOperator) * [**QueryOrder](https://mikro-orm.io/api/better-sqlite.md#QueryOrder) * [**QueryOrderKeys](https://mikro-orm.io/api/better-sqlite.md#QueryOrderKeys) * [**QueryOrderKeysFlat](https://mikro-orm.io/api/better-sqlite.md#QueryOrderKeysFlat) * [**QueryOrderMap](https://mikro-orm.io/api/better-sqlite.md#QueryOrderMap) * [**QueryOrderNumeric](https://mikro-orm.io/api/better-sqlite.md#QueryOrderNumeric) * [**QueryResult](https://mikro-orm.io/api/better-sqlite.md#QueryResult) * [**QueryType](https://mikro-orm.io/api/better-sqlite.md#QueryType) * [**quote](https://mikro-orm.io/api/better-sqlite.md#quote) * [**raw](https://mikro-orm.io/api/better-sqlite.md#raw) * [**RawQueryFragment](https://mikro-orm.io/api/better-sqlite.md#RawQueryFragment) * [**ReadOnlyException](https://mikro-orm.io/api/better-sqlite.md#ReadOnlyException) * [**ref](https://mikro-orm.io/api/better-sqlite.md#ref) * [**Ref](https://mikro-orm.io/api/better-sqlite.md#Ref) * [**Reference](https://mikro-orm.io/api/better-sqlite.md#Reference) * [**ReferenceKind](https://mikro-orm.io/api/better-sqlite.md#ReferenceKind) * [**ReferenceOptions](https://mikro-orm.io/api/better-sqlite.md#ReferenceOptions) * [**ReflectMetadataProvider](https://mikro-orm.io/api/better-sqlite.md#ReflectMetadataProvider) * [**RefreshDatabaseOptions](https://mikro-orm.io/api/better-sqlite.md#RefreshDatabaseOptions) * [**RegisterOptions](https://mikro-orm.io/api/better-sqlite.md#RegisterOptions) * [**rel](https://mikro-orm.io/api/better-sqlite.md#rel) * [**Rel](https://mikro-orm.io/api/better-sqlite.md#Rel) * [**RequestContext](https://mikro-orm.io/api/better-sqlite.md#RequestContext) * [**RequiredEntityData](https://mikro-orm.io/api/better-sqlite.md#RequiredEntityData) * [**RequiredNullable](https://mikro-orm.io/api/better-sqlite.md#RequiredNullable) * [**RunQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#RunQueryBuilder) * [**Scalar](https://mikro-orm.io/api/better-sqlite.md#Scalar) * [**SCALAR\_TYPES](https://mikro-orm.io/api/better-sqlite.md#SCALAR_TYPES) * [**ScalarRef](https://mikro-orm.io/api/better-sqlite.md#ScalarRef) * [**ScalarReference](https://mikro-orm.io/api/better-sqlite.md#ScalarReference) * [**SchemaComparator](https://mikro-orm.io/api/better-sqlite.md#SchemaComparator) * [**SchemaDifference](https://mikro-orm.io/api/better-sqlite.md#SchemaDifference) * [**SchemaGenerator](https://mikro-orm.io/api/better-sqlite.md#SchemaGenerator) * [**SchemaHelper](https://mikro-orm.io/api/better-sqlite.md#SchemaHelper) * [**SeederOptions](https://mikro-orm.io/api/better-sqlite.md#SeederOptions) * [**Selected](https://mikro-orm.io/api/better-sqlite.md#Selected) * [**SelectQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#SelectQueryBuilder) * [**SerializationContext](https://mikro-orm.io/api/better-sqlite.md#SerializationContext) * [**serialize](https://mikro-orm.io/api/better-sqlite.md#serialize) * [**SerializedPrimaryKey](https://mikro-orm.io/api/better-sqlite.md#SerializedPrimaryKey) * [**SerializedPrimaryKeyOptions](https://mikro-orm.io/api/better-sqlite.md#SerializedPrimaryKeyOptions) * [**SerializeOptions](https://mikro-orm.io/api/better-sqlite.md#SerializeOptions) * [**ServerException](https://mikro-orm.io/api/better-sqlite.md#ServerException) * [**Settings](https://mikro-orm.io/api/better-sqlite.md#Settings) * [**SimpleColumnMeta](https://mikro-orm.io/api/better-sqlite.md#SimpleColumnMeta) * [**SimpleLogger](https://mikro-orm.io/api/better-sqlite.md#SimpleLogger) * [**SmallIntType](https://mikro-orm.io/api/better-sqlite.md#SmallIntType) * [**sql](https://mikro-orm.io/api/better-sqlite.md#sql) * [**SqlEntityManager](https://mikro-orm.io/api/better-sqlite.md#SqlEntityManager) * [**SqlEntityRepository](https://mikro-orm.io/api/better-sqlite.md#SqlEntityRepository) * [**SqliteKnexDialect](https://mikro-orm.io/api/better-sqlite.md#SqliteKnexDialect) * [**SqliteTableCompiler](https://mikro-orm.io/api/better-sqlite.md#SqliteTableCompiler) * [**SqlSchemaGenerator](https://mikro-orm.io/api/better-sqlite.md#SqlSchemaGenerator) * [**StringType](https://mikro-orm.io/api/better-sqlite.md#StringType) * [**SyncCacheAdapter](https://mikro-orm.io/api/better-sqlite.md#SyncCacheAdapter) * [**SyntaxErrorException](https://mikro-orm.io/api/better-sqlite.md#SyntaxErrorException) * [**t](https://mikro-orm.io/api/better-sqlite.md#t) * [**Table](https://mikro-orm.io/api/better-sqlite.md#Table) * [**TableDifference](https://mikro-orm.io/api/better-sqlite.md#TableDifference) * [**TableExistsException](https://mikro-orm.io/api/better-sqlite.md#TableExistsException) * [**TableNotFoundException](https://mikro-orm.io/api/better-sqlite.md#TableNotFoundException) * [**TextType](https://mikro-orm.io/api/better-sqlite.md#TextType) * [**TimeType](https://mikro-orm.io/api/better-sqlite.md#TimeType) * [**TinyIntType](https://mikro-orm.io/api/better-sqlite.md#TinyIntType) * [**Transaction](https://mikro-orm.io/api/better-sqlite.md#Transaction) * [**Transactional](https://mikro-orm.io/api/better-sqlite.md#Transactional) * [**TransactionContext](https://mikro-orm.io/api/better-sqlite.md#TransactionContext) * [**TransactionEventArgs](https://mikro-orm.io/api/better-sqlite.md#TransactionEventArgs) * [**TransactionEventBroadcaster](https://mikro-orm.io/api/better-sqlite.md#TransactionEventBroadcaster) * [**TransactionEventType](https://mikro-orm.io/api/better-sqlite.md#TransactionEventType) * [**TransactionManager](https://mikro-orm.io/api/better-sqlite.md#TransactionManager) * [**TransactionOptions](https://mikro-orm.io/api/better-sqlite.md#TransactionOptions) * [**TransactionPropagation](https://mikro-orm.io/api/better-sqlite.md#TransactionPropagation) * [**TransactionStateError](https://mikro-orm.io/api/better-sqlite.md#TransactionStateError) * [**TransformContext](https://mikro-orm.io/api/better-sqlite.md#TransformContext) * [**TruncateQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#TruncateQueryBuilder) * [**Type](https://mikro-orm.io/api/better-sqlite.md#Type) * [**TypeConfig](https://mikro-orm.io/api/better-sqlite.md#TypeConfig) * [**types](https://mikro-orm.io/api/better-sqlite.md#types) * [**Uint8ArrayType](https://mikro-orm.io/api/better-sqlite.md#Uint8ArrayType) * [**UmzugMigration](https://mikro-orm.io/api/better-sqlite.md#UmzugMigration) * [**UnboxArray](https://mikro-orm.io/api/better-sqlite.md#UnboxArray) * [**UnderscoreNamingStrategy](https://mikro-orm.io/api/better-sqlite.md#UnderscoreNamingStrategy) * [**Unique](https://mikro-orm.io/api/better-sqlite.md#Unique) * [**UniqueConstraintViolationException](https://mikro-orm.io/api/better-sqlite.md#UniqueConstraintViolationException) * [**UniqueOptions](https://mikro-orm.io/api/better-sqlite.md#UniqueOptions) * [**UnitOfWork](https://mikro-orm.io/api/better-sqlite.md#UnitOfWork) * [**UniversalPropertyKeys](https://mikro-orm.io/api/better-sqlite.md#UniversalPropertyKeys) * [**UnknownType](https://mikro-orm.io/api/better-sqlite.md#UnknownType) * [**UpdateOptions](https://mikro-orm.io/api/better-sqlite.md#UpdateOptions) * [**UpdateQueryBuilder](https://mikro-orm.io/api/better-sqlite.md#UpdateQueryBuilder) * [**UpdateSchemaOptions](https://mikro-orm.io/api/better-sqlite.md#UpdateSchemaOptions) * [**UpsertManyOptions](https://mikro-orm.io/api/better-sqlite.md#UpsertManyOptions) * [**UpsertOptions](https://mikro-orm.io/api/better-sqlite.md#UpsertOptions) * [**Utils](https://mikro-orm.io/api/better-sqlite.md#Utils) * [**UuidType](https://mikro-orm.io/api/better-sqlite.md#UuidType) * [**ValidationError](https://mikro-orm.io/api/better-sqlite.md#ValidationError) * [**wrap](https://mikro-orm.io/api/better-sqlite.md#wrap) * [**WrappedEntity](https://mikro-orm.io/api/better-sqlite.md#WrappedEntity) ### Classes * [**BetterSqliteConnection](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteConnection.md) * [**BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md) * [**BetterSqliteExceptionConverter](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteExceptionConverter.md) * [**BetterSqlitePlatform](https://mikro-orm.io/api/better-sqlite/class/BetterSqlitePlatform.md) * [**BetterSqliteSchemaHelper](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteSchemaHelper.md) * [**MikroORM](https://mikro-orm.io/api/better-sqlite/class/MikroORM.md) ### Type Aliases * [**Options](https://mikro-orm.io/api/better-sqlite.md#Options) ### Functions * [**defineConfig](https://mikro-orm.io/api/better-sqlite/function/defineConfig.md) ## References[**](#References) ### [**](#AbstractNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L6)AbstractNamingStrategy Re-exports [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) ### [**](#AbstractSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L17)AbstractSchemaGenerator Re-exports [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md) ### [**](#AbstractSqlConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L28)AbstractSqlConnection Re-exports [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) ### [**](#AbstractSqlDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L68)AbstractSqlDriver Re-exports [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md) ### [**](#AbstractSqlPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L7)AbstractSqlPlatform Re-exports [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#AfterCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L20)AfterCreate Re-exports [AfterCreate](https://mikro-orm.io/api/core/function/AfterCreate.md) ### [**](#AfterDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L58)AfterDelete Re-exports [AfterDelete](https://mikro-orm.io/api/core/function/AfterDelete.md) ### [**](#AfterUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L28)AfterUpdate Re-exports [AfterUpdate](https://mikro-orm.io/api/core/function/AfterUpdate.md) ### [**](#AfterUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L36)AfterUpsert Re-exports [AfterUpsert](https://mikro-orm.io/api/core/function/AfterUpsert.md) ### [**](#Alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilderHelper.ts#L982)Alias Re-exports [Alias](https://mikro-orm.io/api/knex/interface/Alias.md) ### [**](#AnyEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)AnyEntity Re-exports [AnyEntity](https://mikro-orm.io/api/core.md#AnyEntity) ### [**](#AnyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)AnyString Re-exports [AnyString](https://mikro-orm.io/api/core.md#AnyString) ### [**](#ARRAY_OPERATORS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L55)ARRAY\_OPERATORS Re-exports [ARRAY\_OPERATORS](https://mikro-orm.io/api/core.md#ARRAY_OPERATORS) ### [**](#ArrayCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L9)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L511)ArrayCollection Re-exports [ArrayCollection](https://mikro-orm.io/api/core/class/ArrayCollection.md) ### [**](#ArrayType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)ArrayType Re-exports [ArrayType](https://mikro-orm.io/api/core/class/ArrayType.md) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L311)assign Re-exports [assign](https://mikro-orm.io/api/core/function/assign.md) ### [**](#AssignOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L313)AssignOptions Re-exports [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md) ### [**](#AutoPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)AutoPath Re-exports [AutoPath](https://mikro-orm.io/api/core.md#AutoPath) ### [**](#BaseEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L9)BaseEntity Re-exports [BaseEntity](https://mikro-orm.io/api/core/class/BaseEntity.md) ### [**](#BaseSqliteConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L7)BaseSqliteConnection Re-exports [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) ### [**](#BaseSqlitePlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L4)BaseSqlitePlatform Re-exports [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) ### [**](#BaseSqliteSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L6)BaseSqliteSchemaHelper Re-exports [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) ### [**](#BeforeCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L16)BeforeCreate Re-exports [BeforeCreate](https://mikro-orm.io/api/core/function/BeforeCreate.md) ### [**](#BeforeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L51)BeforeDelete Re-exports [BeforeDelete](https://mikro-orm.io/api/core/function/BeforeDelete.md) ### [**](#BeforeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L24)BeforeUpdate Re-exports [BeforeUpdate](https://mikro-orm.io/api/core/function/BeforeUpdate.md) ### [**](#BeforeUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L32)BeforeUpsert Re-exports [BeforeUpsert](https://mikro-orm.io/api/core/function/BeforeUpsert.md) ### [**](#BetterSqliteKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BetterSqliteKnexDialect.ts#L4)BetterSqliteKnexDialect Re-exports [BetterSqliteKnexDialect](https://mikro-orm.io/api/knex/class/BetterSqliteKnexDialect.md) ### [**](#BigIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)BigIntType Re-exports [BigIntType](https://mikro-orm.io/api/core/class/BigIntType.md) ### [**](#BlobType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)BlobType Re-exports [BlobType](https://mikro-orm.io/api/core/class/BlobType.md) ### [**](#BooleanType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)BooleanType Re-exports [BooleanType](https://mikro-orm.io/api/core/class/BooleanType.md) ### [**](#CacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L1)CacheAdapter Re-exports [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) ### [**](#Cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L131)Cascade Re-exports [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md) ### [**](#Cast)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)Cast Re-exports [Cast](https://mikro-orm.io/api/core.md#Cast) ### [**](#ChangeSet)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L6)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L67)ChangeSet Re-exports [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md) ### [**](#ChangeSetComputer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetComputer.ts#L10)ChangeSetComputer Re-exports [ChangeSetComputer](https://mikro-orm.io/api/core/class/ChangeSetComputer.md) ### [**](#ChangeSetPersister)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L13)ChangeSetPersister Re-exports [ChangeSetPersister](https://mikro-orm.io/api/core/class/ChangeSetPersister.md) ### [**](#ChangeSetType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L79)ChangeSetType Re-exports [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md) ### [**](#CharacterType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)CharacterType Re-exports [CharacterType](https://mikro-orm.io/api/core/class/CharacterType.md) ### [**](#Check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Check.ts#L5)Check Re-exports [Check](https://mikro-orm.io/api/core/function/Check.md) ### [**](#CheckCallback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)CheckCallback Re-exports [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback) ### [**](#CheckConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L70)CheckConstraintViolationException Re-exports [CheckConstraintViolationException](https://mikro-orm.io/api/core/class/CheckConstraintViolationException.md) ### [**](#CheckDef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L100)CheckDef Re-exports [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md) ### [**](#CheckOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Check.ts#L19)CheckOptions Re-exports [CheckOptions](https://mikro-orm.io/api/core.md#CheckOptions) ### [**](#ClearDatabaseOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)ClearDatabaseOptions Re-exports [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) ### [**](#Collection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L31)Collection Re-exports [Collection](https://mikro-orm.io/api/core/class/Collection.md) ### [**](#Column)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L54)Column Re-exports [Column](https://mikro-orm.io/api/knex/interface/Column.md) ### [**](#ColumnDifference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L107)ColumnDifference Re-exports [ColumnDifference](https://mikro-orm.io/api/knex/interface/ColumnDifference.md) ### [**](#compareArrays)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L107)compareArrays Re-exports [compareArrays](https://mikro-orm.io/api/core/function/compareArrays.md) ### [**](#compareBooleans)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L124)compareBooleans Re-exports [compareBooleans](https://mikro-orm.io/api/core/function/compareBooleans.md) ### [**](#compareBuffers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L131)compareBuffers Re-exports [compareBuffers](https://mikro-orm.io/api/core/function/compareBuffers.md) ### [**](#compareObjects)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L49)compareObjects Re-exports [compareObjects](https://mikro-orm.io/api/core/function/compareObjects.md) ### [**](#Config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)Config Re-exports [Config](https://mikro-orm.io/api/core.md#Config) ### [**](#Configuration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L46)Configuration Re-exports [Configuration](https://mikro-orm.io/api/core/class/Configuration.md) ### [**](#Connection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L10)Connection Re-exports [Connection](https://mikro-orm.io/api/core/class/Connection.md) ### [**](#ConnectionConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L182)ConnectionConfig Re-exports [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#ConnectionException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L27)ConnectionException Re-exports [ConnectionException](https://mikro-orm.io/api/core/class/ConnectionException.md) ### [**](#ConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L513)ConnectionOptions Re-exports [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) ### [**](#ConnectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)ConnectionType Re-exports [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) ### [**](#ConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L37)ConstraintViolationException Re-exports [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) ### [**](#Constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Constructor Re-exports [Constructor](https://mikro-orm.io/api/core.md#Constructor) ### [**](#CountOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L243)CountOptions Re-exports [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md) ### [**](#CountQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2031)CountQueryBuilder Re-exports [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md) ### [**](#CreateContextOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L72)CreateContextOptions Re-exports [CreateContextOptions](https://mikro-orm.io/api/core/interface/CreateContextOptions.md) ### [**](#CreateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2406)CreateOptions Re-exports [CreateOptions](https://mikro-orm.io/api/core/interface/CreateOptions.md) ### [**](#CreateRequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/CreateRequestContext.ts#L6)CreateRequestContext Re-exports [CreateRequestContext](https://mikro-orm.io/api/core/function/CreateRequestContext.md) ### [**](#CreateSchemaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)CreateSchemaOptions Re-exports [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) ### [**](#createSqlFunction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L253)createSqlFunction Re-exports [createSqlFunction](https://mikro-orm.io/api/core/function/createSqlFunction.md) ### [**](#Cursor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L58)Cursor Re-exports [Cursor](https://mikro-orm.io/api/core/class/Cursor.md) ### [**](#CursorError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L138)CursorError Re-exports [CursorError](https://mikro-orm.io/api/core/class/CursorError.md) ### [**](#DatabaseDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L40)DatabaseDriver Re-exports [DatabaseDriver](https://mikro-orm.io/api/core/class/DatabaseDriver.md) ### [**](#DatabaseObjectExistsException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L46)DatabaseObjectExistsException Re-exports [DatabaseObjectExistsException](https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md) ### [**](#DatabaseObjectNotFoundException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L55)DatabaseObjectNotFoundException Re-exports [DatabaseObjectNotFoundException](https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md) ### [**](#DataloaderType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L149)DataloaderType Re-exports [DataloaderType](https://mikro-orm.io/api/core/enum/DataloaderType.md) ### [**](#DataloaderUtils)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L10)DataloaderUtils Re-exports [DataloaderUtils](https://mikro-orm.io/api/core/class/DataloaderUtils.md) ### [**](#DateTimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)DateTimeType Re-exports [DateTimeType](https://mikro-orm.io/api/core/class/DateTimeType.md) ### [**](#DateType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)DateType Re-exports [DateType](https://mikro-orm.io/api/core/class/DateType.md) ### [**](#DeadlockException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L60)DeadlockException Re-exports [DeadlockException](https://mikro-orm.io/api/core/class/DeadlockException.md) ### [**](#DecimalType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)DecimalType Re-exports [DecimalType](https://mikro-orm.io/api/core/class/DecimalType.md) ### [**](#DeepPartial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)DeepPartial Re-exports [DeepPartial](https://mikro-orm.io/api/core.md#DeepPartial) ### [**](#DefaultLogger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L5)DefaultLogger Re-exports [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) ### [**](#DeferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L228)DeferMode Re-exports [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) ### [**](#DefineConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)DefineConfig Re-exports [DefineConfig](https://mikro-orm.io/api/core.md#DefineConfig) ### [**](#defineEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L702)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L712)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L720)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L757)defineEntity Re-exports [defineEntity](https://mikro-orm.io/api/core/function/defineEntity.md) ### [**](#DefineEntityHooks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L760)DefineEntityHooks Re-exports [DefineEntityHooks](https://mikro-orm.io/api/core/interface/DefineEntityHooks.md) ### [**](#DeleteOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L273)DeleteOptions Re-exports [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md) ### [**](#DeleteQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2043)DeleteQueryBuilder Re-exports [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md) ### [**](#Dictionary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Dictionary Re-exports [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#DoubleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)DoubleType Re-exports [DoubleType](https://mikro-orm.io/api/core/class/DoubleType.md) ### [**](#DriverException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L6)DriverException Re-exports [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#DriverMethodOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L288)DriverMethodOptions Re-exports [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) ### [**](#DropSchemaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)DropSchemaOptions Re-exports [DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md) ### [**](#DynamicPassword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L508)DynamicPassword Re-exports [DynamicPassword](https://mikro-orm.io/api/core/interface/DynamicPassword.md) ### [**](#EagerProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)EagerProps Re-exports [EagerProps](https://mikro-orm.io/api/core.md#EagerProps) ### [**](#Edge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L16)Edge Re-exports [Edge](https://mikro-orm.io/api/core/interface/Edge.md) ### [**](#Embeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embeddable.ts#L4)Embeddable Re-exports [Embeddable](https://mikro-orm.io/api/core/function/Embeddable.md) ### [**](#EmbeddableOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embeddable.ts#L16)EmbeddableOptions Re-exports [EmbeddableOptions](https://mikro-orm.io/api/core.md#EmbeddableOptions) ### [**](#Embedded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L7)Embedded Re-exports [Embedded](https://mikro-orm.io/api/core/function/Embedded.md) ### [**](#EmbeddedOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L26)EmbeddedOptions Re-exports [EmbeddedOptions](https://mikro-orm.io/api/core/interface/EmbeddedOptions.md) ### [**](#EmbeddedPrefixMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L24)EmbeddedPrefixMode Re-exports [EmbeddedPrefixMode](https://mikro-orm.io/api/core.md#EmbeddedPrefixMode) ### [**](#EmptyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L613)EmptyOptions Re-exports [EmptyOptions](https://mikro-orm.io/api/core/interface/EmptyOptions.md) ### [**](#EnsureDatabaseOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)EnsureDatabaseOptions Re-exports [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) ### [**](#EnsureRequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/CreateRequestContext.ts#L35)EnsureRequestContext Re-exports [EnsureRequestContext](https://mikro-orm.io/api/core/function/EnsureRequestContext.md) ### [**](#Entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Entity.ts#L6)Entity Re-exports [Entity](https://mikro-orm.io/api/core/function/Entity.md) ### [**](#EntityAssigner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L28)EntityAssigner Re-exports [EntityAssigner](https://mikro-orm.io/api/core/class/EntityAssigner.md) ### [**](#EntityCaseNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L6)EntityCaseNamingStrategy Re-exports [EntityCaseNamingStrategy](https://mikro-orm.io/api/core/class/EntityCaseNamingStrategy.md) ### [**](#EntityClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)EntityClass Re-exports [EntityClass](https://mikro-orm.io/api/core.md#EntityClass) ### [**](#EntityClassGroup)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)EntityClassGroup Re-exports [EntityClassGroup](https://mikro-orm.io/api/core.md#EntityClassGroup) ### [**](#EntityComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L25)EntityComparator Re-exports [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) ### [**](#EntityData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)EntityData Re-exports [EntityData](https://mikro-orm.io/api/core.md#EntityData) ### [**](#EntityDataValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityDataValue Re-exports [EntityDataValue](https://mikro-orm.io/api/core.md#EntityDataValue) ### [**](#EntityDictionary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)EntityDictionary Re-exports [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary) ### [**](#EntityDTO)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)EntityDTO Re-exports [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO) ### [**](#EntityFactory)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L47)EntityFactory Re-exports [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) ### [**](#EntityField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L94)EntityField Re-exports [EntityField](https://mikro-orm.io/api/core.md#EntityField) ### [**](#EntityKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityKey Re-exports [EntityKey](https://mikro-orm.io/api/core.md#EntityKey) ### [**](#EntityLoader)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L55)EntityLoader Re-exports [EntityLoader](https://mikro-orm.io/api/core/class/EntityLoader.md) ### [**](#EntityLoaderOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L36)EntityLoaderOptions Re-exports [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions) ### [**](#EntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/index.ts#L16)EntityManager Re-exports [EntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md) ### [**](#EntityManagerType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L16)EntityManagerType Re-exports [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType) ### [**](#EntityMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)EntityMetadata Re-exports [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md) ### [**](#EntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)EntityName Re-exports [EntityName](https://mikro-orm.io/api/core.md#EntityName) ### [**](#EntityOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Entity.ts#L18)EntityOptions Re-exports [EntityOptions](https://mikro-orm.io/api/core.md#EntityOptions) ### [**](#EntityProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)EntityProperty Re-exports [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md) ### [**](#EntityProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)EntityProps Re-exports [EntityProps](https://mikro-orm.io/api/core.md#EntityProps) ### [**](#EntityRef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)EntityRef Re-exports [EntityRef](https://mikro-orm.io/api/core.md#EntityRef) ### [**](#EntityRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/index.ts#L17)EntityRepository Re-exports [EntityRepository](https://mikro-orm.io/api/knex/class/EntityRepository.md) ### [**](#EntityRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)EntityRepositoryType Re-exports [EntityRepositoryType](https://mikro-orm.io/api/core.md#EntityRepositoryType) ### [**](#EntitySchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L53)EntitySchema Re-exports [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md) ### [**](#EntitySchemaMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L47)EntitySchemaMetadata Re-exports [EntitySchemaMetadata](https://mikro-orm.io/api/core.md#EntitySchemaMetadata) ### [**](#EntitySchemaProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L38)EntitySchemaProperty Re-exports [EntitySchemaProperty](https://mikro-orm.io/api/core.md#EntitySchemaProperty) ### [**](#EntitySerializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L59)EntitySerializer Re-exports [EntitySerializer](https://mikro-orm.io/api/core/class/EntitySerializer.md) ### [**](#EntityTransformer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntityTransformer.ts#L27)EntityTransformer Re-exports [EntityTransformer](https://mikro-orm.io/api/core/class/EntityTransformer.md) ### [**](#EntityType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityType Re-exports [EntityType](https://mikro-orm.io/api/core.md#EntityType) ### [**](#EntityValidator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L8)EntityValidator Re-exports [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) ### [**](#EntityValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityValue Re-exports [EntityValue](https://mikro-orm.io/api/core.md#EntityValue) ### [**](#Enum)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L7)Enum Re-exports [Enum](https://mikro-orm.io/api/core/function/Enum.md) ### [**](#EnumArrayType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)EnumArrayType Re-exports [EnumArrayType](https://mikro-orm.io/api/core/class/EnumArrayType.md) ### [**](#EnumOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L22)EnumOptions Re-exports [EnumOptions](https://mikro-orm.io/api/core/interface/EnumOptions.md) ### [**](#EnumType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)EnumType Re-exports [EnumType](https://mikro-orm.io/api/core/class/EnumType.md) ### [**](#equals)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L150)equals Re-exports [equals](https://mikro-orm.io/api/core/function/equals.md) ### [**](#EventArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L6)EventArgs Re-exports [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md) ### [**](#EventManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L6)EventManager Re-exports [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) ### [**](#EventSubscriber)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L22)EventSubscriber Re-exports [EventSubscriber](https://mikro-orm.io/api/core/interface/EventSubscriber.md) ### [**](#EventType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L175)EventType Re-exports [EventType](https://mikro-orm.io/api/core/enum/EventType.md) ### [**](#EventTypeMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L197)EventTypeMap Re-exports [EventTypeMap](https://mikro-orm.io/api/core.md#EventTypeMap) ### [**](#ExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/ExceptionConverter.ts#L4)ExceptionConverter Re-exports [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#ExecuteOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L51)ExecuteOptions Re-exports [ExecuteOptions](https://mikro-orm.io/api/knex/interface/ExecuteOptions.md) ### [**](#ExpandHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandHint Re-exports [ExpandHint](https://mikro-orm.io/api/core.md#ExpandHint) ### [**](#ExpandProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandProperty Re-exports [ExpandProperty](https://mikro-orm.io/api/core.md#ExpandProperty) ### [**](#ExpandQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandQuery Re-exports [ExpandQuery](https://mikro-orm.io/api/core.md#ExpandQuery) ### [**](#ExpandScalar)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandScalar Re-exports [ExpandScalar](https://mikro-orm.io/api/core.md#ExpandScalar) ### [**](#FactoryOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L30)FactoryOptions Re-exports [FactoryOptions](https://mikro-orm.io/api/core/interface/FactoryOptions.md) ### [**](#Field)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L31)Field Re-exports [Field](https://mikro-orm.io/api/knex.md#Field) ### [**](#FileCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L8)FileCacheAdapter Re-exports [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md) ### [**](#Filter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Filter.ts#L4)Filter Re-exports [Filter](https://mikro-orm.io/api/core/function/Filter.md) ### [**](#FilterItemValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)FilterItemValue Re-exports [FilterItemValue](https://mikro-orm.io/api/core.md#FilterItemValue) ### [**](#FilterKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)FilterKey Re-exports [FilterKey](https://mikro-orm.io/api/core.md#FilterKey) ### [**](#FilterObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)FilterObject Re-exports [FilterObject](https://mikro-orm.io/api/core.md#FilterObject) ### [**](#FilterOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L102)FilterOptions Re-exports [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#FilterQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)FilterQuery Re-exports [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery) ### [**](#FilterValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)FilterValue Re-exports [FilterValue](https://mikro-orm.io/api/core.md#FilterValue) ### [**](#FindAllOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L98)FindAllOptions Re-exports [FindAllOptions](https://mikro-orm.io/api/core/interface/FindAllOptions.md) ### [**](#FindByCursorOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L204)FindByCursorOptions Re-exports [FindByCursorOptions](https://mikro-orm.io/api/core/interface/FindByCursorOptions.md) ### [**](#FindOneOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L208)FindOneOptions Re-exports [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md) ### [**](#FindOneOrFailOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L213)FindOneOrFailOptions Re-exports [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md) ### [**](#FindOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L115)FindOptions Re-exports [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md) ### [**](#FlatQueryOrderMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L102)FlatQueryOrderMap Re-exports [FlatQueryOrderMap](https://mikro-orm.io/api/core/interface/FlatQueryOrderMap.md) ### [**](#FloatType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)FloatType Re-exports [FloatType](https://mikro-orm.io/api/core/class/FloatType.md) ### [**](#FlushEventArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L13)FlushEventArgs Re-exports [FlushEventArgs](https://mikro-orm.io/api/core/interface/FlushEventArgs.md) ### [**](#FlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L5)FlushMode Re-exports [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) ### [**](#ForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L76)ForeignKey Re-exports [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) ### [**](#ForeignKeyConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L65)ForeignKeyConstraintViolationException Re-exports [ForeignKeyConstraintViolationException](https://mikro-orm.io/api/core/class/ForeignKeyConstraintViolationException.md) ### [**](#ForkOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2434)ForkOptions Re-exports [ForkOptions](https://mikro-orm.io/api/core/interface/ForkOptions.md) ### [**](#Formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Formula.ts#L7)Formula Re-exports [Formula](https://mikro-orm.io/api/core/function/Formula.md) ### [**](#FormulaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Formula.ts#L21)FormulaOptions Re-exports [FormulaOptions](https://mikro-orm.io/api/core/interface/FormulaOptions.md) ### [**](#FromEntityType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)FromEntityType Re-exports [FromEntityType](https://mikro-orm.io/api/core.md#FromEntityType) ### [**](#GeneratedCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L4)GeneratedCacheAdapter Re-exports [GeneratedCacheAdapter](https://mikro-orm.io/api/core/class/GeneratedCacheAdapter.md) ### [**](#GenerateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)GenerateOptions Re-exports [GenerateOptions](https://mikro-orm.io/api/core/interface/GenerateOptions.md) ### [**](#GetReferenceOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L294)GetReferenceOptions Re-exports [GetReferenceOptions](https://mikro-orm.io/api/core/interface/GetReferenceOptions.md) ### [**](#GetRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)GetRepository Re-exports [GetRepository](https://mikro-orm.io/api/core.md#GetRepository) ### [**](#GroupOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L24)GroupOperator Re-exports [GroupOperator](https://mikro-orm.io/api/core/enum/GroupOperator.md) ### [**](#Hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)Hidden Re-exports [Hidden](https://mikro-orm.io/api/core.md#Hidden) ### [**](#HiddenProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)HiddenProps Re-exports [HiddenProps](https://mikro-orm.io/api/core.md#HiddenProps) ### [**](#Highlighter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Highlighter Re-exports [Highlighter](https://mikro-orm.io/api/core/interface/Highlighter.md) ### [**](#Hydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L8)Hydrator Re-exports [Hydrator](https://mikro-orm.io/api/core/class/Hydrator.md) ### [**](#IConfiguration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L6)IConfiguration Re-exports [IConfiguration](https://mikro-orm.io/api/core/interface/IConfiguration.md) ### [**](#ICriteriaNode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L196)ICriteriaNode Re-exports [ICriteriaNode](https://mikro-orm.io/api/knex/interface/ICriteriaNode.md) ### [**](#ICriteriaNodeProcessOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L187)ICriteriaNodeProcessOptions Re-exports [ICriteriaNodeProcessOptions](https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md) ### [**](#IDatabaseDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L18)IDatabaseDriver Re-exports [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md) ### [**](#IdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L3)IdentityMap Re-exports [IdentityMap](https://mikro-orm.io/api/core/class/IdentityMap.md) ### [**](#IEntityGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)IEntityGenerator Re-exports [IEntityGenerator](https://mikro-orm.io/api/core/interface/IEntityGenerator.md) ### [**](#IMigrationGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)IMigrationGenerator Re-exports [IMigrationGenerator](https://mikro-orm.io/api/core/interface/IMigrationGenerator.md) ### [**](#IMigrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)IMigrator Re-exports [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) ### [**](#ImportsResolver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)ImportsResolver Re-exports [ImportsResolver](https://mikro-orm.io/api/core.md#ImportsResolver) ### [**](#Index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L21)Index Re-exports [Index](https://mikro-orm.io/api/core/function/Index.md) ### [**](#IndexCallback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)IndexCallback Re-exports [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback) ### [**](#IndexDef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L87)IndexDef Re-exports [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) ### [**](#IndexOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L42)IndexOptions Re-exports [IndexOptions](https://mikro-orm.io/api/core/interface/IndexOptions.md) ### [**](#InferEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L856)InferEntity Re-exports [InferEntity](https://mikro-orm.io/api/core.md#InferEntity) ### [**](#InferEntityFromProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L798)InferEntityFromProperties Re-exports [InferEntityFromProperties](https://mikro-orm.io/api/core.md#InferEntityFromProperties) ### [**](#InferPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L810)InferPrimaryKey Re-exports [InferPrimaryKey](https://mikro-orm.io/api/core.md#InferPrimaryKey) ### [**](#InitCollectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L496)InitCollectionOptions Re-exports [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md) ### [**](#InsertQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2039)InsertQueryBuilder Re-exports [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md) ### [**](#IntegerType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)IntegerType Re-exports [IntegerType](https://mikro-orm.io/api/core/class/IntegerType.md) ### [**](#IntervalType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)IntervalType Re-exports [IntervalType](https://mikro-orm.io/api/core/class/IntervalType.md) ### [**](#InvalidFieldNameException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L75)InvalidFieldNameException Re-exports [InvalidFieldNameException](https://mikro-orm.io/api/core/class/InvalidFieldNameException.md) ### [**](#IPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)IPrimaryKey Re-exports [IPrimaryKey](https://mikro-orm.io/api/core.md#IPrimaryKey) ### [**](#IQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L147)IQueryBuilder Re-exports [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md) ### [**](#ISchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)ISchemaGenerator Re-exports [ISchemaGenerator](https://mikro-orm.io/api/core/interface/ISchemaGenerator.md) ### [**](#ISeedManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)ISeedManager Re-exports [ISeedManager](https://mikro-orm.io/api/core/interface/ISeedManager.md) ### [**](#IsolationLevel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L167)IsolationLevel Re-exports [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) ### [**](#IsSubset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)IsSubset Re-exports [IsSubset](https://mikro-orm.io/api/core.md#IsSubset) ### [**](#IsUnknown)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)IsUnknown Re-exports [IsUnknown](https://mikro-orm.io/api/core.md#IsUnknown) ### [**](#IType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)IType Re-exports [IType](https://mikro-orm.io/api/core.md#IType) ### [**](#IWrappedEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)IWrappedEntity Re-exports [IWrappedEntity](https://mikro-orm.io/api/core/interface/IWrappedEntity.md) ### [**](#JoinOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L33)JoinOptions Re-exports [JoinOptions](https://mikro-orm.io/api/knex/interface/JoinOptions.md) ### [**](#JoinType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L11)JoinType Re-exports [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) ### [**](#JSON_KEY_OPERATORS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L67)JSON\_KEY\_OPERATORS Re-exports [JSON\_KEY\_OPERATORS](https://mikro-orm.io/api/core.md#JSON_KEY_OPERATORS) ### [**](#JsonProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L40)JsonProperty Re-exports [JsonProperty](https://mikro-orm.io/api/core.md#JsonProperty) ### [**](#JsonType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)JsonType Re-exports [JsonType](https://mikro-orm.io/api/core/class/JsonType.md) ### [**](#KnexStringRef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L25)KnexStringRef Re-exports [KnexStringRef](https://mikro-orm.io/api/knex.md#KnexStringRef) ### [**](#LibSqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L4)LibSqlKnexDialect Re-exports [LibSqlKnexDialect](https://mikro-orm.io/api/knex/class/LibSqlKnexDialect.md) ### [**](#LoadCountOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L502)LoadCountOptions Re-exports [LoadCountOptions](https://mikro-orm.io/api/core/interface/LoadCountOptions.md) ### [**](#Loaded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)Loaded Re-exports [Loaded](https://mikro-orm.io/api/core.md#Loaded) ### [**](#LoadedCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)LoadedCollection Re-exports [LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md) ### [**](#LoadedReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)LoadedReference Re-exports [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md) ### [**](#LoadHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L104)LoadHint Re-exports [LoadHint](https://mikro-orm.io/api/core/interface/LoadHint.md) ### [**](#LoadReferenceOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L301)LoadReferenceOptions Re-exports [LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md) ### [**](#LoadReferenceOrFailOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L305)LoadReferenceOrFailOptions Re-exports [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md) ### [**](#LoadStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L143)LoadStrategy Re-exports [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) ### [**](#LockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L156)LockMode Re-exports [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) ### [**](#LockOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L281)LockOptions Re-exports [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) ### [**](#LockWaitTimeoutException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L80)LockWaitTimeoutException Re-exports [LockWaitTimeoutException](https://mikro-orm.io/api/core/class/LockWaitTimeoutException.md) ### [**](#LogContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L36)LogContext Re-exports [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#Logger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L3)Logger Re-exports [Logger](https://mikro-orm.io/api/core/interface/Logger.md) ### [**](#LoggerNamespace)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L34)LoggerNamespace Re-exports [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) ### [**](#LoggerOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L52)LoggerOptions Re-exports [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) ### [**](#LoggingOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L69)LoggingOptions Re-exports [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) ### [**](#ManyToMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L7)ManyToMany Re-exports [ManyToMany](https://mikro-orm.io/api/core/function/ManyToMany.md) ### [**](#ManyToManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L23)ManyToManyOptions Re-exports [ManyToManyOptions](https://mikro-orm.io/api/core/interface/ManyToManyOptions.md) ### [**](#ManyToOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L7)ManyToOne Re-exports [ManyToOne](https://mikro-orm.io/api/core/function/ManyToOne.md) ### [**](#ManyToOneOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L22)ManyToOneOptions Re-exports [ManyToOneOptions](https://mikro-orm.io/api/core/interface/ManyToOneOptions.md) ### [**](#MariaDbKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MariaDbKnexDialect.ts#L3)MariaDbKnexDialect Re-exports [MariaDbKnexDialect](https://mikro-orm.io/api/knex/class/MariaDbKnexDialect.md) ### [**](#MatchingOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L25)MatchingOptions Re-exports [MatchingOptions](https://mikro-orm.io/api/core/interface/MatchingOptions.md) ### [**](#MaybePromise)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)MaybePromise Re-exports [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise) ### [**](#MediumIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)MediumIntType Re-exports [MediumIntType](https://mikro-orm.io/api/core/class/MediumIntType.md) ### [**](#MemoryCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L3)MemoryCacheAdapter Re-exports [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md) ### [**](#MergeLoaded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)MergeLoaded Re-exports [MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded) ### [**](#MergeOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2424)MergeOptions Re-exports [MergeOptions](https://mikro-orm.io/api/core/interface/MergeOptions.md) ### [**](#MergeSelected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)MergeSelected Re-exports [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected) ### [**](#MetadataDiscovery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L43)MetadataDiscovery Re-exports [MetadataDiscovery](https://mikro-orm.io/api/core/class/MetadataDiscovery.md) ### [**](#MetadataDiscoveryOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L577)MetadataDiscoveryOptions Re-exports [MetadataDiscoveryOptions](https://mikro-orm.io/api/core/interface/MetadataDiscoveryOptions.md) ### [**](#MetadataError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L172)MetadataError Re-exports [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md) ### [**](#MetadataProcessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)MetadataProcessor Re-exports [MetadataProcessor](https://mikro-orm.io/api/core.md#MetadataProcessor) ### [**](#MetadataProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L11)MetadataProvider Re-exports [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) ### [**](#MetadataStorage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L7)MetadataStorage Re-exports [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#MigrateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)MigrateOptions Re-exports [MigrateOptions](https://mikro-orm.io/api/core.md#MigrateOptions) ### [**](#MigrationDiff)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)MigrationDiff Re-exports [MigrationDiff](https://mikro-orm.io/api/core/interface/MigrationDiff.md) ### [**](#MigrationObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)MigrationObject Re-exports [MigrationObject](https://mikro-orm.io/api/core/interface/MigrationObject.md) ### [**](#MigrationResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)MigrationResult Re-exports [MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult) ### [**](#MigrationRow)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)MigrationRow Re-exports [MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow) ### [**](#MigrationsOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L529)MigrationsOptions Re-exports [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) ### [**](#MigratorEvent)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)MigratorEvent Re-exports [MigratorEvent](https://mikro-orm.io/api/core.md#MigratorEvent) ### [**](#MikroORMOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L593)MikroORMOptions Re-exports [MikroORMOptions](https://mikro-orm.io/api/core/interface/MikroORMOptions.md) ### [**](#ModifyContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L100)ModifyContext Re-exports [ModifyContext](https://mikro-orm.io/api/knex.md#ModifyContext) ### [**](#ModifyHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L98)ModifyHint Re-exports [ModifyHint](https://mikro-orm.io/api/knex.md#ModifyHint) ### [**](#MongoNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L3)MongoNamingStrategy Re-exports [MongoNamingStrategy](https://mikro-orm.io/api/core/class/MongoNamingStrategy.md) ### [**](#MonkeyPatchable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/MonkeyPatchable.ts#L38)MonkeyPatchable Re-exports [MonkeyPatchable](https://mikro-orm.io/api/knex.md#MonkeyPatchable) ### [**](#MsSqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mssql/MsSqlKnexDialect.ts#L6)MsSqlKnexDialect Re-exports [MsSqlKnexDialect](https://mikro-orm.io/api/knex/class/MsSqlKnexDialect.md) ### [**](#MySqlConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlConnection.ts#L5)MySqlConnection Re-exports [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) ### [**](#MySqlExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlExceptionConverter.ts#L7)MySqlExceptionConverter Re-exports [MySqlExceptionConverter](https://mikro-orm.io/api/knex/class/MySqlExceptionConverter.md) ### [**](#MySqlIncrementOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L213)MySqlIncrementOptions Re-exports [MySqlIncrementOptions](https://mikro-orm.io/api/knex.md#MySqlIncrementOptions) ### [**](#MySqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlKnexDialect.ts#L5)MySqlKnexDialect Re-exports [MySqlKnexDialect](https://mikro-orm.io/api/knex/class/MySqlKnexDialect.md) ### [**](#MySqlPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L16)MySqlPlatform Re-exports [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) ### [**](#MySqlSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L9)MySqlSchemaHelper Re-exports [MySqlSchemaHelper](https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md) ### [**](#MySqlTableBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L215)MySqlTableBuilder Re-exports [MySqlTableBuilder](https://mikro-orm.io/api/knex/interface/MySqlTableBuilder.md) ### [**](#NamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L3)NamingStrategy Re-exports [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#NativeDeleteOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L277)NativeDeleteOptions Re-exports [NativeDeleteOptions](https://mikro-orm.io/api/core/interface/NativeDeleteOptions.md) ### [**](#NativeInsertUpdateManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L227)NativeInsertUpdateManyOptions Re-exports [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md) ### [**](#NativeInsertUpdateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L218)NativeInsertUpdateOptions Re-exports [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md) ### [**](#New)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)New Re-exports [New](https://mikro-orm.io/api/core.md#New) ### [**](#Node)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L10)Node Re-exports [Node](https://mikro-orm.io/api/core/interface/Node.md) ### [**](#NodeState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L4)NodeState Re-exports [NodeState](https://mikro-orm.io/api/core/enum/NodeState.md) ### [**](#NoInfer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)NoInfer Re-exports [NoInfer](https://mikro-orm.io/api/core.md#NoInfer) ### [**](#NonUniqueFieldNameException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L85)NonUniqueFieldNameException Re-exports [NonUniqueFieldNameException](https://mikro-orm.io/api/core/class/NonUniqueFieldNameException.md) ### [**](#NotFoundError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L293)NotFoundError Re-exports [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md) ### [**](#NotNullConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L90)NotNullConstraintViolationException Re-exports [NotNullConstraintViolationException](https://mikro-orm.io/api/core/class/NotNullConstraintViolationException.md) ### [**](#NullCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/NullCacheAdapter.ts#L3)NullCacheAdapter Re-exports [NullCacheAdapter](https://mikro-orm.io/api/core/class/NullCacheAdapter.md) ### [**](#NullHighlighter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/NullHighlighter.ts#L3)NullHighlighter Re-exports [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md) ### [**](#ObjectBindingPattern)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L27)ObjectBindingPattern Re-exports [ObjectBindingPattern](https://mikro-orm.io/api/core.md#ObjectBindingPattern) ### [**](#ObjectHydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/ObjectHydrator.ts#L12)ObjectHydrator Re-exports [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md) ### [**](#ObjectQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)ObjectQuery Re-exports [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery) ### [**](#OneToMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/index.ts#L7)OneToMany Re-exports [OneToMany](https://mikro-orm.io/api/core/function/OneToMany.md) ### [**](#OneToManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/index.ts#L7)OneToManyOptions Re-exports [OneToManyOptions](https://mikro-orm.io/api/core/interface/OneToManyOptions.md) ### [**](#OneToOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L5)OneToOne Re-exports [OneToOne](https://mikro-orm.io/api/core/function/OneToOne.md) ### [**](#OneToOneOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L15)OneToOneOptions Re-exports [OneToOneOptions](https://mikro-orm.io/api/core/interface/OneToOneOptions.md) ### [**](#OnInit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L40)OnInit Re-exports [OnInit](https://mikro-orm.io/api/core/function/OnInit.md) ### [**](#OnLoad)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L44)OnLoad Re-exports [OnLoad](https://mikro-orm.io/api/core/function/OnLoad.md) ### [**](#Opt)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)Opt Re-exports [Opt](https://mikro-orm.io/api/core.md#Opt) ### [**](#OptimisticLockError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L150)OptimisticLockError Re-exports [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md) ### [**](#OptionalProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)OptionalProps Re-exports [OptionalProps](https://mikro-orm.io/api/core.md#OptionalProps) ### [**](#OrderDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L96)OrderDefinition Re-exports [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition) ### [**](#p)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L758)p Re-exports [p](https://mikro-orm.io/api/core.md#p) ### [**](#parseJsonSafe)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L172)parseJsonSafe Re-exports [parseJsonSafe](https://mikro-orm.io/api/core/function/parseJsonSafe.md) ### [**](#PlainObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L225)PlainObject Re-exports [PlainObject](https://mikro-orm.io/api/core/class/PlainObject.md) ### [**](#Platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L42)Platform Re-exports [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#PoolConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L557)PoolConfig Re-exports [PoolConfig](https://mikro-orm.io/api/core/interface/PoolConfig.md) ### [**](#Populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)Populate Re-exports [Populate](https://mikro-orm.io/api/core.md#Populate) ### [**](#PopulateHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L14)PopulateHint Re-exports [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) ### [**](#PopulateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)PopulateOptions Re-exports [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions) ### [**](#PopulatePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L19)PopulatePath Re-exports [PopulatePath](https://mikro-orm.io/api/core/enum/PopulatePath.md) ### [**](#PostgreSqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/postgresql/PostgreSqlKnexDialect.ts#L6)PostgreSqlKnexDialect Re-exports [PostgreSqlKnexDialect](https://mikro-orm.io/api/knex/class/PostgreSqlKnexDialect.md) ### [**](#Primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Primary Re-exports [Primary](https://mikro-orm.io/api/core.md#Primary) ### [**](#PrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L19)PrimaryKey Re-exports [PrimaryKey](https://mikro-orm.io/api/core/function/PrimaryKey.md) ### [**](#PrimaryKeyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L27)PrimaryKeyOptions Re-exports [PrimaryKeyOptions](https://mikro-orm.io/api/core/interface/PrimaryKeyOptions.md) ### [**](#PrimaryKeyProp)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)PrimaryKeyProp Re-exports [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp) ### [**](#Property)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L19)Property Re-exports [Property](https://mikro-orm.io/api/core/function/Property.md) ### [**](#PropertyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L54)PropertyOptions Re-exports [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md) ### [**](#QBField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L114)QBField Re-exports [QBField](https://mikro-orm.io/api/knex.md#QBField) ### [**](#QBField2)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L115)QBField2 Re-exports [QBField2](https://mikro-orm.io/api/knex.md#QBField2) ### [**](#QBFilterQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)QBFilterQuery Re-exports [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) ### [**](#QBQueryOrderMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L100)QBQueryOrderMap Re-exports [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap) ### [**](#QueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L138)QueryBuilder Re-exports [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md) ### [**](#QueryFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L106)QueryFlag Re-exports [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) ### [**](#QueryOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L29)QueryOperator Re-exports [QueryOperator](https://mikro-orm.io/api/core/enum/QueryOperator.md) ### [**](#QueryOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L73)QueryOrder Re-exports [QueryOrder](https://mikro-orm.io/api/core/enum/QueryOrder.md) ### [**](#QueryOrderKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L94)QueryOrderKeys Re-exports [QueryOrderKeys](https://mikro-orm.io/api/core.md#QueryOrderKeys) ### [**](#QueryOrderKeysFlat)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L93)QueryOrderKeysFlat Re-exports [QueryOrderKeysFlat](https://mikro-orm.io/api/core.md#QueryOrderKeysFlat) ### [**](#QueryOrderMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L96)QueryOrderMap Re-exports [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap) ### [**](#QueryOrderNumeric)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L88)QueryOrderNumeric Re-exports [QueryOrderNumeric](https://mikro-orm.io/api/core/enum/QueryOrderNumeric.md) ### [**](#QueryResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L174)QueryResult Re-exports [QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md) ### [**](#QueryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L1)QueryType Re-exports [QueryType](https://mikro-orm.io/api/knex/enum/QueryType.md) ### [**](#quote)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L279)quote Re-exports [quote](https://mikro-orm.io/api/core/function/quote.md) ### [**](#raw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/index.ts#L9)raw Re-exports [raw](https://mikro-orm.io/api/knex/function/raw.md) ### [**](#RawQueryFragment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L6)RawQueryFragment Re-exports [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ### [**](#ReadOnlyException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L95)ReadOnlyException Re-exports [ReadOnlyException](https://mikro-orm.io/api/core/class/ReadOnlyException.md) ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L312)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L317)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L322)ref Re-exports [ref](https://mikro-orm.io/api/core/function/ref.md) ### [**](#Ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)Ref Re-exports [Ref](https://mikro-orm.io/api/core.md#Ref) ### [**](#Reference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L21)Reference Re-exports [Reference](https://mikro-orm.io/api/core/class/Reference.md) ### [**](#ReferenceKind)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L122)ReferenceKind Re-exports [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) ### [**](#ReferenceOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L331)ReferenceOptions Re-exports [ReferenceOptions](https://mikro-orm.io/api/core/interface/ReferenceOptions.md) ### [**](#ReflectMetadataProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/ReflectMetadataProvider.ts#L7)ReflectMetadataProvider Re-exports [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md) ### [**](#RefreshDatabaseOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)RefreshDatabaseOptions Re-exports [RefreshDatabaseOptions](https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md) ### [**](#RegisterOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L1269)RegisterOptions Re-exports [RegisterOptions](https://mikro-orm.io/api/core/interface/RegisterOptions.md) ### [**](#rel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L349)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L354)rel Re-exports [rel](https://mikro-orm.io/api/core/function/rel.md) ### [**](#Rel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)Rel Re-exports [Rel](https://mikro-orm.io/api/core.md#Rel) ### [**](#RequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L8)RequestContext Re-exports [RequestContext](https://mikro-orm.io/api/core/class/RequestContext.md) ### [**](#RequiredEntityData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)RequiredEntityData Re-exports [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData) ### [**](#RequiredNullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)RequiredNullable Re-exports [RequiredNullable](https://mikro-orm.io/api/core.md#RequiredNullable) ### [**](#RunQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2012)RunQueryBuilder Re-exports [RunQueryBuilder](https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md) ### [**](#Scalar)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)Scalar Re-exports [Scalar](https://mikro-orm.io/api/core.md#Scalar) ### [**](#SCALAR_TYPES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L120)SCALAR\_TYPES Re-exports [SCALAR\_TYPES](https://mikro-orm.io/api/core.md#SCALAR_TYPES) ### [**](#ScalarRef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)ScalarRef Re-exports [ScalarRef](https://mikro-orm.io/api/core.md#ScalarRef) ### [**](#ScalarReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L215)ScalarReference Re-exports [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md) ### [**](#SchemaComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L22)SchemaComparator Re-exports [SchemaComparator](https://mikro-orm.io/api/knex/class/SchemaComparator.md) ### [**](#SchemaDifference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L135)SchemaDifference Re-exports [SchemaDifference](https://mikro-orm.io/api/knex/interface/SchemaDifference.md) ### [**](#SchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L658)SchemaGenerator Re-exports [SchemaGenerator](https://mikro-orm.io/api/knex.md#SchemaGenerator) ### [**](#SchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L16)SchemaHelper Re-exports [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#SeederOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L548)SeederOptions Re-exports [SeederOptions](https://mikro-orm.io/api/core/interface/SeederOptions.md) ### [**](#Selected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)Selected Re-exports [Selected](https://mikro-orm.io/api/core.md#Selected) ### [**](#SelectQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2018)SelectQueryBuilder Re-exports [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md) ### [**](#SerializationContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L11)SerializationContext Re-exports [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md) ### [**](#serialize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L322)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L342)serialize Re-exports [serialize](https://mikro-orm.io/api/core/function/serialize.md) ### [**](#SerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L23)SerializedPrimaryKey Re-exports [SerializedPrimaryKey](https://mikro-orm.io/api/core/function/SerializedPrimaryKey.md) ### [**](#SerializedPrimaryKeyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L29)SerializedPrimaryKeyOptions Re-exports [SerializedPrimaryKeyOptions](https://mikro-orm.io/api/core/interface/SerializedPrimaryKeyOptions.md) ### [**](#SerializeOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L287)SerializeOptions Re-exports [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md) ### [**](#ServerException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L32)ServerException Re-exports [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) ### [**](#Settings)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L447)Settings Re-exports [Settings](https://mikro-orm.io/api/core/interface/Settings.md) ### [**](#SimpleColumnMeta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)SimpleColumnMeta Re-exports [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md) ### [**](#SimpleLogger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/SimpleLogger.ts#L7)SimpleLogger Re-exports [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) ### [**](#SmallIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)SmallIntType Re-exports [SmallIntType](https://mikro-orm.io/api/core/class/SmallIntType.md) ### [**](#sql)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L244)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L261)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L262)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L263)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L264)sql Re-exports [sql](https://mikro-orm.io/api/core/function/sql.md) ### [**](#SqlEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/SqlEntityManager.ts#L21)SqlEntityManager Renames and re-exports [EntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md) ### [**](#SqlEntityRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/SqlEntityRepository.ts#L6)SqlEntityRepository Renames and re-exports [EntityRepository](https://mikro-orm.io/api/knex/class/EntityRepository.md) ### [**](#SqliteKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteKnexDialect.ts#L4)SqliteKnexDialect Re-exports [SqliteKnexDialect](https://mikro-orm.io/api/knex/class/SqliteKnexDialect.md) ### [**](#SqliteTableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteTableCompiler.ts#L4)SqliteTableCompiler Re-exports [SqliteTableCompiler](https://mikro-orm.io/api/knex/class/SqliteTableCompiler.md) ### [**](#SqlSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L21)SqlSchemaGenerator Re-exports [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#StringType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)StringType Re-exports [StringType](https://mikro-orm.io/api/core/class/StringType.md) ### [**](#SyncCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L30)SyncCacheAdapter Re-exports [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) ### [**](#SyntaxErrorException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L100)SyntaxErrorException Re-exports [SyntaxErrorException](https://mikro-orm.io/api/core/class/SyntaxErrorException.md) ### [**](#t)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L60)t Re-exports [t](https://mikro-orm.io/api/core.md#t) ### [**](#Table)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L19)Table Re-exports [Table](https://mikro-orm.io/api/knex/interface/Table.md) ### [**](#TableDifference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L114)TableDifference Re-exports [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) ### [**](#TableExistsException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L105)TableExistsException Re-exports [TableExistsException](https://mikro-orm.io/api/core/class/TableExistsException.md) ### [**](#TableNotFoundException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L110)TableNotFoundException Re-exports [TableNotFoundException](https://mikro-orm.io/api/core/class/TableNotFoundException.md) ### [**](#TextType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)TextType Re-exports [TextType](https://mikro-orm.io/api/core/class/TextType.md) ### [**](#TimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)TimeType Re-exports [TimeType](https://mikro-orm.io/api/core/class/TimeType.md) ### [**](#TinyIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)TinyIntType Re-exports [TinyIntType](https://mikro-orm.io/api/core/class/TinyIntType.md) ### [**](#Transaction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L191)Transaction Re-exports [Transaction](https://mikro-orm.io/api/core.md#Transaction) ### [**](#Transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Transactional.ts#L15)Transactional Re-exports [Transactional](https://mikro-orm.io/api/core/function/Transactional.md) ### [**](#TransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L4)TransactionContext Re-exports [TransactionContext](https://mikro-orm.io/api/core/class/TransactionContext.md) ### [**](#TransactionEventArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L17)TransactionEventArgs Re-exports [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) ### [**](#TransactionEventBroadcaster)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/TransactionEventBroadcaster.ts#L7)TransactionEventBroadcaster Re-exports [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) ### [**](#TransactionEventType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L202)TransactionEventType Re-exports [TransactionEventType](https://mikro-orm.io/api/core.md#TransactionEventType) ### [**](#TransactionManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionManager.ts#L12)TransactionManager Re-exports [TransactionManager](https://mikro-orm.io/api/core/class/TransactionManager.md) ### [**](#TransactionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L214)TransactionOptions Re-exports [TransactionOptions](https://mikro-orm.io/api/core/interface/TransactionOptions.md) ### [**](#TransactionPropagation)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L204)TransactionPropagation Re-exports [TransactionPropagation](https://mikro-orm.io/api/core/enum/TransactionPropagation.md) ### [**](#TransactionStateError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L305)TransactionStateError Re-exports [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ### [**](#TransformContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)TransformContext Re-exports [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) ### [**](#TruncateQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2045)TruncateQueryBuilder Re-exports [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md) ### [**](#Type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)Type Re-exports [Type](https://mikro-orm.io/api/core/class/Type.md) ### [**](#TypeConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)TypeConfig Re-exports [TypeConfig](https://mikro-orm.io/api/core/interface/TypeConfig.md) ### [**](#types)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L33)types Re-exports [types](https://mikro-orm.io/api/core.md#types) ### [**](#Uint8ArrayType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)Uint8ArrayType Re-exports [Uint8ArrayType](https://mikro-orm.io/api/core/class/Uint8ArrayType.md) ### [**](#UmzugMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)UmzugMigration Re-exports [UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration) ### [**](#UnboxArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)UnboxArray Re-exports [UnboxArray](https://mikro-orm.io/api/core.md#UnboxArray) ### [**](#UnderscoreNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L3)UnderscoreNamingStrategy Re-exports [UnderscoreNamingStrategy](https://mikro-orm.io/api/core/class/UnderscoreNamingStrategy.md) ### [**](#Unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L25)Unique Re-exports [Unique](https://mikro-orm.io/api/core/function/Unique.md) ### [**](#UniqueConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L115)UniqueConstraintViolationException Re-exports [UniqueConstraintViolationException](https://mikro-orm.io/api/core/class/UniqueConstraintViolationException.md) ### [**](#UniqueOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L38)UniqueOptions Re-exports [UniqueOptions](https://mikro-orm.io/api/core/interface/UniqueOptions.md) ### [**](#UnitOfWork)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L32)UnitOfWork Re-exports [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) ### [**](#UniversalPropertyKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L35)UniversalPropertyKeys Re-exports [UniversalPropertyKeys](https://mikro-orm.io/api/core.md#UniversalPropertyKeys) ### [**](#UnknownType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)UnknownType Re-exports [UnknownType](https://mikro-orm.io/api/core/class/UnknownType.md) ### [**](#UpdateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L267)UpdateOptions Re-exports [UpdateOptions](https://mikro-orm.io/api/core/interface/UpdateOptions.md) ### [**](#UpdateQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2041)UpdateQueryBuilder Re-exports [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md) ### [**](#UpdateSchemaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)UpdateSchemaOptions Re-exports [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md) ### [**](#UpsertManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L239)UpsertManyOptions Re-exports [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md) ### [**](#UpsertOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L231)UpsertOptions Re-exports [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md) ### [**](#Utils)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L185)Utils Re-exports [Utils](https://mikro-orm.io/api/core/class/Utils.md) ### [**](#UuidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)UuidType Re-exports [UuidType](https://mikro-orm.io/api/core/class/UuidType.md) ### [**](#ValidationError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L4)ValidationError Re-exports [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md) ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/wrap.ts#L6)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/wrap.ts#L11)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/wrap.ts#L17)wrap Re-exports [wrap](https://mikro-orm.io/api/core/function/wrap.md) ### [**](#WrappedEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L39)WrappedEntity Re-exports [WrappedEntity](https://mikro-orm.io/api/core/class/WrappedEntity.md) ## Type Aliases[**](<#Type Aliases>) ### [**](#Options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/better-sqlite/src/BetterSqliteMikroORM.ts#L35)Options **Options: [Options](https://mikro-orm.io/api/core.md#Options)<[BetterSqliteDriver](https://mikro-orm.io/api/better-sqlite/class/BetterSqliteDriver.md)> --- # Source: https://mikro-orm.io/blog.md ## [MikroORM 6.6](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) · 6 min read [![Martin Adámek](https://avatars1.githubusercontent.com/u/615580?s=460\&v=4)](https://github.com/B4nan) [Martin Adámek](https://github.com/B4nan) Author of MikroORM [MikroORM v6.6](https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.0) is out. This release builds on top of the [previous version](https://mikro-orm.io/blog/mikro-orm-6-5-released), improving the configurability of the filters on relations and adding more features to the entity generator. **Tags:** * [typescript](https://mikro-orm.io/blog/tags/typescript.md) * [javascript](https://mikro-orm.io/blog/tags/javascript.md) * [node](https://mikro-orm.io/blog/tags/node.md) * [sql](https://mikro-orm.io/blog/tags/sql.md) [**Read More**](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) --- # Source: https://mikro-orm.io/docs/caching.md # Result cache MikroORM has a simple result caching mechanism. It works with those methods of `EntityManager`: `find()`, `findOne()`, `findAndCount()`, `findOneOrFail()`, `count()`, as well as with `QueryBuilder` result methods (including `execute`). By default, in memory cache is used, that is shared for the whole `MikroORM` instance. Default expiration is 1 second. ``` const res = await em.find(Book, { author: { name: 'Jon Snow' } }, { populate: ['author', 'tags'], cache: 50, // set expiration to 50ms // cache: ['cache-key', 50], // set custom cache key and expiration // cache: true, // use default cache key and expiration }); ``` Or with query builder: ``` const res = await em.createQueryBuilder(Book) .where({ author: { name: 'Jon Snow' } }) .cache() .getResultList(); ``` We can change the default expiration as well as provide custom cache adapter in the ORM configuration: ``` const orm = await MikroORM.init({ resultCache: { // following options are the defaults adapter: MemoryCacheAdapter, expiration: 1000, // 1s options: {}, // cache can be also enabled globally // global: 50, // 50ms }, // ... }); ``` To clear the cached result, we need to load it with explicit cache key, and later on we can use `em.clearCache(cacheKey)` method. ``` // set the cache key to 'book-cache-key', with expiration of 60s const res = await em.find(Book, { ... }, { cache: ['book-cache-key', 60_000] }); // clear the cache key by name await em.clearCache('book-cache-key'); ``` Custom cache adapters need to implement `CacheAdapter` interface. ``` export interface CacheAdapter { /** * Gets the items under `name` key from the cache. */ get(name: string): Promise; /** * Sets the item to the cache. `origin` is used for cache invalidation and should reflect the change in data. */ set(name: string, data: any, origin: string, expiration?: number): Promise; /** * Removes the item from cache. */ remove(name: string): Promise; /** * Clears all items stored in the cache. */ clear(): Promise; /** * Called inside `MikroORM.close()` Allows graceful shutdowns (e.g. for redis). */ close?(): Promise; } ``` --- # Source: https://mikro-orm.io/docs/cascading.md # Cascading persist, merge and remove > From v4.2, cascade merging is no longer configurable (and is kept enabled for all relations). > This section is about application level cascading. For that to work, we need to have relations populated. When persisting or removing entity, all your references are by default cascade persisted. This means that by persisting any entity, ORM will automatically persist all of its associations. You can control this behaviour via `cascade` attribute of `@ManyToOne`, `@ManyToMany`, `@OneToMany` and `@OneToOne` fields. > New entities without a primary key will always be persisted, regardless of `cascade` value. ``` // cascade persist is default value @OneToMany({ entity: () => Book, mappedBy: 'author' }) books = new Collection(this); // same as previous definition @OneToMany({ entity: () => Book, mappedBy: 'author', cascade: [Cascade.PERSIST] }) books = new Collection(this); // only cascade remove @OneToMany({ entity: () => Book, mappedBy: 'author', cascade: [Cascade.REMOVE] }) books = new Collection(this); // no cascade @OneToMany({ entity: () => Book, mappedBy: 'author', cascade: [] }) books = new Collection(this); // cascade all (persist and remove) @OneToMany({ entity: () => Book, mappedBy: 'author', cascade: [Cascade.ALL] }) books = new Collection(this); // same as previous definition @OneToMany({ entity: () => Book, mappedBy: 'author', cascade: [Cascade.PERSIST, Cascade.REMOVE] }) books = new Collection(this); ``` ## Cascade persist[​](#cascade-persist "Direct link to Cascade persist") Here is example of how cascade persist works: ``` const book = await orm.em.findOne(Book, 'id', { populate: ['author', 'tags'] }); book.author.name = 'Foo Bar'; book.tags[0].name = 'new name 1'; book.tags[1].name = 'new name 2'; await orm.em.persist(book).flush(); // all book tags and author will be persisted too ``` > When cascade persisting collections, keep in mind only fully initialized collections will be cascade persisted. ## Cascade remove[​](#cascade-remove "Direct link to Cascade remove") Cascade remove works same way as cascade persist, just for removing entities. Following example assumes that `Book.publisher` is set to `Cascade.REMOVE`: > Note that cascade remove for collections can be inefficient as it will fire 1 query for each entity in collection. ``` await orm.em.remove(book).flush(); // this will also remove book.publisher ``` Keep in mind that cascade remove **can be dangerous** when used on `@ManyToOne` fields, as cascade removed entity can stay referenced in another entities that were not removed. ``` const publisher = new Publisher(...); // all books with same publisher book1.publisher = book2.publisher = book3.publisher = publisher; await orm.em.remove(book1).flush(); // this will remove book1 and its publisher // but we still have reference to removed publisher here console.log(book2.publisher, book3.publisher); ``` ## Orphan removal[​](#orphan-removal "Direct link to Orphan removal") In addition to `Cascade.REMOVE`, there is also additional and more aggressive remove cascading mode which can be specified using the `orphanRemoval` flag of the `@OneToOne` and `@OneToMany` properties: ``` @Entity() export class Author { @OneToMany({ entity: () => Book, mappedBy: 'author', orphanRemoval: true }) books = new Collection(this); } ``` > `orphanRemoval` flag behaves just like `Cascade.REMOVE` for remove operation, so specifying both is redundant. With simple `Cascade.REMOVE`, you would need to remove the `Author` entity to cascade the operation down to all loaded `Book`s. By enabling orphan removal on the collection, `Book`s will be also removed when they get disconnected from the collection (either via `remove()`, or by replacing collection items via `set()`): ``` await author.books.set([book1, book2]); // replace whole collection await author.books.remove(book1); // remove book from collection await orm.em.persist(author).flush(); // book1 will be removed, as well as all original items (before we called `set()`) ``` In this example, no `Book` would be removed with simple `Cascade.REMOVE` as no remove operation was executed. ## Declarative Referential Integrity[​](#declarative-referential-integrity "Direct link to Declarative Referential Integrity") > This is only supported in SQL drivers. As opposed to the application level cascading controlled by the `cascade` option, we can also define database level referential integrity actions: `on update` and `on delete`. Their values are automatically inferred from the `cascade` option value. You can also control the value manually via `updateRule` and `deleteRule` options. ``` @Entity() export class Book { @ManyToOne({ updateRule: 'set null', deleteRule: 'cascade' }) author?: Author; } ``` --- # Source: https://mikro-orm.io/api/sqlite/changelog.md # Source: https://mikro-orm.io/api/seeder/changelog.md # Source: https://mikro-orm.io/api/reflection/changelog.md # Source: https://mikro-orm.io/api/postgresql/changelog.md # Source: https://mikro-orm.io/api/mysql/changelog.md # Source: https://mikro-orm.io/api/mssql/changelog.md # Source: https://mikro-orm.io/api/mongodb/changelog.md # Source: https://mikro-orm.io/api/migrations/changelog.md # Source: https://mikro-orm.io/api/mariadb/changelog.md # Source: https://mikro-orm.io/api/libsql/changelog.md # Source: https://mikro-orm.io/api/knex/changelog.md # Source: https://mikro-orm.io/api/entity-generator/changelog.md # Source: https://mikro-orm.io/api/core/changelog.md # Source: https://mikro-orm.io/api/cli/changelog.md # Source: https://mikro-orm.io/api/better-sqlite/changelog.md # Changelog # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [6.6.5](https://github.com/mikro-orm/mikro-orm/compare/v6.6.4...v6.6.5) (2026-01-21)[​](#665-2026-01-21 "Direct link to 665-2026-01-21") ### Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **core:** always check the database when querying by PK with filters ([bd44c82](https://github.com/mikro-orm/mikro-orm/commit/bd44c823cd2c03ee04a2d7483cf35c76042c594f)), closes [#7084](https://github.com/mikro-orm/mikro-orm/issues/7084) * **core:** ensure `populate` hint won't include `undefined` for optional relations ([fede490](https://github.com/mikro-orm/mikro-orm/commit/fede490b499a86936ebf05a6c2c1faf7abb047d7)) * **core:** improve handling of deeply nested composite keys in `em.create` ([8caae8f](https://github.com/mikro-orm/mikro-orm/commit/8caae8f13a60529d53777fca9397d266c59922c0)), closes [#6894](https://github.com/mikro-orm/mikro-orm/issues/6894) * **core:** normalize `populate` option in `Collection.matching()` for M :N relations ([#7091](https://github.com/mikro-orm/mikro-orm/issues/7091)) ([886772a](https://github.com/mikro-orm/mikro-orm/commit/886772a1901ebfd747f9edf86c1d7769733c0e2e)) * **core:** support overlapping properties with different field names in STI ([badbc00](https://github.com/mikro-orm/mikro-orm/commit/badbc00d1ebe5610b6c4729cacfe25ca8991cbc5)), closes [#5813](https://github.com/mikro-orm/mikro-orm/issues/5813) * **sql:** fix populating M :N relations with `pivotEntity` that uses `mapToPk: true` ([0ab55fe](https://github.com/mikro-orm/mikro-orm/commit/0ab55fecba1e859ba8e9a59d62dd94258e99612e)), closes [#7107](https://github.com/mikro-orm/mikro-orm/issues/7107) ### Features[​](#features "Direct link to Features") * **core:** improve formula callback to provide more information about the table and column mapping ([#7105](https://github.com/mikro-orm/mikro-orm/issues/7105)) ([059bf97](https://github.com/mikro-orm/mikro-orm/commit/059bf97f5c890a648a6d28858bfb45dfa803b38c)), closes [#7102](https://github.com/mikro-orm/mikro-orm/issues/7102) ## [6.6.4](https://github.com/mikro-orm/mikro-orm/compare/v6.6.3...v6.6.4) (2026-01-14)[​](#664-2026-01-14 "Direct link to 664-2026-01-14") ### Bug Fixes[​](#bug-fixes-1 "Direct link to Bug Fixes") * **core:** do not convert custom types in `em.refresh` ([143a4ed](https://github.com/mikro-orm/mikro-orm/commit/143a4ed46896b764c48914ae77e7ea33959db8e4)), closes [#7073](https://github.com/mikro-orm/mikro-orm/issues/7073) * **core:** fix applying filters on nested relation conditions ([2ec6474](https://github.com/mikro-orm/mikro-orm/commit/2ec64742ff3d62c8fa494f9de06f479a9c056dd4)) * **core:** fix processing filters on to-many relations ([4a55799](https://github.com/mikro-orm/mikro-orm/commit/4a55799079ca2ad175ad8aa252e9112cd23d3c8b)) * **core:** respect `orphanRemoval` on 1:1 relations when inverse side is a PK ([#7081](https://github.com/mikro-orm/mikro-orm/issues/7081)) ([ce4bfee](https://github.com/mikro-orm/mikro-orm/commit/ce4bfeeea3fd7ba18fb2cd0c5dbebc2bfa56eb11)) * **core:** support wildcard `wrap(e).populate()` hints on type level ([45224ee](https://github.com/mikro-orm/mikro-orm/commit/45224ee294a920c9cfe54ed719df6b4a8023e0ef)) * **mongo:** fix field name conversion when querying object embedded entities ([3ea8193](https://github.com/mikro-orm/mikro-orm/commit/3ea819360d466b3dab98047666d505036b066c24)) * **postres:** fix casting of object embedded relation properties ([6095889](https://github.com/mikro-orm/mikro-orm/commit/6095889cc74bfaf9153cc03786adc2fd3e5da6e1)) ## [6.6.3](https://github.com/mikro-orm/mikro-orm/compare/v6.6.2...v6.6.3) (2026-01-04)[​](#663-2026-01-04 "Direct link to 663-2026-01-04") ### Bug Fixes[​](#bug-fixes-2 "Direct link to Bug Fixes") * **core:** do not connect to database when calling `orm.close()` ([79cabd7](https://github.com/mikro-orm/mikro-orm/commit/79cabd788a69335ed05178a39218c592d400de38)), closes [#7041](https://github.com/mikro-orm/mikro-orm/issues/7041) * **core:** don't reset entity identifiers when using `assign` on entity references ([#7048](https://github.com/mikro-orm/mikro-orm/issues/7048)) ([ca5d9b8](https://github.com/mikro-orm/mikro-orm/commit/ca5d9b8df3f26bd5d1dfc62e17274b0cbfc827b7)) * **core:** handle custom types properly in `em.refresh` ([#7061](https://github.com/mikro-orm/mikro-orm/issues/7061)) ([7dc5d7d](https://github.com/mikro-orm/mikro-orm/commit/7dc5d7d9bf9d30959f58887fed110f2da2300598)) * **defineEntity:** avoid circular type inference in meta ([#7039](https://github.com/mikro-orm/mikro-orm/issues/7039)) ([a18e63d](https://github.com/mikro-orm/mikro-orm/commit/a18e63d633595bdaee91fbb59ad3ad93f2cb5992)) * **query-builder:** do not reset schema when creating subquery for collection operators ([4f4ea6d](https://github.com/mikro-orm/mikro-orm/commit/4f4ea6d447ea8ab613fe3ea29e0aa74e45a64932)), closes [#7053](https://github.com/mikro-orm/mikro-orm/issues/7053) * **schema:** ensure `SchemaGenerator` respects `skipTables` option when diffing a schema ([#7040](https://github.com/mikro-orm/mikro-orm/issues/7040)) ([40fa85a](https://github.com/mikro-orm/mikro-orm/commit/40fa85ab9f8b9d7d8f2316b74a0c076e0a84a3f9)) ## [6.6.2](https://github.com/mikro-orm/mikro-orm/compare/v6.6.1...v6.6.2) (2025-12-07)[​](#662-2025-12-07 "Direct link to 662-2025-12-07") ### Bug Fixes[​](#bug-fixes-3 "Direct link to Bug Fixes") * **core:** deprecate some EM and MikroORM methods ([551b1df](https://github.com/mikro-orm/mikro-orm/commit/551b1df61f816af45c5adc0841dea0c481f4765d)) * **core:** fix joining embedded entity with virtual property ([2a76b1d](https://github.com/mikro-orm/mikro-orm/commit/2a76b1da7cb641659c340fd4c121ec90da94d925)), closes [#7023](https://github.com/mikro-orm/mikro-orm/issues/7023) * **core:** handle `BigInt` in `Date` hydration ([#7003](https://github.com/mikro-orm/mikro-orm/issues/7003)) ([236b429](https://github.com/mikro-orm/mikro-orm/commit/236b429d07869871d5436d6c841ad45d985b3538)), closes [#7002](https://github.com/mikro-orm/mikro-orm/issues/7002) ### Features[​](#features-1 "Direct link to Features") * **core:** use upsert when adding items to not initialized M :N collections ([#7019](https://github.com/mikro-orm/mikro-orm/issues/7019)) ([268f378](https://github.com/mikro-orm/mikro-orm/commit/268f3789110b83c8b59e321f55e55fa937ade925)), closes [#6625](https://github.com/mikro-orm/mikro-orm/issues/6625) ### Performance Improvements[​](#performance-improvements "Direct link to Performance Improvements") * **core:** store subscribers in `Set` to deduplicate them by identity ([#7010](https://github.com/mikro-orm/mikro-orm/issues/7010)) ([a41c498](https://github.com/mikro-orm/mikro-orm/commit/a41c49884c8c958acb3d4576d0f301ed0d5c38bf)), closes [#7009](https://github.com/mikro-orm/mikro-orm/issues/7009) ## [6.6.1](https://github.com/mikro-orm/mikro-orm/compare/v6.6.0...v6.6.1) (2025-11-25)[​](#661-2025-11-25 "Direct link to 661-2025-11-25") ### Bug Fixes[​](#bug-fixes-4 "Direct link to Bug Fixes") * **core:** try to infer property types regardless of `inferDefaultValues` option ([98eef5e](https://github.com/mikro-orm/mikro-orm/commit/98eef5e58b132d10166bd59d5dd7622aecde2090)) * **mongo:** fix processing of nested lazy scalar properties ([94927c6](https://github.com/mikro-orm/mikro-orm/commit/94927c6f0826db7a5a1584adfe8a72266a0f1d62)), closes [#6994](https://github.com/mikro-orm/mikro-orm/issues/6994) * **mongo:** respect property `fieldName` on index creation ([#6979](https://github.com/mikro-orm/mikro-orm/issues/6979)) ([44998c0](https://github.com/mikro-orm/mikro-orm/commit/44998c0f6804b7a86a336a8fa69b69b1096bcd77)), closes [#6978](https://github.com/mikro-orm/mikro-orm/issues/6978) * **mysql:** ensure raw values are rehydrated after flush ([9a86383](https://github.com/mikro-orm/mikro-orm/commit/9a863836f50eceacf12cdbe83b30da522b43592d)), closes [#6968](https://github.com/mikro-orm/mikro-orm/issues/6968) * **query-builder:** do not require transaction when for `LockMode.NONE` ([6c2a4b6](https://github.com/mikro-orm/mikro-orm/commit/6c2a4b69a5f4fe030b646d821a84809c589bd62a)), closes [#6969](https://github.com/mikro-orm/mikro-orm/issues/6969) ### Performance Improvements[​](#performance-improvements-1 "Direct link to Performance Improvements") * **core:** simplify processing of scalars that use simple ORM provided type classes ([15d7e74](https://github.com/mikro-orm/mikro-orm/commit/15d7e748906370f834a8a8419027bf7237e50b57)) # [6.6.0](https://github.com/mikro-orm/mikro-orm/compare/v6.5.9...v6.6.0) (2025-11-11) ### Bug Fixes[​](#bug-fixes-5 "Direct link to Bug Fixes") * **core:** do not ignore updating the whole inlined embedded property to `null` ([d0913f1](https://github.com/mikro-orm/mikro-orm/commit/d0913f1962059e5b38680a0b2b64814fd5d4e878)), closes [#6966](https://github.com/mikro-orm/mikro-orm/issues/6966) * **core:** ensure base properties in STI entities won't be ignored when overridden in one child ([b31ffec](https://github.com/mikro-orm/mikro-orm/commit/b31ffec52b06f69b6c623242c0ba1533d9fedbce)), closes [#6957](https://github.com/mikro-orm/mikro-orm/issues/6957) * **core:** ensure original entity data are in correct shape after merging ([7a30cca](https://github.com/mikro-orm/mikro-orm/commit/7a30ccac3649539798d15792955afe1e96f835f4)), closes [#6951](https://github.com/mikro-orm/mikro-orm/issues/6951) * **core:** rehydrate nullable to-one properties that were discarded via filters with select-in strategy ([3d58538](https://github.com/mikro-orm/mikro-orm/commit/3d585387a303e89ea34217fe4878dff9e91ffb87)), closes [#6460](https://github.com/mikro-orm/mikro-orm/issues/6460) * **core:** support falsy values in scalar references ([#6942](https://github.com/mikro-orm/mikro-orm/issues/6942)) ([a02c2a8](https://github.com/mikro-orm/mikro-orm/commit/a02c2a881a48e3ab39b02f60fb64d382ce771717)) * **core:** support type detection on classes with dots in their names like `Temporal.Instant` ([8cca4a8](https://github.com/mikro-orm/mikro-orm/commit/8cca4a878b681af40d6e8929ae664bc833e61b0b)), closes [#6953](https://github.com/mikro-orm/mikro-orm/issues/6953) * **postgres:** allow executing schema queries via knex in migrations ([5196f24](https://github.com/mikro-orm/mikro-orm/commit/5196f24aae3e6efff7539a031c9741cf9bb38f4b)), closes [#6949](https://github.com/mikro-orm/mikro-orm/issues/6949) * **reflection:** support string literal properties ([#6960](https://github.com/mikro-orm/mikro-orm/issues/6960)) ([148ac75](https://github.com/mikro-orm/mikro-orm/commit/148ac750b56c7392582cd040711fa152bef77918)) ### Features[​](#features-2 "Direct link to Features") * **core:** allow control over relation filters in entity definition ([#6959](https://github.com/mikro-orm/mikro-orm/issues/6959)) ([28a7e44](https://github.com/mikro-orm/mikro-orm/commit/28a7e4416796ad6b49ee3a6cd5d8cee4b11f5f1b)), closes [#6457](https://github.com/mikro-orm/mikro-orm/issues/6457) * **core:** allow defining filters on nullable relations as strict ([#6952](https://github.com/mikro-orm/mikro-orm/issues/6952)) ([1dae6cf](https://github.com/mikro-orm/mikro-orm/commit/1dae6cf6b4e0a5e15b6760d80239261547493699)), closes [#6784](https://github.com/mikro-orm/mikro-orm/issues/6784) [#6943](https://github.com/mikro-orm/mikro-orm/issues/6943) [#6784](https://github.com/mikro-orm/mikro-orm/issues/6784) * **core:** allow disabling filters on relations ([7798e57](https://github.com/mikro-orm/mikro-orm/commit/7798e575700498bda51a15354eddccbf39b3213a)), closes [#6457](https://github.com/mikro-orm/mikro-orm/issues/6457) * **core:** support private properties with get/set accessors ([#6967](https://github.com/mikro-orm/mikro-orm/issues/6967)) ([659ca93](https://github.com/mikro-orm/mikro-orm/commit/659ca936487d5d060ed07d16f1fb4d6cac3eb5fe)), closes [#6932](https://github.com/mikro-orm/mikro-orm/issues/6932) * **entity-generator:** allow generating enums as type or JS dictionary ([#6956](https://github.com/mikro-orm/mikro-orm/issues/6956)) ([ccf24df](https://github.com/mikro-orm/mikro-orm/commit/ccf24df60609775d34dd25cddd0ddb79ffde884b)), closes [#6457](https://github.com/mikro-orm/mikro-orm/issues/6457) * **entity-generator:** support generating `defineEntity()` definitions ([#6954](https://github.com/mikro-orm/mikro-orm/issues/6954)) ([d523f13](https://github.com/mikro-orm/mikro-orm/commit/d523f138060b3e70646c86a5a1724cabcba430a4)) * **entity-generator:** support native postgres enums ([#6958](https://github.com/mikro-orm/mikro-orm/issues/6958)) ([746e4bf](https://github.com/mikro-orm/mikro-orm/commit/746e4bf547f8ff7bf69985bfa74cd2eaae5e03e6)) * **knex:** reexport `raw` helper that supports `QueryBuilder` and `Knex.QueryBuilder` ([#6955](https://github.com/mikro-orm/mikro-orm/issues/6955)) ([897cc7f](https://github.com/mikro-orm/mikro-orm/commit/897cc7f831157e894f9f957ceb04770f71b614e6)), closes [#6751](https://github.com/mikro-orm/mikro-orm/issues/6751) [#6782](https://github.com/mikro-orm/mikro-orm/issues/6782) * **postgres:** skip left joined relations from pessimistic locks automatically ([ffb71a1](https://github.com/mikro-orm/mikro-orm/commit/ffb71a1237924163f979128c528efbb1b6e786a9)), closes [#6412](https://github.com/mikro-orm/mikro-orm/issues/6412) ## [6.5.9](https://github.com/mikro-orm/mikro-orm/compare/v6.5.8...v6.5.9) (2025-10-23)[​](#659-2025-10-23 "Direct link to 659-2025-10-23") ### Bug Fixes[​](#bug-fixes-6 "Direct link to Bug Fixes") * **core:** add some missing options to `defineEntity` relation builders ([#6922](https://github.com/mikro-orm/mikro-orm/issues/6922)) ([3bedcca](https://github.com/mikro-orm/mikro-orm/commit/3bedccac95ac194100ae1187bfdba0e0001b115d)) * **core:** ensure correct state of custom typed data after merging to existing results ([5907da0](https://github.com/mikro-orm/mikro-orm/commit/5907da000253ea9c94ff53cdc213c82683538721)), closes [#6926](https://github.com/mikro-orm/mikro-orm/issues/6926) * **core:** fix extra updates caused by `em.refresh` ([3d12a8b](https://github.com/mikro-orm/mikro-orm/commit/3d12a8b97a83797bb8de6818a4f49b2fb40aef1f)), closes [#6940](https://github.com/mikro-orm/mikro-orm/issues/6940) * **core:** support auto-discovery of relation targets with `defineEntity` ([a93f2e0](https://github.com/mikro-orm/mikro-orm/commit/a93f2e0e5b3371851b736baa1369305ff6475e89)) * **core:** support custom classes in `defineEntity` relation property builders ([8a03eca](https://github.com/mikro-orm/mikro-orm/commit/8a03ecabe4a899a2b288b65f62b7e0bb14dc635c)) * **core:** update `extends` type in `defineEntity` and `EntitySchema` ([#6936](https://github.com/mikro-orm/mikro-orm/issues/6936)) ([589d0f3](https://github.com/mikro-orm/mikro-orm/commit/589d0f302fb7fa32bd813315672e6d12ff50c912)) * **postgres:** do not create non-autoincrement simple PKs twice ([89e139e](https://github.com/mikro-orm/mikro-orm/commit/89e139ee3a28a4f2ced1c11098341881b7b8849e)) ## [6.5.8](https://github.com/mikro-orm/mikro-orm/compare/v6.5.7...v6.5.8) (2025-10-13)[​](#658-2025-10-13 "Direct link to 658-2025-10-13") ### Bug Fixes[​](#bug-fixes-7 "Direct link to Bug Fixes") * **core:** don't skip diffing of non-hydrated properties ([4a46bd8](https://github.com/mikro-orm/mikro-orm/commit/4a46bd824a4affd857cd1a4cb9e2ca91c9630bcc)), closes [#6918](https://github.com/mikro-orm/mikro-orm/issues/6918) * **core:** enhance `mapToPk()` and remove default `ref: true` in `defineEntity` helper ([#6919](https://github.com/mikro-orm/mikro-orm/issues/6919)) ([f0d4e8e](https://github.com/mikro-orm/mikro-orm/commit/f0d4e8e07f1a0a872643275ccf6b846dd52bf17f)) * **core:** improve auto flush detection for STI base classes ([da5e993](https://github.com/mikro-orm/mikro-orm/commit/da5e993d534d22f14794e10b4228fe2cf03fb6fb)) * **core:** rework support for partial loading of embedded properties ([29091aa](https://github.com/mikro-orm/mikro-orm/commit/29091aa29076f2bc3fe0a4d2d362ce5c3cdde578)), closes [#6907](https://github.com/mikro-orm/mikro-orm/issues/6907) * **core:** support class-based entity definitions with `defineEntity` ([#6920](https://github.com/mikro-orm/mikro-orm/issues/6920)) ([aa7295e](https://github.com/mikro-orm/mikro-orm/commit/aa7295e423da79d6b385b59fea9fbb75d20e933d)), closes [/github.com/mikro-orm/mikro-orm/discussions/6865#discussioncomment-14465227](https://github.com//github.com/mikro-orm/mikro-orm/discussions/6865/issues/discussioncomment-14465227) * **mongo:** support indexes on JSON properties ([a9edc05](https://github.com/mikro-orm/mikro-orm/commit/a9edc05e92783919bd3c867314670271c25ef089)), closes [#6899](https://github.com/mikro-orm/mikro-orm/issues/6899) * **mongo:** support upsert with nested `onConflictFields` on JSON properties ([4eab82e](https://github.com/mikro-orm/mikro-orm/commit/4eab82e63c8bcd04835ba6cfa5de69c935cb17d4)), closes [#6900](https://github.com/mikro-orm/mikro-orm/issues/6900) * **query-builder:** do not ignore nested joins inside nested joins ([a37d6fa](https://github.com/mikro-orm/mikro-orm/commit/a37d6fad0a952543c0354021c7d3c57d63877e34)) * **schema:** fix down migrations with `createForeignKeyConstraint` property option ([23e898b](https://github.com/mikro-orm/mikro-orm/commit/23e898b8fdc88cca0ba3a5f49744babc61df5f0c)), closes [#6903](https://github.com/mikro-orm/mikro-orm/issues/6903) * **schema:** support raw fragments in check constraint expressions ([ff360b0](https://github.com/mikro-orm/mikro-orm/commit/ff360b0b3dc83c1b63b38d2fa2e818aa351e6005)), closes [#6914](https://github.com/mikro-orm/mikro-orm/issues/6914) ### Features[​](#features-3 "Direct link to Features") * **core:** improve type-level support for composite keys with `defineEntity` helper ([#6912](https://github.com/mikro-orm/mikro-orm/issues/6912)) ([2d39dd0](https://github.com/mikro-orm/mikro-orm/commit/2d39dd012280209fed7fe9b728903a5225547220)) ## [6.5.7](https://github.com/mikro-orm/mikro-orm/compare/v6.5.6...v6.5.7) (2025-10-06)[​](#657-2025-10-06 "Direct link to 657-2025-10-06") ### Bug Fixes[​](#bug-fixes-8 "Direct link to Bug Fixes") * **core:** enhance branded type definitions for `Opt`, `Hidden`, `Config` and `RequiredNullable` ([#6884](https://github.com/mikro-orm/mikro-orm/issues/6884)) ([6ce418d](https://github.com/mikro-orm/mikro-orm/commit/6ce418d0e9a83f6e40939a5f41ff67850f43e28f)) * **core:** ensure nullable ScalarReference properties are loaded as initialized ScalarReference instances ([#6902](https://github.com/mikro-orm/mikro-orm/issues/6902)) ([51feb3b](https://github.com/mikro-orm/mikro-orm/commit/51feb3b67ce05640ca7fa3b12133597b1834b1f8)), closes [#6885](https://github.com/mikro-orm/mikro-orm/issues/6885) * **core:** mark `autoincrement` properties with `Opt` type in `defineEntity` helper ([#6910](https://github.com/mikro-orm/mikro-orm/issues/6910)) ([e2a8ed4](https://github.com/mikro-orm/mikro-orm/commit/e2a8ed44dce368b97defd78e4b532b4932c045c5)) * **core:** prefer `id` property over `uuid` property for default PK inference ([7a9c834](https://github.com/mikro-orm/mikro-orm/commit/7a9c834c64597730dad7193a494de6c0ef218d05)), closes [#6865](https://github.com/mikro-orm/mikro-orm/issues/6865) * **core:** skip entity validation when propagating to upper context in `em.transactional` ([a3941a1](https://github.com/mikro-orm/mikro-orm/commit/a3941a1cb84adbbf9874e4520b4eeb9d8aa042be)), closes [#6895](https://github.com/mikro-orm/mikro-orm/issues/6895) * **query-builder:** expand embeddable fields on select ([#6896](https://github.com/mikro-orm/mikro-orm/issues/6896)) ([6b76f60](https://github.com/mikro-orm/mikro-orm/commit/6b76f60dd954cdab75115be962eb13af5726524a)) * **query-builder:** support embedded fields in join conditions ([#6897](https://github.com/mikro-orm/mikro-orm/issues/6897)) ([409e0ef](https://github.com/mikro-orm/mikro-orm/commit/409e0ef058bee33fd1082394d22eec269ab84768)), closes [#6883](https://github.com/mikro-orm/mikro-orm/issues/6883) ### Features[​](#features-4 "Direct link to Features") * **mongo:** implement optimistic locking support for version properties ([#6887](https://github.com/mikro-orm/mikro-orm/issues/6887)) ([591fb43](https://github.com/mikro-orm/mikro-orm/commit/591fb43cf9ef420015e742ef735b81e7b218a062)), closes [#3612](https://github.com/mikro-orm/mikro-orm/issues/3612) [mikro-orm/mikro-orm#3612](https://github.com/mikro-orm/mikro-orm/issues/3612) ### Performance Improvements[​](#performance-improvements-2 "Direct link to Performance Improvements") * optimize merging of entities to upper context after `em.transactional` ([36bdc43](https://github.com/mikro-orm/mikro-orm/commit/36bdc43772d06635f0db94296ad47241e40aa63d)), closes [#6905](https://github.com/mikro-orm/mikro-orm/issues/6905) * optimize merging of entities to upper context after `em.transactional` ([b29e88c](https://github.com/mikro-orm/mikro-orm/commit/b29e88cbd527ee8e2c08cb5d32199dd9c9615d8f)), closes [#6890](https://github.com/mikro-orm/mikro-orm/issues/6890) * optimize merging of entities to upper context after `em.transactional` when it's empty ([b7751d5](https://github.com/mikro-orm/mikro-orm/commit/b7751d55abf5bd2ca421545dc81d8cab33e38b12)), closes [#6890](https://github.com/mikro-orm/mikro-orm/issues/6890) ## [6.5.6](https://github.com/mikro-orm/mikro-orm/compare/v6.5.5...v6.5.6) (2025-09-25)[​](#656-2025-09-25 "Direct link to 656-2025-09-25") ### Bug Fixes[​](#bug-fixes-9 "Direct link to Bug Fixes") * **core:** account for nullability when applying default value ([#6880](https://github.com/mikro-orm/mikro-orm/issues/6880)) ([9763275](https://github.com/mikro-orm/mikro-orm/commit/976327510e61a749f9c732bb763055322d4f0dd5)), closes [#6879](https://github.com/mikro-orm/mikro-orm/issues/6879) * **core:** enhance type of bigint, array, decimal properties when using `defineEntity` helper ([#6873](https://github.com/mikro-orm/mikro-orm/issues/6873)) ([42e7df1](https://github.com/mikro-orm/mikro-orm/commit/42e7df147dc1134cd9a52e8d953094df1d41b22a)), closes [/github.com/mikro-orm/mikro-orm/discussions/6865#discussioncomment-14483413](https://github.com//github.com/mikro-orm/mikro-orm/discussions/6865/issues/discussioncomment-14483413) * **core:** ensure `em.refresh` will refresh detached entities too ([c156e30](https://github.com/mikro-orm/mikro-orm/commit/c156e306449968ed4a94306dfe8b4270172e92b8)), closes [#6867](https://github.com/mikro-orm/mikro-orm/issues/6867) * **core:** prevent stack overflow errors when populating relations on lots of entities with select-in strategy ([#6874](https://github.com/mikro-orm/mikro-orm/issues/6874)) ([d5c23c7](https://github.com/mikro-orm/mikro-orm/commit/d5c23c7d1c78f3b1fd834f2d9c2a0d764bd29cb3)) ### Features[​](#features-5 "Direct link to Features") * **core:** allow sha256 hashing in `FileCacheAdapter` ([#6866](https://github.com/mikro-orm/mikro-orm/issues/6866)) ([21d364d](https://github.com/mikro-orm/mikro-orm/commit/21d364d5b1af58498ee967c7e8d2ecbfee16bae7)) * **schema:** add `skipTables` and `skipColumns` options to schema generator ([#6870](https://github.com/mikro-orm/mikro-orm/issues/6870)) ([5937ab6](https://github.com/mikro-orm/mikro-orm/commit/5937ab695d781f347fee67ddc5708ff4b5c46bac)), closes [#5346](https://github.com/mikro-orm/mikro-orm/issues/5346) ## [6.5.5](https://github.com/mikro-orm/mikro-orm/compare/v6.5.4...v6.5.5) (2025-09-21)[​](#655-2025-09-21 "Direct link to 655-2025-09-21") ### Bug Fixes[​](#bug-fixes-10 "Direct link to Bug Fixes") * **core:** add missing `IncludeCount` type argument to `repo.findByCursor()` ([34c9630](https://github.com/mikro-orm/mikro-orm/commit/34c963086e37c059ec9d2ece1fe988bfbeca2967)) * **core:** correctly diff nullable properties between undefined and null ([#6864](https://github.com/mikro-orm/mikro-orm/issues/6864)) ([c30d1c9](https://github.com/mikro-orm/mikro-orm/commit/c30d1c9ffa6c133e99f411ba18d43d53dbb9fc5e)) * **core:** skip mapping undeclared columns that match a different property name ([#6860](https://github.com/mikro-orm/mikro-orm/issues/6860)) ([b29527e](https://github.com/mikro-orm/mikro-orm/commit/b29527eb3ae7a9fe7a2a1a31f7fccbf9c9f4a7cd)), closes [#6861](https://github.com/mikro-orm/mikro-orm/issues/6861) * **schema:** improve diffing of generated columns ([9a59ba6](https://github.com/mikro-orm/mikro-orm/commit/9a59ba68c08514db22a2e86fe282a6546b71d1ae)), closes [#6858](https://github.com/mikro-orm/mikro-orm/issues/6858) ## [6.5.4](https://github.com/mikro-orm/mikro-orm/compare/v6.5.3...v6.5.4) (2025-09-17)[​](#654-2025-09-17 "Direct link to 654-2025-09-17") ### Bug Fixes[​](#bug-fixes-11 "Direct link to Bug Fixes") * **core:** initialize collection properties after flushing an entity reference ([83ca9c1](https://github.com/mikro-orm/mikro-orm/commit/83ca9c14cc4fd443b45ea40f1945c5a249336747)), closes [#6855](https://github.com/mikro-orm/mikro-orm/issues/6855) * **core:** support inference of default value from property initializer with `ref()` ([56e441d](https://github.com/mikro-orm/mikro-orm/commit/56e441dbfe2978c1497fc067ccb3409fabc5a4b7)), closes [#6853](https://github.com/mikro-orm/mikro-orm/issues/6853) * **query-builder:** fix aliasing of 1:1 inverse side when used in a filter nested inside M :N relation ([61969f6](https://github.com/mikro-orm/mikro-orm/commit/61969f6769513f017c245a7a28c8b9ec2cfd6b51)), closes [#6851](https://github.com/mikro-orm/mikro-orm/issues/6851) ## [6.5.3](https://github.com/mikro-orm/mikro-orm/compare/v6.5.2...v6.5.3) (2025-09-13)[​](#653-2025-09-13 "Direct link to 653-2025-09-13") ### Bug Fixes[​](#bug-fixes-12 "Direct link to Bug Fixes") * **core:** align implementation of filters in `em.find` and `em.count` ([ead5074](https://github.com/mikro-orm/mikro-orm/commit/ead5074f0ac9fa5febc81ea8861db6374dba3209)), closes [#6823](https://github.com/mikro-orm/mikro-orm/issues/6823) * **core:** export `RequiredNullable` from `@mikro-orm/core` ([#6836](https://github.com/mikro-orm/mikro-orm/issues/6836)) ([961ee74](https://github.com/mikro-orm/mikro-orm/commit/961ee74b4a7a8bff1c744e63abf0c5c1141afed6)) * **core:** fix propagation from `em.transactional` with composite custom type PK ([0b82f43](https://github.com/mikro-orm/mikro-orm/commit/0b82f43b9fee50c749769de5766cebf7d7ffcba3)), closes [#6825](https://github.com/mikro-orm/mikro-orm/issues/6825) * **core:** include hidden properties when refreshing via `em.refresh()` ([9a7bbc3](https://github.com/mikro-orm/mikro-orm/commit/9a7bbc3b2a8d9e03972f69c419edc0dffe2b1f0c)), closes [#6828](https://github.com/mikro-orm/mikro-orm/issues/6828) * **query-builder:** properly wrap composite keys in join conditions ([#6831](https://github.com/mikro-orm/mikro-orm/issues/6831)) ([b720ca5](https://github.com/mikro-orm/mikro-orm/commit/b720ca53c247ec27570ad56278ab11e4a57d763e)), closes [#6830](https://github.com/mikro-orm/mikro-orm/issues/6830) * **query-builder:** skip branching on to-one joins ([#6826](https://github.com/mikro-orm/mikro-orm/issues/6826)) ([65812c4](https://github.com/mikro-orm/mikro-orm/commit/65812c4db887086ebb78022490de73028379c073)), closes [#6824](https://github.com/mikro-orm/mikro-orm/issues/6824) ## [6.5.2](https://github.com/mikro-orm/mikro-orm/compare/v6.5.1...v6.5.2) (2025-09-02)[​](#652-2025-09-02 "Direct link to 652-2025-09-02") ### Bug Fixes[​](#bug-fixes-13 "Direct link to Bug Fixes") * **core:** process owning sides of M :N relations in `em.assign` with `onlyOwnProperties` ([#6822](https://github.com/mikro-orm/mikro-orm/issues/6822)) ([099869f](https://github.com/mikro-orm/mikro-orm/commit/099869fea507d20a0b45c3abf31e592c2d348eac)), closes [#6813](https://github.com/mikro-orm/mikro-orm/issues/6813) * **migrations:** improve extraction of Migration class ([2dacc4b](https://github.com/mikro-orm/mikro-orm/commit/2dacc4b8de84ccd0500b8819098d190592f9fbc2)), closes [#6817](https://github.com/mikro-orm/mikro-orm/issues/6817) * **query-builder:** fix aliasing of conditions targeting a nested composite FK ([b159342](https://github.com/mikro-orm/mikro-orm/commit/b159342a90718148e5a36f80917402d9e99c5746)), closes [#6819](https://github.com/mikro-orm/mikro-orm/issues/6819) * **query-builder:** fix join conditions targeting a composite FK ([3f88e9b](https://github.com/mikro-orm/mikro-orm/commit/3f88e9b278291e18ef6a116b413848714bdf5a94)), closes [#6819](https://github.com/mikro-orm/mikro-orm/issues/6819) * **query-builder:** fix processing deeply nested joins ([d033729](https://github.com/mikro-orm/mikro-orm/commit/d0337298cd1e3bdadd7b81fc7913708ef1f4ab78)), closes [#6818](https://github.com/mikro-orm/mikro-orm/issues/6818) * **query-builder:** hydrate lazy properties regardless of populate hint ([8b45281](https://github.com/mikro-orm/mikro-orm/commit/8b452814408fcd28b9a190baa9d3a7cdc98bd676)) ## [6.5.1](https://github.com/mikro-orm/mikro-orm/compare/v6.5.0...v6.5.1) (2025-08-27)[​](#651-2025-08-27 "Direct link to 651-2025-08-27") * **core:** add `indexName` argument to index expression callback ([b77c90f](https://github.com/mikro-orm/mikro-orm/commit/b77c90ff80f04217ac1712ce98aef9633cdcbf4f)) # [6.5.0](https://github.com/mikro-orm/mikro-orm/compare/v6.4.16...v6.5.0) (2025-08-27) ### Bug Fixes[​](#bug-fixes-14 "Direct link to Bug Fixes") * **core:** allow querying embeddables for `null` values via collection operators ([d7b25a7](https://github.com/mikro-orm/mikro-orm/commit/d7b25a70f9b7b8d231906abed634e5a15f4a8d55)), closes [#6736](https://github.com/mikro-orm/mikro-orm/issues/6736) * **core:** do not fail version mismatch checks when getting the current version fails ([086d767](https://github.com/mikro-orm/mikro-orm/commit/086d7676cc72cae1d1f5686dfcafa55a4caadb8d)), closes [#6765](https://github.com/mikro-orm/mikro-orm/issues/6765) * **core:** do not propagate changes to collections when partially loaded ([7068b35](https://github.com/mikro-orm/mikro-orm/commit/7068b352b77938b002d5c53c6316b16a70df112d)), closes [#6732](https://github.com/mikro-orm/mikro-orm/issues/6732) [#6734](https://github.com/mikro-orm/mikro-orm/issues/6734) * **core:** ensure `em.transactional` context propagation won't result in breaking identity map ([2b608fc](https://github.com/mikro-orm/mikro-orm/commit/2b608fc3c994ee179ab5363576fee0bf99bd028f)), closes [#6764](https://github.com/mikro-orm/mikro-orm/issues/6764) * **core:** ensure correct runtime value of `decimal` and `float` properties ([#6807](https://github.com/mikro-orm/mikro-orm/issues/6807)) ([7cd8b1c](https://github.com/mikro-orm/mikro-orm/commit/7cd8b1ce34e83e30381fc50e49b88db1f5894841)), closes [#6806](https://github.com/mikro-orm/mikro-orm/issues/6806) [#6806](https://github.com/mikro-orm/mikro-orm/issues/6806) * **core:** fix extra updates after `em.refresh` on nested entities with embeddables ([640985c](https://github.com/mikro-orm/mikro-orm/commit/640985ce33cb3c09387715598ba0329ea9f44a39)), closes [#6705](https://github.com/mikro-orm/mikro-orm/issues/6705) * **core:** fix fetching of autoincrement PK when upserting without a unique value ([0dccac7](https://github.com/mikro-orm/mikro-orm/commit/0dccac7d5864ccb0ecec5e03ebf60ddd37dc1e62)), closes [#6755](https://github.com/mikro-orm/mikro-orm/issues/6755) * **core:** fix hydration with select-in strategy and PKs with custom types ([#6808](https://github.com/mikro-orm/mikro-orm/issues/6808)) ([4770462](https://github.com/mikro-orm/mikro-orm/commit/477046203212109b9c76e5745a66fd73ffb8eef7)), closes [#6726](https://github.com/mikro-orm/mikro-orm/issues/6726) * **core:** fix querying by a nested FK as PK ([c2c5bfd](https://github.com/mikro-orm/mikro-orm/commit/c2c5bfd91d29594b26b8d620b57e34b0a655a57f)) * **core:** hydrate persisted getters without setters unless explicitly disabled ([459329a](https://github.com/mikro-orm/mikro-orm/commit/459329abb05925b3d124eeba57056266f78d86e5)), closes [#6723](https://github.com/mikro-orm/mikro-orm/issues/6723) * **core:** ignore properties with `hydrate: false` from change tracking ([4a6fb9b](https://github.com/mikro-orm/mikro-orm/commit/4a6fb9bc80c13340b4fa32ee51eec63453fa916d)), closes [#6723](https://github.com/mikro-orm/mikro-orm/issues/6723) * **core:** improve detection of empty flush ([6debac9](https://github.com/mikro-orm/mikro-orm/commit/6debac94b2176f905917e554e2af4fc220a5e7c7)) * **core:** respect joined filters in `em.count` ([323ffef](https://github.com/mikro-orm/mikro-orm/commit/323ffeffd2787726b9dcae3c74ce4b3721d9d75b)), closes [#6666](https://github.com/mikro-orm/mikro-orm/issues/6666) * **core:** respect logger context in queries from `flush` and others ([#6777](https://github.com/mikro-orm/mikro-orm/issues/6777)) ([083a1ee](https://github.com/mikro-orm/mikro-orm/commit/083a1eec70c065c49023d10363d976662e1daf4a)), closes [#6776](https://github.com/mikro-orm/mikro-orm/issues/6776) * **core:** support cursor based pagination with `ScalarReference` properties ([84d20b1](https://github.com/mikro-orm/mikro-orm/commit/84d20b1335b9a563045ce91c24199214cb73f3c4)), closes [#6793](https://github.com/mikro-orm/mikro-orm/issues/6793) * **core:** use `default` for missing values in multi insert for custom types ([eae635f](https://github.com/mikro-orm/mikro-orm/commit/eae635f7ff798c34d16985494b53e836dd893945)), closes [#6727](https://github.com/mikro-orm/mikro-orm/issues/6727) * **postgres:** quote string array values with `''` instead of `\'` ([4bc1c9e](https://github.com/mikro-orm/mikro-orm/commit/4bc1c9e01d7b20f74650d3a0d4bd586ef467f5bf)) * **postgres:** support `primary key` with generated identity columns ([382d5b3](https://github.com/mikro-orm/mikro-orm/commit/382d5b30c3a5d789342d9df7256b91460d156e5c)), closes [#6693](https://github.com/mikro-orm/mikro-orm/issues/6693) * **query-builder:** fix `qb.leftJoinAndSelect` with a subquery on M :N relations ([aa52abb](https://github.com/mikro-orm/mikro-orm/commit/aa52abbfa029006069051e8e85982e172eb234a7)) * **query-builder:** fix hydrating 1:1 inverse side via joined strategy ([d48359c](https://github.com/mikro-orm/mikro-orm/commit/d48359cb946ef0e9e84ad27920a11873f9b3aa08)) * **query-builder:** support group operators inside join conditions ([#6796](https://github.com/mikro-orm/mikro-orm/issues/6796)) ([efe5a56](https://github.com/mikro-orm/mikro-orm/commit/efe5a568c6a32fb6f1d50744d5d763b4a8026b63)), closes [#6795](https://github.com/mikro-orm/mikro-orm/issues/6795) * **reflection:** unwrap `runtimeType` to support correct hydration of scalar references ([ff6a7ae](https://github.com/mikro-orm/mikro-orm/commit/ff6a7ae96d4ec7ec5517c25b72a0d40bf6acce20)), closes [#5557](https://github.com/mikro-orm/mikro-orm/issues/5557) * **reflection:** unwrap `ScalarRef` and `EntityRef` type ([6b1a349](https://github.com/mikro-orm/mikro-orm/commit/6b1a3494780f55130d4240109cba8e7af4131c89)), closes [#5557](https://github.com/mikro-orm/mikro-orm/issues/5557) * **schema:** properly handle array defaults in mysql ([#6703](https://github.com/mikro-orm/mikro-orm/issues/6703)) ([534193c](https://github.com/mikro-orm/mikro-orm/commit/534193c327b2721ffae1703ddd259eb0a3a2cbe4)), closes [#6688](https://github.com/mikro-orm/mikro-orm/issues/6688) * **sql:** correctly handle lazy scalar properties with custom types ([#6715](https://github.com/mikro-orm/mikro-orm/issues/6715)) ([c8add75](https://github.com/mikro-orm/mikro-orm/commit/c8add75959e45d93bb2d5ce6e631091523b5b780)) * **sql:** fix computing `order by` clause when ordering by a not populated relation ([b8a7984](https://github.com/mikro-orm/mikro-orm/commit/b8a7984f5c2175dae3ebfa272cd97fa24a626256)), closes [#6757](https://github.com/mikro-orm/mikro-orm/issues/6757) ### Features[​](#features-6 "Direct link to Features") * **core:** add `balanced` loading strategy ([#6787](https://github.com/mikro-orm/mikro-orm/issues/6787)) ([a7bff86](https://github.com/mikro-orm/mikro-orm/commit/a7bff8682c09e49a5baecc92d4cdc09ee2aad932)), closes [#6129](https://github.com/mikro-orm/mikro-orm/issues/6129) * **core:** add `loadOrFail` to `ScalarReference` wrapper ([#6716](https://github.com/mikro-orm/mikro-orm/issues/6716)) ([dcff19f](https://github.com/mikro-orm/mikro-orm/commit/dcff19f4651b3f7eeacb393048951fc7726fa2bb)) * **core:** add `RequiredNullable` helper type ([#6756](https://github.com/mikro-orm/mikro-orm/issues/6756)) ([71f5153](https://github.com/mikro-orm/mikro-orm/commit/71f515391a2a182d80a7e8a319738624763d0311)), closes [6744](https://github.com/mikro-orm/mikro-orm/discussions/6744) * **core:** add comprehensive transaction propagation support ([#6802](https://github.com/mikro-orm/mikro-orm/issues/6802)) ([19ebac4](https://github.com/mikro-orm/mikro-orm/commit/19ebac464d87ec73576d354bd1dda817d4d40539)), closes [#6788](https://github.com/mikro-orm/mikro-orm/issues/6788) * **core:** allow defining entities with inferred interfaces ([#6253](https://github.com/mikro-orm/mikro-orm/issues/6253)) ([1e6961a](https://github.com/mikro-orm/mikro-orm/commit/1e6961ac16068836d0baea13239cc5ac468789cb)), closes [#6242](https://github.com/mikro-orm/mikro-orm/issues/6242) * **core:** allow triggering `onCreate` hooks during `em.create` ([#6263](https://github.com/mikro-orm/mikro-orm/issues/6263)) ([1a2cc2e](https://github.com/mikro-orm/mikro-orm/commit/1a2cc2ec5e5f287cec4fc80762ae7b654c63d4cb)) * **core:** support `contextName` in `@Transactional` decorator ([#6719](https://github.com/mikro-orm/mikro-orm/issues/6719)) ([9ce9499](https://github.com/mikro-orm/mikro-orm/commit/9ce9499b6c58d10f81bf00942c89c3b1b606ff0f)) * **schema:** allow disabling foreign key constraint creation, per relation ([#6702](https://github.com/mikro-orm/mikro-orm/issues/6702)) ([79e6cb0](https://github.com/mikro-orm/mikro-orm/commit/79e6cb06b7526470443da7c64edf4698446be210)), closes [2548](https://github.com/mikro-orm/mikro-orm/issues/2548) * **schema:** allow wilcard-schema friendly index expression ([#6706](https://github.com/mikro-orm/mikro-orm/issues/6706)) ([688043a](https://github.com/mikro-orm/mikro-orm/commit/688043acdc306b7d898fed55e70571a044ac8a4f)), closes [#6446](https://github.com/mikro-orm/mikro-orm/issues/6446) * **sql:** refactor handling of filters on relations ([2d1b889](https://github.com/mikro-orm/mikro-orm/commit/2d1b889a4bda432219550b9650bd32f891d30142)), closes [#6760](https://github.com/mikro-orm/mikro-orm/issues/6760) [#6784](https://github.com/mikro-orm/mikro-orm/issues/6784) ### Performance Improvements[​](#performance-improvements-3 "Direct link to Performance Improvements") * **core:** make `em.refresh` faster for reloading large entity graphs ([a44f671](https://github.com/mikro-orm/mikro-orm/commit/a44f671dc1e4993560ce82d91786118a5acdc016)) * **sql:** speed up hydration of large to-many collections with joined strategy ([#6801](https://github.com/mikro-orm/mikro-orm/issues/6801)) ([5faf30c](https://github.com/mikro-orm/mikro-orm/commit/5faf30c66180854c5ff58316baa4ba1cee26daac)) ## [6.4.16](https://github.com/mikro-orm/mikro-orm/compare/v6.4.15...v6.4.16) (2025-05-30)[​](#6416-2025-05-30 "Direct link to 6416-2025-05-30") ### Bug Fixes[​](#bug-fixes-15 "Direct link to Bug Fixes") * **core:** fix extra updates after `em.refresh` is called on properties with custom types ([6a6167e](https://github.com/mikro-orm/mikro-orm/commit/6a6167e7dc8b809eebff69b145d62de293a425d0)), closes [#6674](https://github.com/mikro-orm/mikro-orm/issues/6674) * **core:** fix implicit serialization when multiple populate hints are present ([dbf8f3c](https://github.com/mikro-orm/mikro-orm/commit/dbf8f3cc67114797f3fce8dc790d7a1173dc273f)), closes [#6658](https://github.com/mikro-orm/mikro-orm/issues/6658) * **core:** support custom types in `type` option of version properties ([bd31fb6](https://github.com/mikro-orm/mikro-orm/commit/bd31fb65acfacee1fa471f28cd0651dc1e7cb787)) * **core:** unlink old 1:1 relation on the owning side when changing inverse side ([2f292cc](https://github.com/mikro-orm/mikro-orm/commit/2f292cced0623c4b2b034885de43eae915d19869)), closes [#6655](https://github.com/mikro-orm/mikro-orm/issues/6655) * **core:** use explicit dataloader for M :N properties ([6372e4c](https://github.com/mikro-orm/mikro-orm/commit/6372e4c829f6e15764e05a196ee6aaf5d9071d32)), closes [#6665](https://github.com/mikro-orm/mikro-orm/issues/6665) ### Features[​](#features-7 "Direct link to Features") * **mssql:** allow inserting when triggers are present in mssql tables ([#6662](https://github.com/mikro-orm/mikro-orm/issues/6662)) ([efafb9b](https://github.com/mikro-orm/mikro-orm/commit/efafb9b1f8683ce7b25527f7b18644942d737b84)) * **query-builder:** validate wrong group operator position on scalar properties ([0f5ce3d](https://github.com/mikro-orm/mikro-orm/commit/0f5ce3d8e20f95bd90bf614a849840335becbc15)), closes [#6684](https://github.com/mikro-orm/mikro-orm/issues/6684) ## [6.4.15](https://github.com/mikro-orm/mikro-orm/compare/v6.4.14...v6.4.15) (2025-05-09)[​](#6415-2025-05-09 "Direct link to 6415-2025-05-09") ### Bug Fixes[​](#bug-fixes-16 "Direct link to Bug Fixes") * **cli:** improve detection of dependency versions for `debug` command ([2a8bcce](https://github.com/mikro-orm/mikro-orm/commit/2a8bcce2105b0c8799f5e8ec641ebb23ad815929)) * **core:** support dataloader for M :N without inverse side ([#6053](https://github.com/mikro-orm/mikro-orm/issues/6053)) ([c319f1c](https://github.com/mikro-orm/mikro-orm/commit/c319f1cf50816889a9775833c1cc7198d7c7ce61)), closes [#6031](https://github.com/mikro-orm/mikro-orm/issues/6031) [#6502](https://github.com/mikro-orm/mikro-orm/issues/6502) [#6503](https://github.com/mikro-orm/mikro-orm/issues/6503) * **postgres:** don't lowercase native enum labels when schema diffing ([469ff02](https://github.com/mikro-orm/mikro-orm/commit/469ff0291fd1df9c34a61f578e1123b456b6f979)), closes [#6643](https://github.com/mikro-orm/mikro-orm/issues/6643) * **query-builder:** fix missing alias when joining relations via `populateWhere` ([6dd3ec7](https://github.com/mikro-orm/mikro-orm/commit/6dd3ec7ce7e5da745f933ed8dd854166b04a7433)), closes [#6635](https://github.com/mikro-orm/mikro-orm/issues/6635) ### Features[​](#features-8 "Direct link to Features") * **core:** allow overriding embedded column name ([#6642](https://github.com/mikro-orm/mikro-orm/issues/6642)) ([8b52077](https://github.com/mikro-orm/mikro-orm/commit/8b52077897e37102089c958f2b86db68f936bc9b)), closes [#5361](https://github.com/mikro-orm/mikro-orm/issues/5361) [#6641](https://github.com/mikro-orm/mikro-orm/issues/6641) ## [6.4.14](https://github.com/mikro-orm/mikro-orm/compare/v6.4.13...v6.4.14) (2025-05-05)[​](#6414-2025-05-05 "Direct link to 6414-2025-05-05") ### Bug Fixes[​](#bug-fixes-17 "Direct link to Bug Fixes") * **core:** add support for zero count result cache ([#6600](https://github.com/mikro-orm/mikro-orm/issues/6600)) ([3a8fdff](https://github.com/mikro-orm/mikro-orm/commit/3a8fdff9e4db0407802b0972d470f8aa3125b3a5)) * **core:** copy `EntitySchema` before processing the metadata ([cbf4a7f](https://github.com/mikro-orm/mikro-orm/commit/cbf4a7f72cba36e23da670945e5b6d3e982f6ea3)), closes [#6540](https://github.com/mikro-orm/mikro-orm/issues/6540) * **core:** disallow passing array items to scalar array properties in `em.create` and `em.assign` ([1455027](https://github.com/mikro-orm/mikro-orm/commit/14550270981167db6cd477cffb29401bbb7a7f39)), closes [#6609](https://github.com/mikro-orm/mikro-orm/issues/6609) * **core:** don't remove generated primary keys from entity snapshot ([980e53e](https://github.com/mikro-orm/mikro-orm/commit/980e53e3879ce009de7db4a1cac3abf969ca11c0)), closes [#6593](https://github.com/mikro-orm/mikro-orm/issues/6593) * **core:** enforce correct runtime type when `object` gets inferred ([6e46afa](https://github.com/mikro-orm/mikro-orm/commit/6e46afa9add618293abaecd6b460ac01dc12da78)), closes [#6633](https://github.com/mikro-orm/mikro-orm/issues/6633) * **core:** fix `orderBy` value type ([06f1a72](https://github.com/mikro-orm/mikro-orm/commit/06f1a72c459e1dc67d15f48617beb5e363d16718)) * **core:** respect `null` as a valid cache result ([#6585](https://github.com/mikro-orm/mikro-orm/issues/6585)) ([e3bb8e4](https://github.com/mikro-orm/mikro-orm/commit/e3bb8e49f9e35bc86d248f0efddccc768b4cd31c)), closes [#6584](https://github.com/mikro-orm/mikro-orm/issues/6584) * **core:** respect schema option when loading missing fields on upsert ([3bd72ea](https://github.com/mikro-orm/mikro-orm/commit/3bd72ea59f7cc5ef8f743d331b029ae95a7ae334)), closes [#6622](https://github.com/mikro-orm/mikro-orm/issues/6622) * **mssql:** handle mapping for order by expressions with nulls first/last ([#6618](https://github.com/mikro-orm/mikro-orm/issues/6618)) ([2cae74b](https://github.com/mikro-orm/mikro-orm/commit/2cae74b36c6930a3af4b187760384a75523815d4)) * **query-builder:** don't alias formula properties in join conditions ([34d1df4](https://github.com/mikro-orm/mikro-orm/commit/34d1df43860aba3fc9b1cf1c438eaa24943a4211)), closes [#6620](https://github.com/mikro-orm/mikro-orm/issues/6620) ### Features[​](#features-9 "Direct link to Features") * **schema:** allow setting a custom FK constraint name ([#6623](https://github.com/mikro-orm/mikro-orm/issues/6623)) ([9680c1c](https://github.com/mikro-orm/mikro-orm/commit/9680c1c7e288e83f8503d79c9a6073fc4cc0f9a7)), closes [#6624](https://github.com/mikro-orm/mikro-orm/issues/6624) ## [6.4.13](https://github.com/mikro-orm/mikro-orm/compare/v6.4.12...v6.4.13) (2025-04-12)[​](#6413-2025-04-12 "Direct link to 6413-2025-04-12") ### Bug Fixes[​](#bug-fixes-18 "Direct link to Bug Fixes") * **core:** allow passing `null` and `undefined` to `ref()` and respect it in return type ([2708c7a](https://github.com/mikro-orm/mikro-orm/commit/2708c7afdb28309d6d7c9eb370c42c4f8dfe172e)) * **core:** fix entity path discovery for bun 1.2.7 ([#6564](https://github.com/mikro-orm/mikro-orm/issues/6564)) ([a749a4a](https://github.com/mikro-orm/mikro-orm/commit/a749a4a72b15954338b92b8104ee215e6e40ea98)) * **core:** fix type of a `Record` properties when mapping to `EntityDTO` ([e4ef475](https://github.com/mikro-orm/mikro-orm/commit/e4ef4750dc89cf18585da24b538b33f56273b116)) * **core:** ignore collection operators in auto-joined filter conditions ([c72c8c5](https://github.com/mikro-orm/mikro-orm/commit/c72c8c55823af4dd01e70ae76c96eaffdc33bb4e)), closes [#6567](https://github.com/mikro-orm/mikro-orm/issues/6567) * **core:** make `populate` parameter of `em.populate()` readonly ([#6580](https://github.com/mikro-orm/mikro-orm/issues/6580)) ([87d8c95](https://github.com/mikro-orm/mikro-orm/commit/87d8c953345b2cc06defa452bf1df1cdb27031b2)), closes [#6579](https://github.com/mikro-orm/mikro-orm/issues/6579) * **core:** respect owner schema when persisting M :N with wildcard entities ([a53765f](https://github.com/mikro-orm/mikro-orm/commit/a53765f3bcd4ade9861a395f4063b5bee53a663a)), closes [#6575](https://github.com/mikro-orm/mikro-orm/issues/6575) * **core:** skip extra populate query for nullable 1:1 inverse sides ([3a72ce5](https://github.com/mikro-orm/mikro-orm/commit/3a72ce5f0f7ec639735dcac51e7a91810560d72d)), closes [#6568](https://github.com/mikro-orm/mikro-orm/issues/6568) * **mssql:** ensure formula properties are not selected twice when partial loading on a joined relation ([763db15](https://github.com/mikro-orm/mikro-orm/commit/763db153c307432a37effa7bf259e6844dd25fbb)), closes [#6547](https://github.com/mikro-orm/mikro-orm/issues/6547) * **postgres:** fix schema diffing for `default` and `nullable` of check constraint enums ([#6572](https://github.com/mikro-orm/mikro-orm/issues/6572)) ([db9b0bf](https://github.com/mikro-orm/mikro-orm/commit/db9b0bf004f4f2775c3b611eb1600338b09b6b01)), closes [#6571](https://github.com/mikro-orm/mikro-orm/issues/6571) * **query-builder:** ignore nested relation filters when applying filters to auto-joined relations ([b9ac04c](https://github.com/mikro-orm/mikro-orm/commit/b9ac04c3bb50e321034ecf9a2598043660824a0d)), closes [#6566](https://github.com/mikro-orm/mikro-orm/issues/6566) ## [6.4.12](https://github.com/mikro-orm/mikro-orm/compare/v6.4.11...v6.4.12) (2025-04-06)[​](#6412-2025-04-06 "Direct link to 6412-2025-04-06") ### Bug Fixes[​](#bug-fixes-19 "Direct link to Bug Fixes") * **core:** clean up 1 :m collections when changing the m:1 value ([a720927](https://github.com/mikro-orm/mikro-orm/commit/a720927de9abe4113a37b366a542024c3528a391)) * **core:** don't reset not selected values from existing entities ([2ebc7a8](https://github.com/mikro-orm/mikro-orm/commit/2ebc7a8972311247498b7c6030c0d5377416440a)), closes [#6558](https://github.com/mikro-orm/mikro-orm/issues/6558) * **core:** fix populating m :n collection with custom types ([444c130](https://github.com/mikro-orm/mikro-orm/commit/444c130dd0423d03960e43843a54c149c4f525be)), closes [#6477](https://github.com/mikro-orm/mikro-orm/issues/6477) * **core:** fix populating nested relations when parent entity is self referenced ([285a632](https://github.com/mikro-orm/mikro-orm/commit/285a63252f5e6cb7cac2158875c92b83f04b5c04)), closes [#6531](https://github.com/mikro-orm/mikro-orm/issues/6531) * **core:** propagate composite FK values when inserting new entities ([9506cae](https://github.com/mikro-orm/mikro-orm/commit/9506cae51713c803b4848e9865361a350f4d641b)), closes [#6430](https://github.com/mikro-orm/mikro-orm/issues/6430) * **mssql:** ensure `date` type is mapped to string instead of `Date` object ([098d71b](https://github.com/mikro-orm/mikro-orm/commit/098d71b7536b18111b73e72589e78aa34d2d26b9)), closes [#6553](https://github.com/mikro-orm/mikro-orm/issues/6553) * **postgres:** fix schema diffing on m:1 relations targeting a native enum PK ([a76805e](https://github.com/mikro-orm/mikro-orm/commit/a76805eb3346153e4142bad5b1b8f3512010cc49)), closes [#6557](https://github.com/mikro-orm/mikro-orm/issues/6557) * **postgres:** fix schema diffing on m:1 relations targeting a native enum PK ([e059375](https://github.com/mikro-orm/mikro-orm/commit/e05937579411828ec23dc0e787cba7efd63cca80)), closes [#6557](https://github.com/mikro-orm/mikro-orm/issues/6557) ### Features[​](#features-10 "Direct link to Features") * **core:** add `includeCount` option to `em.findByCursor` ([#6536](https://github.com/mikro-orm/mikro-orm/issues/6536)) ([eeae0d4](https://github.com/mikro-orm/mikro-orm/commit/eeae0d421d42752d52ddae62126adc25e6bf2cee)), closes [#4626](https://github.com/mikro-orm/mikro-orm/issues/4626) ## [6.4.11](https://github.com/mikro-orm/mikro-orm/compare/v6.4.10...v6.4.11) (2025-03-21)[​](#6411-2025-03-21 "Direct link to 6411-2025-03-21") ### Bug Fixes[​](#bug-fixes-20 "Direct link to Bug Fixes") * **core:** fix metadata validation for polymorphic embedded properties ([61bd2c3](https://github.com/mikro-orm/mikro-orm/commit/61bd2c3da05ef43fedde579622c54dea08e1f2ac)), closes [#6522](https://github.com/mikro-orm/mikro-orm/issues/6522) * **core:** fix wildcard schema resolution on pivot tables ([c43afa6](https://github.com/mikro-orm/mikro-orm/commit/c43afa608baf5947621b4e19c70ee864f54c54a7)), closes [#6516](https://github.com/mikro-orm/mikro-orm/issues/6516) * **core:** respect EM schema when populating nested relations with wildcard schema ([765eb69](https://github.com/mikro-orm/mikro-orm/commit/765eb69c3941c0ec87faf9d0a9f6d8818f8134a9)), closes [#6511](https://github.com/mikro-orm/mikro-orm/issues/6511) * **mongo:** do not create migrations collection by default ([#6517](https://github.com/mikro-orm/mikro-orm/issues/6517)) ([154dafc](https://github.com/mikro-orm/mikro-orm/commit/154dafc26d417a2ecb93c4c7081d5a05ff4ee924)) * **mssql:** fix upsert with an explicit merge array ([4b57d3a](https://github.com/mikro-orm/mikro-orm/commit/4b57d3a52aa422d1fcb671fc4805336d724a1aff)), closes [#6534](https://github.com/mikro-orm/mikro-orm/issues/6534) * **postgres:** cockroachdb may not require `unmarshallArray` ([#6501](https://github.com/mikro-orm/mikro-orm/issues/6501)) ([0661942](https://github.com/mikro-orm/mikro-orm/commit/0661942b009d5299c0a19ed688cc461b24d988a9)) * **sqlite:** do not ensure directory exists when `dbName` is `:memory:` or URL ([b0f97ed](https://github.com/mikro-orm/mikro-orm/commit/b0f97ed9408d021046a0ee50fb5dbf9d98d72f3e)), closes [#6533](https://github.com/mikro-orm/mikro-orm/issues/6533) ## [6.4.10](https://github.com/mikro-orm/mikro-orm/compare/v6.4.9...v6.4.10) (2025-03-16)[​](#6410-2025-03-16 "Direct link to 6410-2025-03-16") ### Bug Fixes[​](#bug-fixes-21 "Direct link to Bug Fixes") * **core:** fix result mapping of polymorphic embeddables which shadowed properties ([4edde4c](https://github.com/mikro-orm/mikro-orm/commit/4edde4cb8753201a85e7ac8311ef68b093144e97)), closes [#6510](https://github.com/mikro-orm/mikro-orm/issues/6510) * **core:** improve inference of the repository type ([70cc33e](https://github.com/mikro-orm/mikro-orm/commit/70cc33e2a172910c20a938f14219c31d5a0345cf)), closes [#6497](https://github.com/mikro-orm/mikro-orm/issues/6497) * **core:** improve TS detection logic ([#6492](https://github.com/mikro-orm/mikro-orm/issues/6492)) ([858501d](https://github.com/mikro-orm/mikro-orm/commit/858501d94b0c2f10cb53b99f44f64a6e8d98c2f6)), closes [#6491](https://github.com/mikro-orm/mikro-orm/issues/6491) * **core:** support nested polymorphic embeddables ([18d8251](https://github.com/mikro-orm/mikro-orm/commit/18d82519ebd494dd66e54edb88a195450a078bed)), closes [#6487](https://github.com/mikro-orm/mikro-orm/issues/6487) * **mongo:** ensure connection when using schema generator ([4abc70e](https://github.com/mikro-orm/mikro-orm/commit/4abc70e5d3950640d274a7a3c99c47748c7f6d1b)), closes [#6495](https://github.com/mikro-orm/mikro-orm/issues/6495) ### Performance Improvements[​](#performance-improvements-4 "Direct link to Performance Improvements") * **core:** fix consecutive metadata discovery taking too long because of STI ([f79b64b](https://github.com/mikro-orm/mikro-orm/commit/f79b64b604e1e88d92f6c1169b7f66e37b033238)), closes [#6509](https://github.com/mikro-orm/mikro-orm/issues/6509) ## [6.4.9](https://github.com/mikro-orm/mikro-orm/compare/v6.4.8...v6.4.9) (2025-03-07)[​](#649-2025-03-07 "Direct link to 649-2025-03-07") ### Bug Fixes[​](#bug-fixes-22 "Direct link to Bug Fixes") * **core:** ensure correct alias is used in complex join conditions ([328c809](https://github.com/mikro-orm/mikro-orm/commit/328c8097f690056ec188a1e954162e04fc7bd442)), closes [#6484](https://github.com/mikro-orm/mikro-orm/issues/6484) * **core:** fix type of virtual entity `expression` callback ([a13a8a0](https://github.com/mikro-orm/mikro-orm/commit/a13a8a0c91bc0e51125d5e39e22ec038c0c56399)), closes [#6481](https://github.com/mikro-orm/mikro-orm/issues/6481) * **core:** skip `convertToDatabaseValueSQL` for missing values ([63b028b](https://github.com/mikro-orm/mikro-orm/commit/63b028b05bfc5810f87046947cc74da097dc01e7)), closes [#6470](https://github.com/mikro-orm/mikro-orm/issues/6470) * **core:** skip TS support detection via `require.extensions` ([#6488](https://github.com/mikro-orm/mikro-orm/issues/6488)) ([3efdcd0](https://github.com/mikro-orm/mikro-orm/commit/3efdcd0a00d038b2eb24a668329f4b1cea46b2a2)), closes [/github.com/nodejs/node/pull/57298#issuecomment-2703430792](https://github.com//github.com/nodejs/node/pull/57298/issues/issuecomment-2703430792) * **schema:** support indexes on inlined embeddables ([6689c02](https://github.com/mikro-orm/mikro-orm/commit/6689c02bae207a7648a4fb356cd3aa4212dd0796)), closes [#6469](https://github.com/mikro-orm/mikro-orm/issues/6469) ## [6.4.8](https://github.com/mikro-orm/mikro-orm/compare/v6.4.7...v6.4.8) (2025-03-06)[​](#648-2025-03-06 "Direct link to 648-2025-03-06") ### Bug Fixes[​](#bug-fixes-23 "Direct link to Bug Fixes") * **core:** do not cache internal `Collection` reference to `EntityManager` ([1c07cab](https://github.com/mikro-orm/mikro-orm/commit/1c07cab0ae275db2c4a549b9da6d3d0e2ed81dda)), closes [#6453](https://github.com/mikro-orm/mikro-orm/issues/6453) * **core:** ensure bigint types don't produce extra updates with joined strategy ([70063e0](https://github.com/mikro-orm/mikro-orm/commit/70063e00cc0fcf3e0af00c7647635f47a4f4a5b4)), closes [#6478](https://github.com/mikro-orm/mikro-orm/issues/6478) * **core:** fix serialization of collections with composite entities via `getIdentifiers` ([4effa18](https://github.com/mikro-orm/mikro-orm/commit/4effa1879b01e2cde997725fb3cfb598359bd621)), closes [#6479](https://github.com/mikro-orm/mikro-orm/issues/6479) * **core:** respect check constraints from child STI entities ([8cfd6e3](https://github.com/mikro-orm/mikro-orm/commit/8cfd6e3a335cdee84ce3b6f5f98ea6fde3550fd5)), closes [#6450](https://github.com/mikro-orm/mikro-orm/issues/6450) * **core:** respect Collection property `orderBy` when dataloader is enabled ([#6467](https://github.com/mikro-orm/mikro-orm/issues/6467)) ([6322ce8](https://github.com/mikro-orm/mikro-orm/commit/6322ce8bbec4042784722e721c516f2982581461)) * **query-builder:** apply filters to auto-joined relations ([#6480](https://github.com/mikro-orm/mikro-orm/issues/6480)) ([6b1d7ee](https://github.com/mikro-orm/mikro-orm/commit/6b1d7ee63b9a28305e9465845bf445fe1f588d03)), closes [#6458](https://github.com/mikro-orm/mikro-orm/issues/6458) * **query-builder:** do not inline PK nested in a `$not` query ([5931d28](https://github.com/mikro-orm/mikro-orm/commit/5931d2819b74ae9a5b996be404a884eeb78b0cbf)), closes [#6452](https://github.com/mikro-orm/mikro-orm/issues/6452) * **query-builder:** revert recent changes to composite key sharing ([2bd973d](https://github.com/mikro-orm/mikro-orm/commit/2bd973dae0bc125cf43620524bd5b4f3fc327993)), closes [#6359](https://github.com/mikro-orm/mikro-orm/issues/6359) ### Features[​](#features-11 "Direct link to Features") * **entity-generator:** pass through `orderBy` option to the output ([#6466](https://github.com/mikro-orm/mikro-orm/issues/6466)) ([1142f40](https://github.com/mikro-orm/mikro-orm/commit/1142f402883c2524ca5f0fef09c3912cbd191398)) ## [6.4.7](https://github.com/mikro-orm/mikro-orm/compare/v6.4.6...v6.4.7) (2025-02-22)[​](#647-2025-02-22 "Direct link to 647-2025-02-22") ### Bug Fixes[​](#bug-fixes-24 "Direct link to Bug Fixes") * **core:** enforce selection of discriminator column when partial loading is used ([80c1b5b](https://github.com/mikro-orm/mikro-orm/commit/80c1b5b9b5b73c8b6cf51e941d2afaeac85a2809)), closes [#6436](https://github.com/mikro-orm/mikro-orm/issues/6436) * **core:** ensure `@Check` expression callback works without explicit type ([5aa77db](https://github.com/mikro-orm/mikro-orm/commit/5aa77db3add74959551043e1fe6f7d119e5728ac)), closes [#6429](https://github.com/mikro-orm/mikro-orm/issues/6429) * **core:** ensure partial loading allows to fetch missing values ([ecba90f](https://github.com/mikro-orm/mikro-orm/commit/ecba90f11bc68d15039f2a8b2d4e0a3e908c085f)), closes [#6395](https://github.com/mikro-orm/mikro-orm/issues/6395) * **core:** fix extra updates with joined strategy caused by custom types ([2e1ab9a](https://github.com/mikro-orm/mikro-orm/commit/2e1ab9a1d3c5ea57be31fc341c32bdb8e48d2e6b)), closes [#6432](https://github.com/mikro-orm/mikro-orm/issues/6432) * **core:** fix querying by a composite property with shared columns ([#6445](https://github.com/mikro-orm/mikro-orm/issues/6445)) ([396ee70](https://github.com/mikro-orm/mikro-orm/commit/396ee70dff86d3dff1928f8d61ac837f271ec3a3)), closes [#6359](https://github.com/mikro-orm/mikro-orm/issues/6359) * **core:** fix support for custom types on PKs in `em.upsert` ([57a4549](https://github.com/mikro-orm/mikro-orm/commit/57a45498776814982afb489e254aad4b0711dc38)), closes [#6434](https://github.com/mikro-orm/mikro-orm/issues/6434) * **core:** fix type error when getting a composite PK value ([2d4d2be](https://github.com/mikro-orm/mikro-orm/commit/2d4d2be1bd04cc2c040fa975d181d65a44aeca92)), closes [#6430](https://github.com/mikro-orm/mikro-orm/issues/6430) * **core:** fix type resolution in `em.assign` with nullable properties ([4f13552](https://github.com/mikro-orm/mikro-orm/commit/4f1355263f9802e359d70cc1c266559e97fd8245)), closes [#6426](https://github.com/mikro-orm/mikro-orm/issues/6426) * **mssql:** fix support for upsert on compound unique constraints ([#6447](https://github.com/mikro-orm/mikro-orm/issues/6447)) ([43d1ff5](https://github.com/mikro-orm/mikro-orm/commit/43d1ff582778555b867ba05278587fea86c98b85)), closes [#6390](https://github.com/mikro-orm/mikro-orm/issues/6390) * **schema:** respect schema from config in `clearDatabase()` ([0ab99a1](https://github.com/mikro-orm/mikro-orm/commit/0ab99a1bcf1a2e3a6d4deb0cb2ff0012c5c7db84)), closes [#6405](https://github.com/mikro-orm/mikro-orm/issues/6405) * **sql:** quote `raw().as()` field aliases ([d9716d7](https://github.com/mikro-orm/mikro-orm/commit/d9716d7c42ec97708378d1cc99d8bb27efd417dc)) * **sql:** respect EM schema when clearing not populated 1 :m collection of wildcard entities ([12223e3](https://github.com/mikro-orm/mikro-orm/commit/12223e308ccfca0c3cc87650e2748cf035351655)), closes [#6387](https://github.com/mikro-orm/mikro-orm/issues/6387) ### Features[​](#features-12 "Direct link to Features") * **core:** add `entityName` as argument for filter `cond` callback ([#6424](https://github.com/mikro-orm/mikro-orm/issues/6424)) ([f358dbf](https://github.com/mikro-orm/mikro-orm/commit/f358dbf939fd1728aadfe2876c7edbcc0782a010)) * **core:** improve typings for `@Entity`, `@Index` and `@Unique` decorators ([#6416](https://github.com/mikro-orm/mikro-orm/issues/6416)) ([833a640](https://github.com/mikro-orm/mikro-orm/commit/833a6403ca393c341fca8e6207652d063fdb0677)), closes [/github.com/mikro-orm/mikro-orm/blob/a6c48fd1b436edcd2bcead74ebfec42bb65da043/packages/core/src/errors.ts#L214](https://github.com//github.com/mikro-orm/mikro-orm/blob/a6c48fd1b436edcd2bcead74ebfec42bb65da043/packages/core/src/errors.ts/issues/L214) ### Performance Improvements[​](#performance-improvements-5 "Direct link to Performance Improvements") * **reflection:** only consider entity files instead of evaluating the whole project ([#6439](https://github.com/mikro-orm/mikro-orm/issues/6439)) ([6f22fa6](https://github.com/mikro-orm/mikro-orm/commit/6f22fa660d9c90fdc38c4a447b699bc6a61c391e)) ## [6.4.6](https://github.com/mikro-orm/mikro-orm/compare/v6.4.5...v6.4.6) (2025-02-12)[​](#646-2025-02-12 "Direct link to 646-2025-02-12") ### Bug Fixes[​](#bug-fixes-25 "Direct link to Bug Fixes") * **query-builder:** fix default schema resolution when root entity has a custom schema ([#6380](https://github.com/mikro-orm/mikro-orm/issues/6380)) ([746f43f](https://github.com/mikro-orm/mikro-orm/commit/746f43fd7ac513962c23930c9fe3ad31148a2af2)), closes [#6373](https://github.com/mikro-orm/mikro-orm/issues/6373) * **sqlite:** ensure correct order of columns in temp table ([#6391](https://github.com/mikro-orm/mikro-orm/issues/6391)) ([fc51bd5](https://github.com/mikro-orm/mikro-orm/commit/fc51bd523ba8338dec88571b93e56df70f0b8f40)), closes [#6145](https://github.com/mikro-orm/mikro-orm/issues/6145) ### Features[​](#features-13 "Direct link to Features") * **seeder:** make `.each()` function receive `index: number` argument ([#6393](https://github.com/mikro-orm/mikro-orm/issues/6393)) ([8613388](https://github.com/mikro-orm/mikro-orm/commit/86133884b2200d319a431ae04ef38acb3d306f83)) * **seeder:** pass params to `.definition()` function as argument ([#6396](https://github.com/mikro-orm/mikro-orm/issues/6396)) ([b45db20](https://github.com/mikro-orm/mikro-orm/commit/b45db205df964dd45438468775825dea1186fce7)) * **seeder:** pass params to `.definition()` function as argument ([#6396](https://github.com/mikro-orm/mikro-orm/issues/6396)) ([77468ee](https://github.com/mikro-orm/mikro-orm/commit/77468ee2832c81f7e76a495b8dfccaabcffa38e8)) ## [6.4.5](https://github.com/mikro-orm/mikro-orm/compare/v6.4.4...v6.4.5) (2025-01-30)[​](#645-2025-01-30 "Direct link to 645-2025-01-30") ### Bug Fixes[​](#bug-fixes-26 "Direct link to Bug Fixes") * **core:** allow querying by embedded instance with `em.findAndCount` ([#6370](https://github.com/mikro-orm/mikro-orm/issues/6370)) ([9e60817](https://github.com/mikro-orm/mikro-orm/commit/9e60817b41185d321b637f3161367562258e6506)), closes [#6353](https://github.com/mikro-orm/mikro-orm/issues/6353) * **core:** ensure populating `Ref` properties do not result in `TypeError` ([7d34645](https://github.com/mikro-orm/mikro-orm/commit/7d34645805e81f2f106fd9bacf45c686b898a0f6)) * **core:** fix creating new entities with composite props that share a column ([68c79b2](https://github.com/mikro-orm/mikro-orm/commit/68c79b20781302a6aa1ba5808464797db50e43e1)), closes [#6360](https://github.com/mikro-orm/mikro-orm/issues/6360) * **core:** fix processing of queries for composite props that share a column ([c01522d](https://github.com/mikro-orm/mikro-orm/commit/c01522dd8c72f935c2c846b3bb01bba72410bf91)), closes [#6359](https://github.com/mikro-orm/mikro-orm/issues/6359) ### Features[​](#features-14 "Direct link to Features") * **migrations:** allow returning promise from `generateMigrationFile` ([af75d06](https://github.com/mikro-orm/mikro-orm/commit/af75d06dd4dd0788b16b8b227187bc465650164a)), closes [#6364](https://github.com/mikro-orm/mikro-orm/issues/6364) ## [6.4.4](https://github.com/mikro-orm/mikro-orm/compare/v6.4.3...v6.4.4) (2025-01-23)[​](#644-2025-01-23 "Direct link to 644-2025-01-23") ### Bug Fixes[​](#bug-fixes-27 "Direct link to Bug Fixes") * **core:** do not persist embeddables via `em.create()` ([c6ed010](https://github.com/mikro-orm/mikro-orm/commit/c6ed010159b108c4010480aab0c5b498e0c8861e)) * **core:** fix multi insert when some values of a not-null column with default are missing ([cd8f6e1](https://github.com/mikro-orm/mikro-orm/commit/cd8f6e12eb53d6e8f2ab416dc080838d10d29d5e)) * **core:** ignore partial loading hint on JSON column when pruning relations ([fbdea0a](https://github.com/mikro-orm/mikro-orm/commit/fbdea0aa43a03765a3b0234caf2e380590430bc3)) * **core:** reduce chance of collisions of internal embedded properties ([#6354](https://github.com/mikro-orm/mikro-orm/issues/6354)) ([98ab6a2](https://github.com/mikro-orm/mikro-orm/commit/98ab6a28fc6c9378ab77f523d4e48c651c5ba910)), closes [#6351](https://github.com/mikro-orm/mikro-orm/issues/6351) * **query-builder:** process custom types in join conditions ([3a6153f](https://github.com/mikro-orm/mikro-orm/commit/3a6153f06805362cef2f74c9972cbd792fa92939)), closes [#6357](https://github.com/mikro-orm/mikro-orm/issues/6357) * **schema:** fixed handling of check constraints on MariaDB before 10.5.10 ([#6352](https://github.com/mikro-orm/mikro-orm/issues/6352)) ([7d41e22](https://github.com/mikro-orm/mikro-orm/commit/7d41e2227780e280500104e7c2f9c8136fd6ade5)), closes [#6350](https://github.com/mikro-orm/mikro-orm/issues/6350) ### Features[​](#features-15 "Direct link to Features") * **core:** add `ignoreUndefined` flag to `assign` helper ([#6339](https://github.com/mikro-orm/mikro-orm/issues/6339)) ([bdcce17](https://github.com/mikro-orm/mikro-orm/commit/bdcce1791ad8a6c69274bc7b82aac77667329b92)), closes [#6338](https://github.com/mikro-orm/mikro-orm/issues/6338) * **core:** allow raw query fragments in `assign()` helper data ([c47ac64](https://github.com/mikro-orm/mikro-orm/commit/c47ac645e8aa44f23c8fe22039bc7a4db4c4036c)), closes [#6346](https://github.com/mikro-orm/mikro-orm/issues/6346) * **core:** support `disableIdentityMap` in `em.upsert/Many()` ([e8e9d4c](https://github.com/mikro-orm/mikro-orm/commit/e8e9d4cad8b1a22cee083c419714ec55d27c3e0f)), closes [#6345](https://github.com/mikro-orm/mikro-orm/issues/6345) * **seeder:** make `Factory.em` protected ([#6340](https://github.com/mikro-orm/mikro-orm/issues/6340)) ([e66d843](https://github.com/mikro-orm/mikro-orm/commit/e66d84398cdcd1fa82d72a014f87530ebb2ff34a)) ## [6.4.3](https://github.com/mikro-orm/mikro-orm/compare/v6.4.2...v6.4.3) (2025-01-08)[​](#643-2025-01-08 "Direct link to 643-2025-01-08") ### Bug Fixes[​](#bug-fixes-28 "Direct link to Bug Fixes") * **entity-generator:** output explicit `referencedColumnNames` when sharing a column in a composite foreign key ([85db3c1](https://github.com/mikro-orm/mikro-orm/commit/85db3c1cadd13d80ebb8010c64a5d50a9024dab7)), closes [#6323](https://github.com/mikro-orm/mikro-orm/issues/6323) * **entity-generator:** skip bidirectional relation if target metadata doesn't exist ([#6328](https://github.com/mikro-orm/mikro-orm/issues/6328)) ([c7984fe](https://github.com/mikro-orm/mikro-orm/commit/c7984fe162b635c28fdf3b8b1b365346f4f67c46)) * **query-builder:** ignore lock mode in paginate subquery and keep it only on top level ([3b7fdba](https://github.com/mikro-orm/mikro-orm/commit/3b7fdba0ce00cc6534453ff3082995b17cb22808)) * **schema:** infer `columnTypes` when sharing a column in a composite foreign key ([6781194](https://github.com/mikro-orm/mikro-orm/commit/678119475cee860dd4684c9f4d903a3d4028b8a3)), closes [#6323](https://github.com/mikro-orm/mikro-orm/issues/6323) * **schema:** output deferrable FKs in sqlite `create table` statement ([6bbec01](https://github.com/mikro-orm/mikro-orm/commit/6bbec011de7b26a6d3771a177970f62062f178d3)) * **schema:** support `unsigned` for `decimal` and `double` types ([d3ce313](https://github.com/mikro-orm/mikro-orm/commit/d3ce313e0494d2825dfaf6fccf26ccaf4fdc78c8)), closes [#6318](https://github.com/mikro-orm/mikro-orm/issues/6318) ### Features[​](#features-16 "Direct link to Features") * **migrations:** allow configuring snapshot via env vars ([59f0593](https://github.com/mikro-orm/mikro-orm/commit/59f05935e498735ca33f82fdd61f10d23634f0cd)), closes [#6327](https://github.com/mikro-orm/mikro-orm/issues/6327) * **mongo:** include MikroORM version in MongoDB handshake ([#6326](https://github.com/mikro-orm/mikro-orm/issues/6326)) ([f501a91](https://github.com/mikro-orm/mikro-orm/commit/f501a91b85eb73aa87c4b226e51295c3598d3d17)) ## [6.4.2](https://github.com/mikro-orm/mikro-orm/compare/v6.4.1...v6.4.2) (2024-12-22)[​](#642-2024-12-22 "Direct link to 642-2024-12-22") ### Bug Fixes[​](#bug-fixes-29 "Direct link to Bug Fixes") * **core:** correctly handle populate of `mapToPk` relations ([#6309](https://github.com/mikro-orm/mikro-orm/issues/6309)) ([61fb8f5](https://github.com/mikro-orm/mikro-orm/commit/61fb8f59245f3ccc6e325da7cf39a39dd0fd7b24)), closes [#6265](https://github.com/mikro-orm/mikro-orm/issues/6265) * **core:** fix cursor pagination with POJO cursor and relations ([de1ae67](https://github.com/mikro-orm/mikro-orm/commit/de1ae67a62c8f14e471d34168e8e16768188d124)), closes [#6308](https://github.com/mikro-orm/mikro-orm/issues/6308) * **core:** prevent reinsertion of an entity referenced by a formula when it is removed from a collection ([#6265](https://github.com/mikro-orm/mikro-orm/issues/6265)) ([8f45243](https://github.com/mikro-orm/mikro-orm/commit/8f45243741d469a462fc5f7a7f944ac8dc053775)) * **entity-generator:** support multi-line comments ([#6290](https://github.com/mikro-orm/mikro-orm/issues/6290)) ([4fdb169](https://github.com/mikro-orm/mikro-orm/commit/4fdb1696b5527842fa2c1975a7961b478e71dfe3)), closes [#6286](https://github.com/mikro-orm/mikro-orm/issues/6286) * **query-builder:** combine serialization hint from managed entities and QueryBuilder result ([#6307](https://github.com/mikro-orm/mikro-orm/issues/6307)) ([7d1a0dc](https://github.com/mikro-orm/mikro-orm/commit/7d1a0dc7f69e7e63075f5e78265beb5856cd731c)) * **query-builder:** improve detection of to-many joins in `qb.getCount()` ([4e5b18b](https://github.com/mikro-orm/mikro-orm/commit/4e5b18bb713a5ae9fe939e2e300849bfa77a1ab7)), closes [#6291](https://github.com/mikro-orm/mikro-orm/issues/6291) * **reflection:** fix source file detection after update to ts-morph v24 ([d9716a6](https://github.com/mikro-orm/mikro-orm/commit/d9716a65be0ab7f4aca369ea47c22c85352ee38d)), closes [#6297](https://github.com/mikro-orm/mikro-orm/issues/6297) ### Features[​](#features-17 "Direct link to Features") * **core:** validate missing properties in cursor ([d175c9d](https://github.com/mikro-orm/mikro-orm/commit/d175c9d4b7b870d1af2c5d5b376c4ca8111e8004)), closes [#6308](https://github.com/mikro-orm/mikro-orm/issues/6308) ## [6.4.1](https://github.com/mikro-orm/mikro-orm/compare/v6.4.0...v6.4.1) (2024-12-08)[​](#641-2024-12-08 "Direct link to 641-2024-12-08") ### Bug Fixes[​](#bug-fixes-30 "Direct link to Bug Fixes") * **core:** consider nested queries on JSON properties as scalars ([920b019](https://github.com/mikro-orm/mikro-orm/commit/920b0196b3d6ead5aa240f72271de1779a572c83)), closes [#6246](https://github.com/mikro-orm/mikro-orm/issues/6246) * **core:** fix upserting properties with custom types ([036b84d](https://github.com/mikro-orm/mikro-orm/commit/036b84d7c7d5203f691b60449b4f021b8c214977)), closes [#6241](https://github.com/mikro-orm/mikro-orm/issues/6241) * **core:** improve handling of reference wrapper inside constructor parameters ([db7cb8a](https://github.com/mikro-orm/mikro-orm/commit/db7cb8ab350663c0e4db0640aee3dd8c24a5acfa)), closes [#6266](https://github.com/mikro-orm/mikro-orm/issues/6266) * **core:** skip extra updates on properties with deferred constraints ([85a649b](https://github.com/mikro-orm/mikro-orm/commit/85a649b04059f83ab3f3e2de6da6134801877bb3)), closes [#6266](https://github.com/mikro-orm/mikro-orm/issues/6266) * **core:** support upserting entities with FK as PK when the target entity has composite PK ([#6275](https://github.com/mikro-orm/mikro-orm/issues/6275)) ([2ae9ae7](https://github.com/mikro-orm/mikro-orm/commit/2ae9ae7176aef12d834e2c6e548f31a606781f01)), closes [#6252](https://github.com/mikro-orm/mikro-orm/issues/6252) # [6.4.0](https://github.com/mikro-orm/mikro-orm/compare/v6.3.13...v6.4.0) (2024-11-11) ### Bug Fixes[​](#bug-fixes-31 "Direct link to Bug Fixes") * **core:** add missing `getterName` option ([aa18e57](https://github.com/mikro-orm/mikro-orm/commit/aa18e57c20547d0cdbda27cb2dbfb610c9591e92)), closes [#6127](https://github.com/mikro-orm/mikro-orm/issues/6127) * **core:** allow upserting POJO with embeddded instances ([159fd4a](https://github.com/mikro-orm/mikro-orm/commit/159fd4abf3cdf6b8ee2296c71999b888b7fda96f)), closes [#6198](https://github.com/mikro-orm/mikro-orm/issues/6198) * **core:** check that inverse side exists when mapping collection items via dataloader ([#6149](https://github.com/mikro-orm/mikro-orm/issues/6149)) ([f580598](https://github.com/mikro-orm/mikro-orm/commit/f580598a3b6350a9b850b5df1e073f708b18ee58)), closes [#6148](https://github.com/mikro-orm/mikro-orm/issues/6148) * **core:** ensure decimal type that maps to number won't produce extra updates ([cc67ca4](https://github.com/mikro-orm/mikro-orm/commit/cc67ca47baeae504f0bd5af18603b77bba2bfdf5)) * **core:** fix double processing of custom types in `em.nativeUpdate` ([1b39846](https://github.com/mikro-orm/mikro-orm/commit/1b398465d4c9b1ef76983ebefd50cda0d344ff8e)), closes [#6206](https://github.com/mikro-orm/mikro-orm/issues/6206) * **core:** fix explicit serialization typing via `wrap().serialize` and `BaseEntity.serialize` ([d93b325](https://github.com/mikro-orm/mikro-orm/commit/d93b3252277fb30f424bcd2e7e8228b5f5d13eeb)) * **core:** ignore collection properties when entity constructors are enforced ([78a5937](https://github.com/mikro-orm/mikro-orm/commit/78a593720a0713e5a1d414c4d816f4a29536d0ae)) * **core:** improve comparison of decimal values ([66e60cb](https://github.com/mikro-orm/mikro-orm/commit/66e60cb04463fb6163d2f0a386d9fd9be36fe257)), closes [#6194](https://github.com/mikro-orm/mikro-orm/issues/6194) * **core:** improve error handling for comparing invalid dates ([#6120](https://github.com/mikro-orm/mikro-orm/issues/6120)) ([1aa940b](https://github.com/mikro-orm/mikro-orm/commit/1aa940bbd2b1eeddfb3d662c740b346e72e4d74b)) * **core:** pass correct values to constructor for props using custom types ([58c8ce4](https://github.com/mikro-orm/mikro-orm/commit/58c8ce4db54f497fe9f99a2edcdfcf1f2c0ced63)) * **core:** rename `tsNode` option to `preferTs` ([#6214](https://github.com/mikro-orm/mikro-orm/issues/6214)) ([194f511](https://github.com/mikro-orm/mikro-orm/commit/194f511ed2102db93ab5a437348097b2ebbd8bfd)) * **core:** revert workaround for `Date` properties in `clone()` helper ([c1af3db](https://github.com/mikro-orm/mikro-orm/commit/c1af3dbdb4be4388c9fa16a3c910b01de5c28bf3)), closes [#6118](https://github.com/mikro-orm/mikro-orm/issues/6118) * **core:** use db value for identity map key of PKs with custom type ([aa1dd3c](https://github.com/mikro-orm/mikro-orm/commit/aa1dd3c101f187df5ca425c4b0468f65df47ffaa)), closes [#6150](https://github.com/mikro-orm/mikro-orm/issues/6150) * **entity-generator:** output inverse sides for pure pivot tables when outputted ([#6196](https://github.com/mikro-orm/mikro-orm/issues/6196)) ([e4b048b](https://github.com/mikro-orm/mikro-orm/commit/e4b048ba7902705769662eb9fe011c0029870400)), closes [#6192](https://github.com/mikro-orm/mikro-orm/issues/6192) * **mssql:** map property names to field names when processing composite keys ([cf687e8](https://github.com/mikro-orm/mikro-orm/commit/cf687e87479785bffb79ebe76690e0942df90d86)), closes [#6204](https://github.com/mikro-orm/mikro-orm/issues/6204) * **postgres:** make upsert where conditions fully qualified ([b4b3cab](https://github.com/mikro-orm/mikro-orm/commit/b4b3cab7ec96479d2a9e46d5f0aebdd9f890e723)), closes [#6203](https://github.com/mikro-orm/mikro-orm/issues/6203) * **postgres:** return all results for multi statement raw queries ([adcef5f](https://github.com/mikro-orm/mikro-orm/commit/adcef5f5ff9c9bb58edfff40564f19101092f2ae)), closes [#6009](https://github.com/mikro-orm/mikro-orm/issues/6009) * **postgres:** support `raw` fragments in `qb.distinctOn()` ([f8580c8](https://github.com/mikro-orm/mikro-orm/commit/f8580c8c74e8d8677dfb37b67689d3a0e31a2630)) * **query-builder:** fix detection of raw fragments in update queries with not matching field names ([22b918f](https://github.com/mikro-orm/mikro-orm/commit/22b918f04dfd6868e47c5b8ebba3e5ed0160d1f2)), closes [#6177](https://github.com/mikro-orm/mikro-orm/issues/6177) * **query-builder:** fix serialization of nested relations ([3850c1e](https://github.com/mikro-orm/mikro-orm/commit/3850c1e2b2581ea205c39e80171acb039f10561d)), closes [#6194](https://github.com/mikro-orm/mikro-orm/issues/6194) ### Features[​](#features-18 "Direct link to Features") * **core:** add `@Transactional()` decorator ([#6143](https://github.com/mikro-orm/mikro-orm/issues/6143)) ([babe4da](https://github.com/mikro-orm/mikro-orm/commit/babe4dad18d6eb7b0af154c1db2fb2d7adac3c7a)) * **core:** add `onQuery` hook ([#6200](https://github.com/mikro-orm/mikro-orm/issues/6200)) ([6f98b3c](https://github.com/mikro-orm/mikro-orm/commit/6f98b3cc14c88782f6be6cbb9979064359bfdd73)) * **core:** add `prefixMode` option to embeddables ([#6113](https://github.com/mikro-orm/mikro-orm/issues/6113)) ([5df26e1](https://github.com/mikro-orm/mikro-orm/commit/5df26e1152e060d793d1b9646ab15c8d23fc5c1f)), closes [#6112](https://github.com/mikro-orm/mikro-orm/issues/6112) * **core:** allow defining multiple named configurations in one config file ([#6201](https://github.com/mikro-orm/mikro-orm/issues/6201)) ([cecea34](https://github.com/mikro-orm/mikro-orm/commit/cecea34c866dcb5a567a226e011b37015d7b8052)), closes [#6067](https://github.com/mikro-orm/mikro-orm/issues/6067) * **core:** improve support for sharing columns in multiple properties ([05318c1](https://github.com/mikro-orm/mikro-orm/commit/05318c138a0ae4fdcc03e65bd50c0bd8a4e831e7)) * **core:** schedule orphan removal on old 1:1 relations regardless of their init state ([fc9a1c1](https://github.com/mikro-orm/mikro-orm/commit/fc9a1c1c0102eab2bb9fef2def7144e857cce6e8)), closes [#5213](https://github.com/mikro-orm/mikro-orm/issues/5213) * **core:** upsert managed entities ([#6197](https://github.com/mikro-orm/mikro-orm/issues/6197)) ([a3b5e57](https://github.com/mikro-orm/mikro-orm/commit/a3b5e5704918a44c4d30b1c5a007b9cc648f6130)), closes [#6055](https://github.com/mikro-orm/mikro-orm/issues/6055) * **core:** validate non-persistent relations are not composite ([#6216](https://github.com/mikro-orm/mikro-orm/issues/6216)) ([16c8b48](https://github.com/mikro-orm/mikro-orm/commit/16c8b48c2e44370c87c227474089b629c56f41f3)) * **entity-generator:** added support for forceUndefined being false ([#5849](https://github.com/mikro-orm/mikro-orm/issues/5849)) ([e0ce840](https://github.com/mikro-orm/mikro-orm/commit/e0ce8405e8ffb680a55b829dd80ae855fe2472dc)) * **migrations:** allow passing list of classes to `migrationsList` ([#6102](https://github.com/mikro-orm/mikro-orm/issues/6102)) ([35d84ac](https://github.com/mikro-orm/mikro-orm/commit/35d84ac7eb407d12dba5397385a0eb8135d8d4b5)), closes [#6099](https://github.com/mikro-orm/mikro-orm/issues/6099) * **migrations:** allow subscribing to migrator events ([18a425c](https://github.com/mikro-orm/mikro-orm/commit/18a425c091af0535d6b43dfb797edade58822fd2)), closes [#5763](https://github.com/mikro-orm/mikro-orm/issues/5763) * **mssql:** add support for smalldatetime type ([#6128](https://github.com/mikro-orm/mikro-orm/issues/6128)) ([998509b](https://github.com/mikro-orm/mikro-orm/commit/998509bf22dcd85f87e2506323ca4e3ceee052f6)), closes [#5904](https://github.com/mikro-orm/mikro-orm/issues/5904) * **query-builder:** add `qb.andHaving()` and `qb.orHaving()` methods ([c36d4c8](https://github.com/mikro-orm/mikro-orm/commit/c36d4c846a62f5693d2050840296d7abbf8b8322)), closes [#5796](https://github.com/mikro-orm/mikro-orm/issues/5796) * **query-builder:** allow joins on update queries ([782e227](https://github.com/mikro-orm/mikro-orm/commit/782e227515b95f2c072f93de994f21a9160fd3e3)), closes [#6150](https://github.com/mikro-orm/mikro-orm/issues/6150) * **schema:** diff foreign keys also by the constraint name ([93ade9d](https://github.com/mikro-orm/mikro-orm/commit/93ade9d95c0476ee5543758bd145aa5367ee3fad)), closes [#6146](https://github.com/mikro-orm/mikro-orm/issues/6146) ### Performance Improvements[​](#performance-improvements-6 "Direct link to Performance Improvements") * **schema:** filter tables before fetching table details ([#6138](https://github.com/mikro-orm/mikro-orm/issues/6138)) ([74bf43f](https://github.com/mikro-orm/mikro-orm/commit/74bf43fa34cc129e4561f6ad5596af9ecbba32a9)), closes [#5900](https://github.com/mikro-orm/mikro-orm/issues/5900) ## [6.3.13](https://github.com/mikro-orm/mikro-orm/compare/v6.3.12...v6.3.13) (2024-10-06)[​](#6313-2024-10-06 "Direct link to 6313-2024-10-06") ### Bug Fixes[​](#bug-fixes-32 "Direct link to Bug Fixes") * **core:** add child `SerializeOptions` to custom `serializer` parameters ([dbfddce](https://github.com/mikro-orm/mikro-orm/commit/dbfddceeeadeb55a95c362b79f4983f28bbb0488)), closes [#5968](https://github.com/mikro-orm/mikro-orm/issues/5968) * **core:** fix partial loading on to-many relations ([224613f](https://github.com/mikro-orm/mikro-orm/commit/224613fdfdb2c77a57932ba2360ecd41c7a48efc)), closes [#6097](https://github.com/mikro-orm/mikro-orm/issues/6097) * **core:** fix same-second dates diffing ([#6094](https://github.com/mikro-orm/mikro-orm/issues/6094)) ([cd7ce82](https://github.com/mikro-orm/mikro-orm/commit/cd7ce829a07c844b16430056b032db6947e07356)) * **core:** fix validation for not discovered entity trigger from `Collection` access ([4834920](https://github.com/mikro-orm/mikro-orm/commit/4834920c4f380f87124b7fd569677d1f1db82cb0)) * **core:** ignore non-persisted properties on embeddables ([#6107](https://github.com/mikro-orm/mikro-orm/issues/6107)) ([e688694](https://github.com/mikro-orm/mikro-orm/commit/e6886940b20583fd20fa220a8337fc465bb300b2)), closes [#6105](https://github.com/mikro-orm/mikro-orm/issues/6105) * **core:** respect joined filters on `em.count()` ([#6115](https://github.com/mikro-orm/mikro-orm/issues/6115)) ([4f0bde5](https://github.com/mikro-orm/mikro-orm/commit/4f0bde5d90a11788f25becc380be396b450de8c4)) * **core:** revert making the `$and/$or` arrays `readonly` ([0e0667c](https://github.com/mikro-orm/mikro-orm/commit/0e0667cd6fea374018a0b242959110a8799b96a4)), closes [#6085](https://github.com/mikro-orm/mikro-orm/issues/6085) * **postgres:** improve schema diffing for native enums with explicit schema ([#6114](https://github.com/mikro-orm/mikro-orm/issues/6114)) ([fa537b1](https://github.com/mikro-orm/mikro-orm/commit/fa537b128bb5236c1a0b0efb40cf1d8eb5884985)), closes [#6101](https://github.com/mikro-orm/mikro-orm/issues/6101) * **query-builder:** fix support for update/delete with nested where conditions ([3a451e1](https://github.com/mikro-orm/mikro-orm/commit/3a451e1df531b06809f6e1ba14646943bc2d1703)), closes [#6103](https://github.com/mikro-orm/mikro-orm/issues/6103) * **query-builder:** improve intellisense on several QB methods ([32113b0](https://github.com/mikro-orm/mikro-orm/commit/32113b0feecac2b61dbbd845cf4f473ccbd05d04)) * **query-builder:** use the correct PK field name for inserts without explicit values ([8706f04](https://github.com/mikro-orm/mikro-orm/commit/8706f0440ef18354ae0181235eaa88413e8dbc91)) ### Features[​](#features-19 "Direct link to Features") * **core:** improve error message when only abstract entities are discovered ([3835e40](https://github.com/mikro-orm/mikro-orm/commit/3835e4009bc8ba5fcffb0857450572068a38fe3f)) ### Performance Improvements[​](#performance-improvements-7 "Direct link to Performance Improvements") * **core:** simplify lookup of returned values from batch updates ([6caa82a](https://github.com/mikro-orm/mikro-orm/commit/6caa82acf3d57ab7fcd11af7f625c48d8e989222)) ## [6.3.12](https://github.com/mikro-orm/mikro-orm/compare/v6.3.11...v6.3.12) (2024-10-01)[​](#6312-2024-10-01 "Direct link to 6312-2024-10-01") ### Bug Fixes[​](#bug-fixes-33 "Direct link to Bug Fixes") * **core:** accept `readonly` arrays in operator where conditions ([#6085](https://github.com/mikro-orm/mikro-orm/issues/6085)) ([1ab24fe](https://github.com/mikro-orm/mikro-orm/commit/1ab24fea1bf8682323f43a835661fd9541512af6)) * **mongo:** ensure `Date` properties are correctly cloned and persisted ([8d81985](https://github.com/mikro-orm/mikro-orm/commit/8d819856d488668b81a187d6335997baab2e075c)), closes [#6078](https://github.com/mikro-orm/mikro-orm/issues/6078) * **mongo:** fix persisting objects like `ObjectID` in JSON properties ([#6091](https://github.com/mikro-orm/mikro-orm/issues/6091)) ([c28f06f](https://github.com/mikro-orm/mikro-orm/commit/c28f06fbe85b00b0dc03fd3c2c066f000fe81a90)) * **mongo:** fix populating lazy M :N owning sides ([f7e90cb](https://github.com/mikro-orm/mikro-orm/commit/f7e90cb24b128b0edb4bac696dc06d2b4043cba8)), closes [#6079](https://github.com/mikro-orm/mikro-orm/issues/6079) * **query-builder:** ensure cached `execute('get')` returns a single result instead of an array ([#6084](https://github.com/mikro-orm/mikro-orm/issues/6084)) ([d2da8d0](https://github.com/mikro-orm/mikro-orm/commit/d2da8d0670407fa4fb0e0df9db329b8237016d11)), closes [#6083](https://github.com/mikro-orm/mikro-orm/issues/6083) * **query-builder:** ensure correct return type for `qb.execute()` ([f48e544](https://github.com/mikro-orm/mikro-orm/commit/f48e5443f3fe3539d24a53dcb6a82f280e3999ee)), closes [#6089](https://github.com/mikro-orm/mikro-orm/issues/6089) ### Features[​](#features-20 "Direct link to Features") * **core:** prevent conversion of `many` entities in `oneToMany` from `extractConstructorParams` ([#6093](https://github.com/mikro-orm/mikro-orm/issues/6093)) ([8ba8d7a](https://github.com/mikro-orm/mikro-orm/commit/8ba8d7a77ba42dc762c405ed6f422909db405f1f)), closes [#6092](https://github.com/mikro-orm/mikro-orm/issues/6092) ## [6.3.11](https://github.com/mikro-orm/mikro-orm/compare/v6.3.10...v6.3.11) (2024-09-26)[​](#6311-2024-09-26 "Direct link to 6311-2024-09-26") ### Bug Fixes[​](#bug-fixes-34 "Direct link to Bug Fixes") * **core:** fix diffing of object properties ([55df57f](https://github.com/mikro-orm/mikro-orm/commit/55df57ff1aa84e5d45188d849ba09e91ae6d3642)), closes [#6050](https://github.com/mikro-orm/mikro-orm/issues/6050) * **core:** fix partial loading with `*` on joined strategy ([1f0dbd4](https://github.com/mikro-orm/mikro-orm/commit/1f0dbd4efdd47875368e31db10e4e6f981adc323)), closes [#6045](https://github.com/mikro-orm/mikro-orm/issues/6045) * **core:** properly detect when Windows imports need patching ([#6035](https://github.com/mikro-orm/mikro-orm/issues/6035)) ([a6c4dea](https://github.com/mikro-orm/mikro-orm/commit/a6c4deaa6eab58a5b4581d4b2cdef34c358d0a21)) * **core:** skip extra query when loading inverse side of 1:1 relation with a filter ([ccf099f](https://github.com/mikro-orm/mikro-orm/commit/ccf099f117a9a30a548b135189bd87bf51fd7ac5)) * **core:** support atomic updates on properties with custom types ([951284b](https://github.com/mikro-orm/mikro-orm/commit/951284bd66457a74ae7c2eca5a87f7918a0ecd13)), closes [#6030](https://github.com/mikro-orm/mikro-orm/issues/6030) * **core:** support multi update on mixed STI entities ([e1deb0d](https://github.com/mikro-orm/mikro-orm/commit/e1deb0d8b6de995898132764ad3448d3d0f1a3ba)), closes [#6069](https://github.com/mikro-orm/mikro-orm/issues/6069) * **migrations:** use ORM logger and respect `loggerFactory` ([e845c26](https://github.com/mikro-orm/mikro-orm/commit/e845c26b74a85948249e72dc75817a58e0cf7fd6)), closes [#6039](https://github.com/mikro-orm/mikro-orm/issues/6039) * **postgres:** improve timezone handling for negative timezone offsets ([52a503c](https://github.com/mikro-orm/mikro-orm/commit/52a503c8314222835a3b61e3e37325a15c3014b8)) * **postgres:** set max identifier length to 63 characters ([5b866fa](https://github.com/mikro-orm/mikro-orm/commit/5b866fabb3de4a7c573051e22dda1a2723a5b94e)), closes [#6042](https://github.com/mikro-orm/mikro-orm/issues/6042) * **schema:** ensure `CREATE TABLE` DDL for `tinyint/smallint/mediumint` primary keys ([#6065](https://github.com/mikro-orm/mikro-orm/issues/6065)) ([e2738cc](https://github.com/mikro-orm/mikro-orm/commit/e2738cc889b0798a18961d0d9424a14148256efa)) * **schema:** ensure `unsigned: false` works for primary keys ([#6063](https://github.com/mikro-orm/mikro-orm/issues/6063)) ([f14a6b4](https://github.com/mikro-orm/mikro-orm/commit/f14a6b412f4a2b855e1db80048196c1498f6f85b)), closes [#6057](https://github.com/mikro-orm/mikro-orm/issues/6057) * **schema:** resolve missing auto\_increment for PK in `MySQL/MariaDB` update DDL ([#6073](https://github.com/mikro-orm/mikro-orm/issues/6073)) ([984758f](https://github.com/mikro-orm/mikro-orm/commit/984758fdb6aaf3744f96a22c5a8e5f7db2d16850)), closes [#6072](https://github.com/mikro-orm/mikro-orm/issues/6072) ### Features[​](#features-21 "Direct link to Features") * **core:** load root entities via `em.populate()` ([b7c3f69](https://github.com/mikro-orm/mikro-orm/commit/b7c3f695fe4e900d0fecd5f7f4b8261847a2964e)), closes [#6032](https://github.com/mikro-orm/mikro-orm/issues/6032) * **mongo:** improve error logging for `ensureIndexes` ([faa2a00](https://github.com/mikro-orm/mikro-orm/commit/faa2a0066f017082a508fe5ccd4a8d4d519ef280)), closes [#4486](https://github.com/mikro-orm/mikro-orm/issues/4486) ### Performance Improvements[​](#performance-improvements-8 "Direct link to Performance Improvements") * **core:** reduce nesting of `toPOJO()` serializer ([4b263f3](https://github.com/mikro-orm/mikro-orm/commit/4b263f33215c9761263a1b51d87d1be7aa36ba40)) ## [6.3.10](https://github.com/mikro-orm/mikro-orm/compare/v6.3.9...v6.3.10) (2024-09-15)[​](#6310-2024-09-15 "Direct link to 6310-2024-09-15") ### Bug Fixes[​](#bug-fixes-35 "Direct link to Bug Fixes") * **core:** allow accessing PK props on `Ref` properties with partial loading ([32d588d](https://github.com/mikro-orm/mikro-orm/commit/32d588d779c1773e571637fc89cc86a2ece0054c)) * **core:** fix dynamic imports on Windows ([#6020](https://github.com/mikro-orm/mikro-orm/issues/6020)) ([e697ec2](https://github.com/mikro-orm/mikro-orm/commit/e697ec298fd37c6db7d3a425a7f6bd4b1a2163fc)) * **core:** fix mapping of version properties from batch updates ([ec521c9](https://github.com/mikro-orm/mikro-orm/commit/ec521c9792b0a96dd98cfe36fc6c5d77de525b15)), closes [#6016](https://github.com/mikro-orm/mikro-orm/issues/6016) [#6022](https://github.com/mikro-orm/mikro-orm/issues/6022) * **core:** respect context name in `@EnsureRequestContext()` ([4574831](https://github.com/mikro-orm/mikro-orm/commit/457483166cf1f57e17a8218965590389706a2b20)) * **core:** support dynamic discovery via `EntitySchema` ([3fde7d4](https://github.com/mikro-orm/mikro-orm/commit/3fde7d42a6bc2cac4374d07d22019135fa4963d9)), closes [#6026](https://github.com/mikro-orm/mikro-orm/issues/6026) * **migrations:** support multiline strings in `addSql()` ([#6017](https://github.com/mikro-orm/mikro-orm/issues/6017)) ([bc14925](https://github.com/mikro-orm/mikro-orm/commit/bc149258495939e638a8f5b360782b144244c25c)), closes [#6015](https://github.com/mikro-orm/mikro-orm/issues/6015) * **mongo:** support partial loading of M :N owning sides ([#6027](https://github.com/mikro-orm/mikro-orm/issues/6027)) ([e53a7d9](https://github.com/mikro-orm/mikro-orm/commit/e53a7d937d50309bafb9113681ca0d7afdbe9485)) ## [6.3.9](https://github.com/mikro-orm/mikro-orm/compare/v6.3.8...v6.3.9) (2024-09-09)[​](#639-2024-09-09 "Direct link to 639-2024-09-09") ### Bug Fixes[​](#bug-fixes-36 "Direct link to Bug Fixes") * **core:** allow proper select with embedded many to many ([#5997](https://github.com/mikro-orm/mikro-orm/issues/5997)) ([8b30ae2](https://github.com/mikro-orm/mikro-orm/commit/8b30ae2a301c2e147d90983f4eaa08eb722e118f)), closes [#5992](https://github.com/mikro-orm/mikro-orm/issues/5992) * **core:** fix expansion of array conditions to `$in` operator for raw values ([59c627e](https://github.com/mikro-orm/mikro-orm/commit/59c627e92226e4745c5fc81b4c4b6e4fb59d75d2)) * **core:** fix hydration of datetime when provided a ISO string value via `em.create()` ([2992046](https://github.com/mikro-orm/mikro-orm/commit/2992046a8cc64cf2995637cb158d332e326a0822)) * **core:** implement joined filters via `populateFilter` option, separately from `populateWhere` ([#6003](https://github.com/mikro-orm/mikro-orm/issues/6003)) ([9d0a022](https://github.com/mikro-orm/mikro-orm/commit/9d0a0227e474d0bcdf5e4757d2be13595df669c7)), closes [#5893](https://github.com/mikro-orm/mikro-orm/issues/5893) * **mongo:** allow ordering by object embedded properties ([2a9ffa3](https://github.com/mikro-orm/mikro-orm/commit/2a9ffa3a3d58ae7cf01a644277aa15cee0967fb7)), closes [#6002](https://github.com/mikro-orm/mikro-orm/issues/6002) * **postgres:** fix casting of JSON values when used with `$in` operator ([840d3cd](https://github.com/mikro-orm/mikro-orm/commit/840d3cdc220e1e70e2090951106862238ba4a096)), closes [#6000](https://github.com/mikro-orm/mikro-orm/issues/6000) * **postgres:** fix diffing vector columns without length ([2f7a7fb](https://github.com/mikro-orm/mikro-orm/commit/2f7a7fb1dc07cc65c54e4501249fca3a478fc0f5)), closes [#6008](https://github.com/mikro-orm/mikro-orm/issues/6008) ## [6.3.8](https://github.com/mikro-orm/mikro-orm/compare/v6.3.7...v6.3.8) (2024-09-04)[​](#638-2024-09-04 "Direct link to 638-2024-09-04") ### Bug Fixes[​](#bug-fixes-37 "Direct link to Bug Fixes") * **core:** check proptotype chain while cloning ([#5979](https://github.com/mikro-orm/mikro-orm/issues/5979)) ([d5eeee5](https://github.com/mikro-orm/mikro-orm/commit/d5eeee5322abf13f47f29d32cf70a75348db0fe1)), closes [/github.com/reforms/ts-jenum/blob/e1a45f54537ec5bd6abc258391e656e8c6339595/src/ts/jenum.ts#L181-L184](https://github.com//github.com/reforms/ts-jenum/blob/e1a45f54537ec5bd6abc258391e656e8c6339595/src/ts/jenum.ts/issues/L181-L184) [/github.com/mikro-orm/mikro-orm/blob/c0dacd8964786118d094fb6f88c3c136bcfa7115/packages/core/src/utils/clone.ts#L123](https://github.com//github.com/mikro-orm/mikro-orm/blob/c0dacd8964786118d094fb6f88c3c136bcfa7115/packages/core/src/utils/clone.ts/issues/L123) * **core:** fix populating lazy scalar properties inside embeddables ([ffcd0e0](https://github.com/mikro-orm/mikro-orm/commit/ffcd0e03387591d3a81f7f0da6f8e9dc80283a43)), closes [#5956](https://github.com/mikro-orm/mikro-orm/issues/5956) * **core:** improve support for embeddables in `em.upsert()` ([78dbeed](https://github.com/mikro-orm/mikro-orm/commit/78dbeed02155ac0e28307a6bbeb64765902e24b4)), closes [#5969](https://github.com/mikro-orm/mikro-orm/issues/5969) * **core:** infer runtime type based on `new Date()` property initializer ([ed0560b](https://github.com/mikro-orm/mikro-orm/commit/ed0560b8f761a0b326be062f6f40b6fabaabaac7)) * **core:** support collection operators with non-standard primary keys ([171793f](https://github.com/mikro-orm/mikro-orm/commit/171793f81b9c8c5db3cc86ba50ae97897465bf25)), closes [#5989](https://github.com/mikro-orm/mikro-orm/issues/5989) * **postgres:** fix parsing of `timestamptz` values with negative timezone ([8ccc925](https://github.com/mikro-orm/mikro-orm/commit/8ccc925cefe85655199c5f5f83006e69500cb6c1)) * **schema:** change default of `disableForeignKeys` to false ([#5993](https://github.com/mikro-orm/mikro-orm/issues/5993)) ([8a8aa2d](https://github.com/mikro-orm/mikro-orm/commit/8a8aa2de479c75cb91c60854450f1d487707db3d)) ## [6.3.7](https://github.com/mikro-orm/mikro-orm/compare/v6.3.6...v6.3.7) (2024-08-28)[​](#637-2024-08-28 "Direct link to 637-2024-08-28") ### Bug Fixes[​](#bug-fixes-38 "Direct link to Bug Fixes") * **core:** don't double encode JSON properties inside object/array embeddables ([f3321f9](https://github.com/mikro-orm/mikro-orm/commit/f3321f95974b8cf50286f4cce81b49807b3c24a5)), closes [#5963](https://github.com/mikro-orm/mikro-orm/issues/5963) * **core:** fix hydration of collections with `forceEntityConstructor` enabled ([d4d8506](https://github.com/mikro-orm/mikro-orm/commit/d4d850645a54e1decae227dfcfb7547486f83889)), closes [#5972](https://github.com/mikro-orm/mikro-orm/issues/5972) * **core:** provide entity instance in object constructor params for m:1/1:1 properties ([fe2d129](https://github.com/mikro-orm/mikro-orm/commit/fe2d129fb1c8e2c28124022f6cd920bc7553dabc)) * **core:** respect context in EM transaction methods ([8912185](https://github.com/mikro-orm/mikro-orm/commit/8912185048a88f145f1c64d5f8fe6e7526e633ff)) * **core:** respect entity level `forceConstructor` option ([c642a49](https://github.com/mikro-orm/mikro-orm/commit/c642a495bf1a3afefbd6f1174f1f3763382934dd)) * **query-builder:** ensure the correct order of parameters when handing nested joins ([10a858d](https://github.com/mikro-orm/mikro-orm/commit/10a858debff566e9a64f698f0ad3610d89e777df)), closes [#5955](https://github.com/mikro-orm/mikro-orm/issues/5955) * **sql:** correct cursor conditions application on virtual entities ([#5973](https://github.com/mikro-orm/mikro-orm/issues/5973)) ([fc782d3](https://github.com/mikro-orm/mikro-orm/commit/fc782d3512d302330e9b79924317219954f4b190)) ## [6.3.6](https://github.com/mikro-orm/mikro-orm/compare/v6.3.5...v6.3.6) (2024-08-14)[​](#636-2024-08-14 "Direct link to 636-2024-08-14") ### Bug Fixes[​](#bug-fixes-39 "Direct link to Bug Fixes") * **core:** ensure other conditions do not override collection operator conditions ([97cdc9d](https://github.com/mikro-orm/mikro-orm/commit/97cdc9db96a37630736cafb5f901b22a6f348f65)) * **core:** fix hydration of polymorphic embeddables with overlapping property names ([ab5c595](https://github.com/mikro-orm/mikro-orm/commit/ab5c595e3fb97e95a6e86d4d8c32d4e030a84ba4)), closes [#5935](https://github.com/mikro-orm/mikro-orm/issues/5935) * **postgres:** do not cast `json` columns to `text` ([574390b](https://github.com/mikro-orm/mikro-orm/commit/574390b32488757364fc5d3be3488f585421d461)), closes [#5936](https://github.com/mikro-orm/mikro-orm/issues/5936) * **schema:** recreate FKs when changing column type ([8797c64](https://github.com/mikro-orm/mikro-orm/commit/8797c64330ce07e6a38e508dc5ab3e6faa9e2be3)) ## [6.3.5](https://github.com/mikro-orm/mikro-orm/compare/v6.3.4...v6.3.5) (2024-08-11)[​](#635-2024-08-11 "Direct link to 635-2024-08-11") ### Bug Fixes[​](#bug-fixes-40 "Direct link to Bug Fixes") * **core:** track changes on non-scalar properties ([a02c727](https://github.com/mikro-orm/mikro-orm/commit/a02c727233fab72a23f0fd4c4419f17ab552fd5d)), closes [#5750](https://github.com/mikro-orm/mikro-orm/issues/5750) * **entity-generator:** ensure `columnType` is emitted correctly and when necessary ([#5930](https://github.com/mikro-orm/mikro-orm/issues/5930)) ([72333ad](https://github.com/mikro-orm/mikro-orm/commit/72333ad506129834185f39d44457fdfb947df35c)), closes [#5928](https://github.com/mikro-orm/mikro-orm/issues/5928) * **entity-generator:** fix the search for FK indexes to only match exact columns, not "at least" ([#5924](https://github.com/mikro-orm/mikro-orm/issues/5924)) ([05a8808](https://github.com/mikro-orm/mikro-orm/commit/05a88084b93ca2d63dc8ee2adfaae50f8357de1d)), closes [#5912](https://github.com/mikro-orm/mikro-orm/issues/5912) * **entity-generator:** unknown type defaults always use default/defaultRaw, never runtime ([#5927](https://github.com/mikro-orm/mikro-orm/issues/5927)) ([dcc8227](https://github.com/mikro-orm/mikro-orm/commit/dcc8227e2623d47ea4562c9c575e5ab9c3d2417f)) * **postgres:** allow string value for `$overlap/$contains/$contained` operators ([6c1b12a](https://github.com/mikro-orm/mikro-orm/commit/6c1b12af7c04414b156180e72c95118f8a5858fb)) * **postgres:** detect native enums with same name but different schema ([31735e5](https://github.com/mikro-orm/mikro-orm/commit/31735e5df428205ffc53cee3e36a6b56d1caa17f)), closes [#5905](https://github.com/mikro-orm/mikro-orm/issues/5905) * **postgres:** do not produce extra updates for fulltext properties ([d18e5ed](https://github.com/mikro-orm/mikro-orm/commit/d18e5ede53886abdf32ac036e41a3bc4e8f293cf)), closes [#5908](https://github.com/mikro-orm/mikro-orm/issues/5908) * **postgres:** respect `timezone` option and interpret `timestamp` columns in UTC by default ([#5916](https://github.com/mikro-orm/mikro-orm/issues/5916)) ([1da0722](https://github.com/mikro-orm/mikro-orm/commit/1da07220ea5ac3f70b9244605b5e6367cf8f8d0c)), closes [#5591](https://github.com/mikro-orm/mikro-orm/issues/5591) * **sql:** support cursor-based pagination on virtual entities ([b86799c](https://github.com/mikro-orm/mikro-orm/commit/b86799c8d30ef2c93b80e8c69b4dcbe5b3d67d9f)), closes [#5922](https://github.com/mikro-orm/mikro-orm/issues/5922) ### Features[​](#features-22 "Direct link to Features") * **cli:** detect `bun` when checking for TS support ([e87ebc9](https://github.com/mikro-orm/mikro-orm/commit/e87ebc92e6cf59af65303b21ee38a675ce608d64)) * **core:** add `RequestContext.enter()` which uses `ALS.enterWith()` ([dc06f60](https://github.com/mikro-orm/mikro-orm/commit/dc06f60cc42f4359a5c7a06248767d86cd9c84e9)) ## [6.3.4](https://github.com/mikro-orm/mikro-orm/compare/v6.3.3...v6.3.4) (2024-08-06)[​](#634-2024-08-06 "Direct link to 634-2024-08-06") ### Bug Fixes[​](#bug-fixes-41 "Direct link to Bug Fixes") * **core:** adjust collection owner's serialization context when lazy-loading ([#5903](https://github.com/mikro-orm/mikro-orm/issues/5903)) ([57f234b](https://github.com/mikro-orm/mikro-orm/commit/57f234bae7ecb212f19f85de78234280f6d35f3a)), closes [#5559](https://github.com/mikro-orm/mikro-orm/issues/5559) * **core:** do not convert bigints with mapping to `number` to `string` on serialization ([ee24f1f](https://github.com/mikro-orm/mikro-orm/commit/ee24f1f0f017d8e7b4544f6cb1a39eab29dfb413)), closes [#5839](https://github.com/mikro-orm/mikro-orm/issues/5839) * **core:** fix populating lazy properties inside inlined embeddables ([8d1e925](https://github.com/mikro-orm/mikro-orm/commit/8d1e9252771c9d6069afd3a227fdb38cf3d0d86a)), closes [#5848](https://github.com/mikro-orm/mikro-orm/issues/5848) * **core:** merge enum items from STI entities with the same name ([06fffbd](https://github.com/mikro-orm/mikro-orm/commit/06fffbd1e1fb5097d2b6affb4f5b216ccb391093)), closes [#5807](https://github.com/mikro-orm/mikro-orm/issues/5807) * **migrations:** use `override` keyword in TS migration files ([d2f7b83](https://github.com/mikro-orm/mikro-orm/commit/d2f7b83557431da53c0fe0c2011cddee67ceac05)), closes [#5634](https://github.com/mikro-orm/mikro-orm/issues/5634) * **mssql:** convert tuple comparison queries to simple `and/or` conditions ([#5906](https://github.com/mikro-orm/mikro-orm/issues/5906)) ([c3c3519](https://github.com/mikro-orm/mikro-orm/commit/c3c3519db72ab15810fcb65d764541ab1fcc0130)) * **query-builder:** do not return itself from `qb.applyFilters()` ([6be2603](https://github.com/mikro-orm/mikro-orm/commit/6be2603b27eb861bdbc90a1c29000a160d523aaf)) * **schema:** respect check constraints from base entities ([22b7e97](https://github.com/mikro-orm/mikro-orm/commit/22b7e97040792d7b56676daab99de69a5ae58b6c)) * **sqlite:** allow tuple comparison ([3caa50a](https://github.com/mikro-orm/mikro-orm/commit/3caa50a6cd84c3ae153d38781c999a871a642b40)) ## [6.3.3](https://github.com/mikro-orm/mikro-orm/compare/v6.3.2...v6.3.3) (2024-08-03)[​](#633-2024-08-03 "Direct link to 633-2024-08-03") ### Bug Fixes[​](#bug-fixes-42 "Direct link to Bug Fixes") * **core:** ensure `@CreateRequestContext()` works when invoked from explicit transaction ([de0b515](https://github.com/mikro-orm/mikro-orm/commit/de0b51526e8e5e58b73069a3e53083f5f5139aed)) * **core:** fix unnecessary populate query when partial loading via joined strategy ([33da574](https://github.com/mikro-orm/mikro-orm/commit/33da5747b5b52ccdd36ec3aced707a6a90423f47)), closes [#5889](https://github.com/mikro-orm/mikro-orm/issues/5889) * **knex:** update `PoolConfig` interface to match what knex supports ([#5892](https://github.com/mikro-orm/mikro-orm/issues/5892)) ([eb5d4a1](https://github.com/mikro-orm/mikro-orm/commit/eb5d4a1d065b4028e0ba211a6783014a645e50cc)) * **knex:** use nested join for `populateWhere` condition ([#5893](https://github.com/mikro-orm/mikro-orm/issues/5893)) ([24e82c7](https://github.com/mikro-orm/mikro-orm/commit/24e82c7a990ba1ebb37ff26f85e66283f3c65a1b)), closes [#5872](https://github.com/mikro-orm/mikro-orm/issues/5872) * **query-builder:** fix processing of nested condition when there is a collection in embedded field names ([6bf635b](https://github.com/mikro-orm/mikro-orm/commit/6bf635b0944949f37a7bfdf22a6934dc958d08b6)), closes [#5894](https://github.com/mikro-orm/mikro-orm/issues/5894) * **reflection:** respect `outDir` when finding the source file in production build ([fe54d45](https://github.com/mikro-orm/mikro-orm/commit/fe54d45a659c81bb2b8793085c7b005478c12a97)), closes [#5536](https://github.com/mikro-orm/mikro-orm/issues/5536) ### Features[​](#features-23 "Direct link to Features") * **query-builder:** add `qb.applyFilters()` method ([0aaaa4f](https://github.com/mikro-orm/mikro-orm/commit/0aaaa4fe7087e874cdb97b81ddf6c9da90def259)), closes [#4876](https://github.com/mikro-orm/mikro-orm/issues/4876) ## [6.3.2](https://github.com/mikro-orm/mikro-orm/compare/v6.3.1...v6.3.2) (2024-08-01)[​](#632-2024-08-01 "Direct link to 632-2024-08-01") ### Bug Fixes[​](#bug-fixes-43 "Direct link to Bug Fixes") * **core:** fix cancelling orphan removal on m:1 relations ([7b30844](https://github.com/mikro-orm/mikro-orm/commit/7b30844d8046bfd74d6c346b3bcd566b2f879a10)), closes [#5884](https://github.com/mikro-orm/mikro-orm/issues/5884) * **core:** fix overriding not initialized 1 :m collection without orphan removal ([517108b](https://github.com/mikro-orm/mikro-orm/commit/517108bd5a2defd15a2b6d677429e0b4d06d5422)), closes [#5883](https://github.com/mikro-orm/mikro-orm/issues/5883) * **reflection:** fix type inference when intersecting with `Opt` or `Hidden` ([951c805](https://github.com/mikro-orm/mikro-orm/commit/951c805eb6c26239e2868a84c7e25c031cb26aaa)), closes [#5881](https://github.com/mikro-orm/mikro-orm/issues/5881) ## [6.3.1](https://github.com/mikro-orm/mikro-orm/compare/v6.3.0...v6.3.1) (2024-07-25)[​](#631-2024-07-25 "Direct link to 631-2024-07-25") ### Bug Fixes[​](#bug-fixes-44 "Direct link to Bug Fixes") * **core:** always check TS config files if TS support is detected ([eb100fe](https://github.com/mikro-orm/mikro-orm/commit/eb100fec7b06deb1e653b594f730c901ec8ce8e7)), closes [#5852](https://github.com/mikro-orm/mikro-orm/issues/5852) * **core:** discover base entities first to fix detection of STI when root entity not explicitly listed ([7c1976f](https://github.com/mikro-orm/mikro-orm/commit/7c1976f0d03fcef2012fbf3e87158cae4cfee81a)) * **core:** fix CreateRequestContext not working with callback returning EntityManager ([#5873](https://github.com/mikro-orm/mikro-orm/issues/5873)) ([3de546d](https://github.com/mikro-orm/mikro-orm/commit/3de546d9c972c6c351db6dceed7a86dec6fac3b2)), closes [1#L132](https://github.com/1/issues/L132) * **mssql:** do not escape charecters that don't need escaping ([#5860](https://github.com/mikro-orm/mikro-orm/issues/5860)) ([6730978](https://github.com/mikro-orm/mikro-orm/commit/6730978b6c7003e45ed97f9d2d7c5c0bc9262e26)), closes [mikro-orm#5811](https://github.com/mikro-orm/issues/5811) * **mssql:** do not escape new line character ([97919ce](https://github.com/mikro-orm/mikro-orm/commit/97919ce479fc5e2e00a3bf24a511ec29a2279d1b)), closes [#5811](https://github.com/mikro-orm/mikro-orm/issues/5811) * **schema:** skip db default inference only for polymorphic embeddables ([925c69e](https://github.com/mikro-orm/mikro-orm/commit/925c69ef6c406fb73acada47484b9e74fe796520)), closes [#5847](https://github.com/mikro-orm/mikro-orm/issues/5847) ### Features[​](#features-24 "Direct link to Features") * **core:** support `Date` type on primary keys ([#5855](https://github.com/mikro-orm/mikro-orm/issues/5855)) ([f91d57c](https://github.com/mikro-orm/mikro-orm/commit/f91d57c4a82754dfe0c055bcc6813cbec8ac9c1b)), closes [#5842](https://github.com/mikro-orm/mikro-orm/issues/5842) # [6.3.0](https://github.com/mikro-orm/mikro-orm/compare/v6.2.9...v6.3.0) (2024-07-18) ### Bug Fixes[​](#bug-fixes-45 "Direct link to Bug Fixes") * **cli:** enforce `moduleResolution: 'nodenext'` for CLI context ([d5d7f38](https://github.com/mikro-orm/mikro-orm/commit/d5d7f381363ab776b3c3af04a925a5547dbcdb65)), closes [#5514](https://github.com/mikro-orm/mikro-orm/issues/5514) * **core:** allow `em.transactional` handler to be synchronous ([#5696](https://github.com/mikro-orm/mikro-orm/issues/5696)) ([fd56714](https://github.com/mikro-orm/mikro-orm/commit/fd56714e06e39c2724a3193b8b07279b8fb6c91f)) * **core:** allow passing `null` to optional properties in `em.create()` ([df0db99](https://github.com/mikro-orm/mikro-orm/commit/df0db996aad03a1ad98bf4c45dbb4832cd50a1d8)), closes [#5827](https://github.com/mikro-orm/mikro-orm/issues/5827) * **core:** ensure correct identity when upserting without primary key ([cdbab12](https://github.com/mikro-orm/mikro-orm/commit/cdbab12977cd9b6709442bb4b0838326b2501e98)), closes [#5702](https://github.com/mikro-orm/mikro-orm/issues/5702) * **core:** ensure correct mapping of related columns to owning entity fields for complex relations ([#5630](https://github.com/mikro-orm/mikro-orm/issues/5630)) ([302600e](https://github.com/mikro-orm/mikro-orm/commit/302600e1fe670b562fa926c7239451a510808b24)), closes [#5629](https://github.com/mikro-orm/mikro-orm/issues/5629) * **core:** ensure correct mapping to native bigint in sqlite and mysql ([a16b801](https://github.com/mikro-orm/mikro-orm/commit/a16b801f1f4ed8bfa01cf236a25c391c70a3cbba)), closes [#5737](https://github.com/mikro-orm/mikro-orm/issues/5737) * **core:** fix auto flush mode for `em.count()` ([62db127](https://github.com/mikro-orm/mikro-orm/commit/62db127f343f366d7aca5293aa718ca63d265369)) * **core:** fix auto flush mode for `em.findAndCount()` ([a572869](https://github.com/mikro-orm/mikro-orm/commit/a572869316660d26645d04f748cdf653b0989924)) * **core:** fix batch update of nullable embedded arrays ([c1ea284](https://github.com/mikro-orm/mikro-orm/commit/c1ea284bb78f16b56278cd4a4b219516fc9681e7)), closes [#5723](https://github.com/mikro-orm/mikro-orm/issues/5723) * **core:** fix detection of constructor parameters with default object value ([58e8c2a](https://github.com/mikro-orm/mikro-orm/commit/58e8c2afea24dbd45428b83343e6a344a6ae302d)), closes [#5710](https://github.com/mikro-orm/mikro-orm/issues/5710) * **core:** fix handling of pivot entities with M :N relations ([fa89731](https://github.com/mikro-orm/mikro-orm/commit/fa8973166373b45ceeebeb9279786498ce24362e)), closes [#5774](https://github.com/mikro-orm/mikro-orm/issues/5774) * **core:** fix handling of raw query key of where condition with `[]` on right side ([1e76509](https://github.com/mikro-orm/mikro-orm/commit/1e76509792d4f1b0172c77b2d6204b283d101cc2)), closes [#5825](https://github.com/mikro-orm/mikro-orm/issues/5825) * **core:** fix populating entity graph with cycles ([6505510](https://github.com/mikro-orm/mikro-orm/commit/6505510f56cab1b2f09edb02e488782ef160ebd7)) * **core:** fix processing of nullable embedded arrays ([01612a1](https://github.com/mikro-orm/mikro-orm/commit/01612a15b3dee19fc603c8fcc7f65d4c4948e5a2)), closes [#5715](https://github.com/mikro-orm/mikro-orm/issues/5715) * **core:** ignore existing contexts in `@CreateRequestContext()` ([1bb4e22](https://github.com/mikro-orm/mikro-orm/commit/1bb4e22e17537600ef7f10f02aa638c3b9ce609e)), closes [#5801](https://github.com/mikro-orm/mikro-orm/issues/5801) * **core:** improve handling of JSON properties to support numeric strings in all drivers ([#5780](https://github.com/mikro-orm/mikro-orm/issues/5780)) ([fc50c5f](https://github.com/mikro-orm/mikro-orm/commit/fc50c5f5f28f0764115631900edac24bc734afa4)), closes [#5773](https://github.com/mikro-orm/mikro-orm/issues/5773) * **core:** make `raw()` accept readonly params ([#5832](https://github.com/mikro-orm/mikro-orm/issues/5832)) ([7f9daf7](https://github.com/mikro-orm/mikro-orm/commit/7f9daf76907b1832a52caf9b909516746bfe9c4d)) * **core:** respect `populate` option in `Reference.load` for loaded relations ([04fb826](https://github.com/mikro-orm/mikro-orm/commit/04fb826ba96426eb700284d923887594f3f7f09e)), closes [#5711](https://github.com/mikro-orm/mikro-orm/issues/5711) * **core:** respect `populateOrderBy` with `select-in` strategy ([3b83d29](https://github.com/mikro-orm/mikro-orm/commit/3b83d29783266e86e711440ad8f9725710ca205d)), closes [#5693](https://github.com/mikro-orm/mikro-orm/issues/5693) * **core:** respect nullability of wrapped types for ScalarReference's ([#5722](https://github.com/mikro-orm/mikro-orm/issues/5722)) ([a1b8f07](https://github.com/mikro-orm/mikro-orm/commit/a1b8f075e6c71d45e764cc9342058d3bfd2d2406)) * **core:** respect parent property prefix when child has `prefix: false` ([94367b8](https://github.com/mikro-orm/mikro-orm/commit/94367b80543a0efdd8225b897a2255f976bbe2cc)), closes [#5642](https://github.com/mikro-orm/mikro-orm/issues/5642) * **core:** support for TS 5.5 ([2fd7359](https://github.com/mikro-orm/mikro-orm/commit/2fd7359467ed2e5d8409b342a4bc2b2d52a1bb7c)) * **core:** support overloading embedded properties ([#5784](https://github.com/mikro-orm/mikro-orm/issues/5784)) ([c57b528](https://github.com/mikro-orm/mikro-orm/commit/c57b528645042876d71d5816156679a31bdbf215)), closes [#2987](https://github.com/mikro-orm/mikro-orm/issues/2987) * **core:** use `NonNullable` instead of the internal `Defined` type ([8ef28c4](https://github.com/mikro-orm/mikro-orm/commit/8ef28c4f34eacce23a5958be9e04d6f3bdcb1029)) * **core:** use the same transaction context in `em.refresh()` ([dd17706](https://github.com/mikro-orm/mikro-orm/commit/dd177066d61f9d2ca6c9a7fc9611d8a5477487dc)), closes [#5753](https://github.com/mikro-orm/mikro-orm/issues/5753) * **core:** using `EntityData` now works with `IType` ([#5810](https://github.com/mikro-orm/mikro-orm/issues/5810)) ([f339ef5](https://github.com/mikro-orm/mikro-orm/commit/f339ef561285576a032bb12c1236bbe77888bce0)) * **entity-generator:** correctly serialize string prefixes in embedded references ([#5826](https://github.com/mikro-orm/mikro-orm/issues/5826)) ([7882bca](https://github.com/mikro-orm/mikro-orm/commit/7882bca1f029f331ea4af4e52e7f76c02ede0c84)) * **entity-generator:** fix handling of primary keys that are foreign keys or enums ([#5673](https://github.com/mikro-orm/mikro-orm/issues/5673)) ([b10413f](https://github.com/mikro-orm/mikro-orm/commit/b10413f3b1b5548118b02aa90e39bb69d8473d4f)) * **entity-generator:** fixed default values for enums ([#5765](https://github.com/mikro-orm/mikro-orm/issues/5765)) ([58d914d](https://github.com/mikro-orm/mikro-orm/commit/58d914db32c8a06727fd9087bbcc4fda1117d086)) * **entity-generator:** generate all bidirectional relations in case of conflicts ([#5779](https://github.com/mikro-orm/mikro-orm/issues/5779)) ([af845f1](https://github.com/mikro-orm/mikro-orm/commit/af845f1aee8b8925498b2bb53fbf74e522efc2cc)), closes [#5738](https://github.com/mikro-orm/mikro-orm/issues/5738) * **entity-generator:** include all entity options in EntitySchema definitions ([#5674](https://github.com/mikro-orm/mikro-orm/issues/5674)) ([94ef44e](https://github.com/mikro-orm/mikro-orm/commit/94ef44e28aa3420e0ba2f83d9f6830dcb3e56302)) * **entity-generator:** output all DB related info even for virtual properties ([#5817](https://github.com/mikro-orm/mikro-orm/issues/5817)) ([845b75c](https://github.com/mikro-orm/mikro-orm/commit/845b75ce3b23fc9957edd4db0a19774ca648fdf5)) * **entity-generator:** output entity and prop comments ([#5699](https://github.com/mikro-orm/mikro-orm/issues/5699)) ([4ef21c4](https://github.com/mikro-orm/mikro-orm/commit/4ef21c4388c488fdb4db1f159f0d8250fd620fc6)) * **entity-generator:** support complex enum names and values ([#5670](https://github.com/mikro-orm/mikro-orm/issues/5670)) ([7dcb7be](https://github.com/mikro-orm/mikro-orm/commit/7dcb7beff1a74606831f073549b530ba0e1bb7a1)) * **entity-generator:** when using esmImport, FKs are now wrapped with Rel ([#5771](https://github.com/mikro-orm/mikro-orm/issues/5771)) ([c28ab16](https://github.com/mikro-orm/mikro-orm/commit/c28ab16810bb62aa6dd20dd8442eef902cd68a4d)) * **mssql:** add proper support for MSSQL's native "varchar" type ([#5685](https://github.com/mikro-orm/mikro-orm/issues/5685)) ([0b514ce](https://github.com/mikro-orm/mikro-orm/commit/0b514ce7378df21ef414027f993267f2ecbe681a)) * **mssql:** fix handling of non-UTC timezones ([e78696c](https://github.com/mikro-orm/mikro-orm/commit/e78696c548e14be3e00ba5595697816db4c9dd52)), closes [#5695](https://github.com/mikro-orm/mikro-orm/issues/5695) * **mssql:** only escape strings and unicode strings when necessary ([#5786](https://github.com/mikro-orm/mikro-orm/issues/5786)) ([b4e0914](https://github.com/mikro-orm/mikro-orm/commit/b4e0914772356285bcbb9362a4df2044438b4cd7)), closes [#5811](https://github.com/mikro-orm/mikro-orm/issues/5811) * **mysql:** fix support for older MySQL versions than v8.0.13 when reading indexes ([#5654](https://github.com/mikro-orm/mikro-orm/issues/5654)) ([3c4f665](https://github.com/mikro-orm/mikro-orm/commit/3c4f6658d05d2b71c79ba672e1f20c44f43da1f2)), closes [#5653](https://github.com/mikro-orm/mikro-orm/issues/5653) * **postgres:** implement diffing support for `vector` type ([9eadac1](https://github.com/mikro-orm/mikro-orm/commit/9eadac187eb92d6ef098a0552e2c94967ebf2a60)), closes [#5739](https://github.com/mikro-orm/mikro-orm/issues/5739) * **postgres:** put new native enum values into the correct position ([f79e3bc](https://github.com/mikro-orm/mikro-orm/commit/f79e3bc9063ce34e6fc5ad1c3a9abc3630c1cabe)), closes [#5791](https://github.com/mikro-orm/mikro-orm/issues/5791) * **postgresql:** ignore tables that use inheritance during schema diffing ([#5648](https://github.com/mikro-orm/mikro-orm/issues/5648)) ([55f452a](https://github.com/mikro-orm/mikro-orm/commit/55f452a7d9061d04244178f87b21df3e0d32f6f4)) * **postgres:** respect empty string in enum items ([c02f12e](https://github.com/mikro-orm/mikro-orm/commit/c02f12e3d835101041fe62a92fd32908d346b789)), closes [#5751](https://github.com/mikro-orm/mikro-orm/issues/5751) * **postgres:** support enum arrays with special characters ([54b30cb](https://github.com/mikro-orm/mikro-orm/commit/54b30cb8e043cd9cc5d960a609363cc7d5c4ba5a)), closes [#5781](https://github.com/mikro-orm/mikro-orm/issues/5781) * **query-builder:** don't use alias in more complex queries when not needed ([#5679](https://github.com/mikro-orm/mikro-orm/issues/5679)) ([ad347e7](https://github.com/mikro-orm/mikro-orm/commit/ad347e797a48aef8f91c66ddf67dcf9b3332ed75)), closes [#5676](https://github.com/mikro-orm/mikro-orm/issues/5676) * **query-builder:** interpolate raw query params early to ensure the correct binding position ([9bd0fe9](https://github.com/mikro-orm/mikro-orm/commit/9bd0fe90c0649d0342de5eca7c19fc48de9ba65f)), closes [#5706](https://github.com/mikro-orm/mikro-orm/issues/5706) * **query-builder:** process raw query fragments under operator value ([98510a3](https://github.com/mikro-orm/mikro-orm/commit/98510a357590c734e185be939d0e0a30c8e2a41c)), closes [#5724](https://github.com/mikro-orm/mikro-orm/issues/5724) * **query-builder:** quote alias in formulas when joining virtual relations ([68b64ec](https://github.com/mikro-orm/mikro-orm/commit/68b64ece8f61acbe33bee347c06108bc959b1caa)), closes [#5705](https://github.com/mikro-orm/mikro-orm/issues/5705) * **query-builder:** skip inner select for properties that map to a raw query fragment during pagination ([1c5154a](https://github.com/mikro-orm/mikro-orm/commit/1c5154ab389ff9daff38f61f9e407969a5de6f83)), closes [#5709](https://github.com/mikro-orm/mikro-orm/issues/5709) * **schema:** always prefer index/unique expression ([96dff53](https://github.com/mikro-orm/mikro-orm/commit/96dff537486359d968bb4da5e0e8d73ccdd89ad9)), closes [#5668](https://github.com/mikro-orm/mikro-orm/issues/5668) * **schema:** do not drop FKs in down migrations when they are disabled ([0dcfa80](https://github.com/mikro-orm/mikro-orm/commit/0dcfa800528700799bb07971e25b09063a1563eb)), closes [#4993](https://github.com/mikro-orm/mikro-orm/issues/4993) * **schema:** skip implicit FK index when defined explicitly by user on entity level ([ff6bfdc](https://github.com/mikro-orm/mikro-orm/commit/ff6bfdcf6e89b68875cf7f5c6a02a915344f6de5)), closes [#5725](https://github.com/mikro-orm/mikro-orm/issues/5725) * **sql:** fix ordering by m:1 and 1:1 relations with joined strategy ([28119c6](https://github.com/mikro-orm/mikro-orm/commit/28119c649c61f070fbe396c4a879f9d071d9aabd)) * **sql:** ignore generated columns when computing changesets ([55dfbf9](https://github.com/mikro-orm/mikro-orm/commit/55dfbf900911f32068096e412191d2d25415ed80)), closes [#5660](https://github.com/mikro-orm/mikro-orm/issues/5660) * **sqlite:** fix altering tables via malformed temp table ([#5683](https://github.com/mikro-orm/mikro-orm/issues/5683)) ([1b9087c](https://github.com/mikro-orm/mikro-orm/commit/1b9087ce3a0002d41a6722e22ad789cc67f9d362)), closes [#5672](https://github.com/mikro-orm/mikro-orm/issues/5672) * **sql:** rework detection of problematic batch updates and split more aggressively ([b045033](https://github.com/mikro-orm/mikro-orm/commit/b0450338f16bda43f986f07715d2e51516ac580b)), closes [#5656](https://github.com/mikro-orm/mikro-orm/issues/5656) ### Features[​](#features-25 "Direct link to Features") * **cli:** always check TS files regardless of `useTsNode` ([#5650](https://github.com/mikro-orm/mikro-orm/issues/5650)) ([7c34416](https://github.com/mikro-orm/mikro-orm/commit/7c34416d61d5c2d3e63dbb7725774e04e6de604d)) * **core:** addz `Platform.getDefaultVarcharLength` and optional `Type.getDefaultLength` ([#5749](https://github.com/mikro-orm/mikro-orm/issues/5749)) ([29dcdeb](https://github.com/mikro-orm/mikro-orm/commit/29dcdeb5e4c3f84e43c154fe3eb81a113c6d1470)) * **core:** allow passing `raw()` into `onConflictFields` of upsert methods ([#5691](https://github.com/mikro-orm/mikro-orm/issues/5691)) ([bff90f2](https://github.com/mikro-orm/mikro-orm/commit/bff90f2353a411a7cb0c6d838da12118147cef21)), closes [#5668](https://github.com/mikro-orm/mikro-orm/issues/5668) * **core:** allow upserting without a unique value ([#5726](https://github.com/mikro-orm/mikro-orm/issues/5726)) ([75a4706](https://github.com/mikro-orm/mikro-orm/commit/75a470629c9eb7aaa25415cd54dc1b4148f2ac97)) * **core:** check for ORM extensions dynamically ([#5651](https://github.com/mikro-orm/mikro-orm/issues/5651)) ([68a3c1f](https://github.com/mikro-orm/mikro-orm/commit/68a3c1fe0b84cf1646501025b948de58911293f6)) * **core:** implement "character" type (DB type "char") ([#5684](https://github.com/mikro-orm/mikro-orm/issues/5684)) ([9fa5fad](https://github.com/mikro-orm/mikro-orm/commit/9fa5fad5e3955cdcdee89aa12c8b3dd4841b2045)) * **entity-generator:** add a coreImportsPrefix option ([#5669](https://github.com/mikro-orm/mikro-orm/issues/5669)) ([b9ab69a](https://github.com/mikro-orm/mikro-orm/commit/b9ab69a5e86ce118cb209d2fdc5a76f2c4b80620)) * **entity-generator:** added option to output pure pivot tables ([#5809](https://github.com/mikro-orm/mikro-orm/issues/5809)) ([832a626](https://github.com/mikro-orm/mikro-orm/commit/832a62612d6cf3cc8a44f0c0c7ad6b1cec1bf402)) * **entity-generator:** added the ability to add extra names to be imported ([#5797](https://github.com/mikro-orm/mikro-orm/issues/5797)) ([82696b3](https://github.com/mikro-orm/mikro-orm/commit/82696b30c2a14cd68879c421ab4a8b182c3093ab)) * **entity-generator:** allow custom types for scalar relations ([#5435](https://github.com/mikro-orm/mikro-orm/issues/5435)) ([a8a9126](https://github.com/mikro-orm/mikro-orm/commit/a8a9126ebdfb57cce14d1931b5cce5dfb1ade27f)) * **entity-generator:** enable the generator to dictate import specs via `extraImport` ([#5772](https://github.com/mikro-orm/mikro-orm/issues/5772)) ([effd9fb](https://github.com/mikro-orm/mikro-orm/commit/effd9fbc9426bc49a2acb3bed1b982eed4f38b3e)) * **entity-generator:** repository class reference can be added from hooks ([#5785](https://github.com/mikro-orm/mikro-orm/issues/5785)) ([44a49a9](https://github.com/mikro-orm/mikro-orm/commit/44a49a9aad455db59e08e48ef2ce58f112671f97)) * **entity-generator:** support adding groups through metadata hooks ([#5793](https://github.com/mikro-orm/mikro-orm/issues/5793)) ([a756271](https://github.com/mikro-orm/mikro-orm/commit/a756271a94af3806a38111d301fd907f870dd057)) * **libsql:** support connecting to remote turso database ([#5764](https://github.com/mikro-orm/mikro-orm/issues/5764)) ([6255a33](https://github.com/mikro-orm/mikro-orm/commit/6255a3302890a02c501357426937d29e393c02f9)) * **migrations:** allow initial migration to be blank if no entities are defined ([#5802](https://github.com/mikro-orm/mikro-orm/issues/5802)) ([a8f6864](https://github.com/mikro-orm/mikro-orm/commit/a8f68645727103b7af0cfe59c33ac199fa28e1de)) * **migrations:** make `--blank` also generate a `down` migration ([#5657](https://github.com/mikro-orm/mikro-orm/issues/5657)) ([056d336](https://github.com/mikro-orm/mikro-orm/commit/056d3360e8c338b8a5431533fd9e12a5e5206fef)) * **postgres:** allow specifying deferred mode on unique constraints ([#5537](https://github.com/mikro-orm/mikro-orm/issues/5537)) ([7672b56](https://github.com/mikro-orm/mikro-orm/commit/7672b56b0efaed26d87651e256866c8ac8ca72ed)) * **postgres:** support `on delete set null/default` with subset of columns ([5353e6a](https://github.com/mikro-orm/mikro-orm/commit/5353e6a97cdea224ce19fe3b5745951411a12282)), closes [#5568](https://github.com/mikro-orm/mikro-orm/issues/5568) * **postresql:** add support for varchar with unlimited length ([#5707](https://github.com/mikro-orm/mikro-orm/issues/5707)) ([c22e971](https://github.com/mikro-orm/mikro-orm/commit/c22e97147877d0081b7310452b19acbd4609b2a2)) * **query-builder:** infer `Loaded` hint based on `joinAndSelect` calls ([#5482](https://github.com/mikro-orm/mikro-orm/issues/5482)) ([d18da6b](https://github.com/mikro-orm/mikro-orm/commit/d18da6b8cfce84ffaf480a27b869b79efbc70fb6)) ### Performance Improvements[​](#performance-improvements-9 "Direct link to Performance Improvements") * **core:** improve serialization speed ([136f704](https://github.com/mikro-orm/mikro-orm/commit/136f70455c7965a4363a69d95092300cfd906cce)) * **core:** rework `EntityKey` type to improve tsserver performance ([#5762](https://github.com/mikro-orm/mikro-orm/issues/5762)) ([dabe734](https://github.com/mikro-orm/mikro-orm/commit/dabe734274b5e2663bf45482e5e81897b0a8a456)), closes [#5708](https://github.com/mikro-orm/mikro-orm/issues/5708) ## [6.2.9](https://github.com/mikro-orm/mikro-orm/compare/v6.2.8...v6.2.9) (2024-05-31)[​](#629-2024-05-31 "Direct link to 629-2024-05-31") ### Bug Fixes[​](#bug-fixes-46 "Direct link to Bug Fixes") * **cli:** use `module: 'nodenext'` when registering ts-node ([#5514](https://github.com/mikro-orm/mikro-orm/issues/5514)) ([8695524](https://github.com/mikro-orm/mikro-orm/commit/869552411c65e5a42362277555f71549a64fccc7)), closes [#5427](https://github.com/mikro-orm/mikro-orm/issues/5427) * **core:** detect path from decorator for each class only once ([#5545](https://github.com/mikro-orm/mikro-orm/issues/5545)) ([9af0e38](https://github.com/mikro-orm/mikro-orm/commit/9af0e3815c9e8200ace3e6a09e5ebd23c6f768f8)) * **core:** improve support for `clientUrl` with additional query parameters ([1472705](https://github.com/mikro-orm/mikro-orm/commit/1472705bc1e974b09aa00a495b79f07cb776f5b8)), closes [#5608](https://github.com/mikro-orm/mikro-orm/issues/5608) * **core:** improve support for sharing columns in composite PK and FK ([#5623](https://github.com/mikro-orm/mikro-orm/issues/5623)) ([7190879](https://github.com/mikro-orm/mikro-orm/commit/7190879bdf64e51d31b61b275b98df84de02004e)), closes [#5622](https://github.com/mikro-orm/mikro-orm/issues/5622) * **core:** improve validation for missing `dbName` when `clientUrl` is provided ([c21359e](https://github.com/mikro-orm/mikro-orm/commit/c21359efe92c7abb22f706b00ac1aa1da38cffdf)) * **core:** respect `ignoreNestedTransactions` from upper context ([eab4df6](https://github.com/mikro-orm/mikro-orm/commit/eab4df67b22d636c0a76703c6f48dc0c76cc2433)), closes [#5585](https://github.com/mikro-orm/mikro-orm/issues/5585) * **core:** use explicit `NoInfer` type helper to support TS<5.4 ([c38b366](https://github.com/mikro-orm/mikro-orm/commit/c38b36609a5264a2b2a49a87a89091003fcf6f42)), closes [#5613](https://github.com/mikro-orm/mikro-orm/issues/5613) * **knex:** explicitly declare all the extended drivers as optional peer dependencies ([#5647](https://github.com/mikro-orm/mikro-orm/issues/5647)) ([64045ad](https://github.com/mikro-orm/mikro-orm/commit/64045adadae9f6c98e205927210de62ebb095adb)) * **mssql:** account for quotes in table names ([#5637](https://github.com/mikro-orm/mikro-orm/issues/5637)) ([0343609](https://github.com/mikro-orm/mikro-orm/commit/0343609c3e99d1fe5e4024a7afe0aaa2b2d6d980)) * **mssql:** fix creating migrations due to a missing helper method ([#5644](https://github.com/mikro-orm/mikro-orm/issues/5644)) ([90e27c2](https://github.com/mikro-orm/mikro-orm/commit/90e27c275d7db46269ee721e049dcfe09b274abe)), closes [#5633](https://github.com/mikro-orm/mikro-orm/issues/5633) * **mssql:** fix creating schema for migrations table ([fe1be6f](https://github.com/mikro-orm/mikro-orm/commit/fe1be6f099888ad9e289f091d53428a4498f4b0d)), closes [#5644](https://github.com/mikro-orm/mikro-orm/issues/5644) * **mssql:** fix ensuring the database exists on older SQL Server versions ([f0a5790](https://github.com/mikro-orm/mikro-orm/commit/f0a5790de0b08978983a3af82122e0f5045531dc)), closes [#5638](https://github.com/mikro-orm/mikro-orm/issues/5638) * **postgres:** respect `deferMode` option in 1:1 relations ([#5641](https://github.com/mikro-orm/mikro-orm/issues/5641)) ([101c0a8](https://github.com/mikro-orm/mikro-orm/commit/101c0a85cacfd20e7d4857646d7c7242e4ec1cd1)) * **reflection:** detect complex runtime types and don't use them as column types ([0c8a587](https://github.com/mikro-orm/mikro-orm/commit/0c8a58726c0a69f91c1494570029e36c89d1a64a)), closes [#5601](https://github.com/mikro-orm/mikro-orm/issues/5601) * **reflection:** support entities compiled by babel ([#5628](https://github.com/mikro-orm/mikro-orm/issues/5628)) ([26f627e](https://github.com/mikro-orm/mikro-orm/commit/26f627e3df2b66782e446de2419c350cf17c74ac)), closes [#5610](https://github.com/mikro-orm/mikro-orm/issues/5610) * **schema:** fix diffing renamed indexes and columns when the names are not lowercase ([4019dc3](https://github.com/mikro-orm/mikro-orm/commit/4019dc336f24bd79daeb8fd7997c06d055d23933)), closes [#5617](https://github.com/mikro-orm/mikro-orm/issues/5617) * **sql:** implement batching of M :N collection update queries ([d97979b](https://github.com/mikro-orm/mikro-orm/commit/d97979b236b8a7e40f64848e88602c531b8ebb84)), closes [#5627](https://github.com/mikro-orm/mikro-orm/issues/5627) ### Features[​](#features-26 "Direct link to Features") * **core:** allow overriding the `--config` argument name ([8b304ab](https://github.com/mikro-orm/mikro-orm/commit/8b304abecad740ac6b7f7820dafc6e7f8d6f5e6f)) ### Performance Improvements[​](#performance-improvements-10 "Direct link to Performance Improvements") * **sql:** optimize diffing M :N collection state ([f46e7c8](https://github.com/mikro-orm/mikro-orm/commit/f46e7c86e29727b57f3220901ac5b14a6f1719c1)), closes [#5627](https://github.com/mikro-orm/mikro-orm/issues/5627) ## [6.2.8](https://github.com/mikro-orm/mikro-orm/compare/v6.2.7...v6.2.8) (2024-05-21)[​](#628-2024-05-21 "Direct link to 628-2024-05-21") ### Bug Fixes[​](#bug-fixes-47 "Direct link to Bug Fixes") * **cli:** disable eager connection when creating the ORM instance ([ef5d14a](https://github.com/mikro-orm/mikro-orm/commit/ef5d14ad0f0ccf153c373991e2545851d10566cf)), closes [#5030](https://github.com/mikro-orm/mikro-orm/issues/5030) * **core:** allow hydration of non persistent embedded properties ([#5579](https://github.com/mikro-orm/mikro-orm/issues/5579)) ([e8c0c3f](https://github.com/mikro-orm/mikro-orm/commit/e8c0c3fe1d539d363f254ba039182eca4f15d39c)), closes [#5578](https://github.com/mikro-orm/mikro-orm/issues/5578) * **core:** always use root entity when computing M :N field names with STI ([568e57f](https://github.com/mikro-orm/mikro-orm/commit/568e57f7b513c2af774d74492474a6d5183d7658)), closes [#5586](https://github.com/mikro-orm/mikro-orm/issues/5586) * **core:** map embedded constructor parameters ([24f3ee6](https://github.com/mikro-orm/mikro-orm/commit/24f3ee6acfd7636102f1d438c19472374d5c6ca7)) * **postgres:** support `lockTableAliases` with explicit schema name in config ([3fdb077](https://github.com/mikro-orm/mikro-orm/commit/3fdb077893144111cf4d8b2ea5a22271d0f405df)), closes [#5125](https://github.com/mikro-orm/mikro-orm/issues/5125) [#5404](https://github.com/mikro-orm/mikro-orm/issues/5404) * **schema:** use `type` as `columnType` when no matching mapping found ([cd7f85c](https://github.com/mikro-orm/mikro-orm/commit/cd7f85c576f3424479bb161972a7152b84dbf2f8)), closes [#5587](https://github.com/mikro-orm/mikro-orm/issues/5587) * **sql:** respect `timezone` when mapping joined properties to `Date` ([7f9bb0b](https://github.com/mikro-orm/mikro-orm/commit/7f9bb0be291088b0098b839753bc7ca65fed1e99)), closes [#5577](https://github.com/mikro-orm/mikro-orm/issues/5577) ## [6.2.7](https://github.com/mikro-orm/mikro-orm/compare/v6.2.6...v6.2.7) (2024-05-18)[​](#627-2024-05-18 "Direct link to 627-2024-05-18") ### Bug Fixes[​](#bug-fixes-48 "Direct link to Bug Fixes") * **core:** fix ordering by joined embedded object properties ([cbd7c3e](https://github.com/mikro-orm/mikro-orm/commit/cbd7c3eaac520fdd9eda61fcb7321fea87bb9bdf)), closes [#5560](https://github.com/mikro-orm/mikro-orm/issues/5560) * **mongo:** ensure JSON values are properly diffed ([577166a](https://github.com/mikro-orm/mikro-orm/commit/577166abb18ed1e6bc11c973fc774cc1e7a95fd7)), closes [#5572](https://github.com/mikro-orm/mikro-orm/issues/5572) * **query-builder:** improve handling of nested `$and/$or` queries ([567d65a](https://github.com/mikro-orm/mikro-orm/commit/567d65ae27ea3627518d8d06119ac4b412d6e622)) * **schema:** revert the `dbName` after dropping the database ([725f7e9](https://github.com/mikro-orm/mikro-orm/commit/725f7e9e0940bfd60a6cd9992f567b21fb7c96fa)), closes [#5583](https://github.com/mikro-orm/mikro-orm/issues/5583) ## [6.2.6](https://github.com/mikro-orm/mikro-orm/compare/v6.2.5...v6.2.6) (2024-05-14)[​](#626-2024-05-14 "Direct link to 626-2024-05-14") ### Bug Fixes[​](#bug-fixes-49 "Direct link to Bug Fixes") * **core:** fix mapping of `Date` properties from `bigint` values ([05c802b](https://github.com/mikro-orm/mikro-orm/commit/05c802b5c33ed87cf57c119208dd34294c09c8b5)), closes [#5540](https://github.com/mikro-orm/mikro-orm/issues/5540) * **core:** quote column name for the returning statement when using `convertToJSValueSQL` ([4783945](https://github.com/mikro-orm/mikro-orm/commit/4783945b22ab3acb0893df52e4534963269444cf)), closes [#5563](https://github.com/mikro-orm/mikro-orm/issues/5563) * **core:** respect `runtimeType` override with reflect-metadata provider ([f1c9740](https://github.com/mikro-orm/mikro-orm/commit/f1c9740d940af0f2c09af1464fa8f6e7caef0ba3)) * **query-builder:** don't remove joins used by other joins during pagination ([#5566](https://github.com/mikro-orm/mikro-orm/issues/5566)) ([b05c434](https://github.com/mikro-orm/mikro-orm/commit/b05c434485d3a85dd775d6c084faafb8899ac6c3)), closes [#5565](https://github.com/mikro-orm/mikro-orm/issues/5565) * **reflection:** allow inference of `Ref & Opt` ([534f088](https://github.com/mikro-orm/mikro-orm/commit/534f0883667a126fd06e7c9ba4da44883f1996a6)), closes [#5557](https://github.com/mikro-orm/mikro-orm/issues/5557) * **sqlite:** fix mapping of joined results with `DateTimeType` properties ([4001d2b](https://github.com/mikro-orm/mikro-orm/commit/4001d2b4e50efe9ecdcb95c114ddd5c1bb9ccb9c)), closes [#5550](https://github.com/mikro-orm/mikro-orm/issues/5550) ## [6.2.5](https://github.com/mikro-orm/mikro-orm/compare/v6.2.4...v6.2.5) (2024-05-05)[​](#625-2024-05-05 "Direct link to 625-2024-05-05") ### Bug Fixes[​](#bug-fixes-50 "Direct link to Bug Fixes") * **core:** fix extra updates on embedded array properties ([48fde11](https://github.com/mikro-orm/mikro-orm/commit/48fde11a78f9566885881c0f55fb4085896bfb26)), closes [#5530](https://github.com/mikro-orm/mikro-orm/issues/5530) * **core:** fix hydration of relations with custom types via joined strategy ([07f10c8](https://github.com/mikro-orm/mikro-orm/commit/07f10c83606e71ff59f94884a8d1402d17ff8efd)), closes [#5518](https://github.com/mikro-orm/mikro-orm/issues/5518) * **core:** improve support for mapping `DecimalType` to `number` ([5a3e30e](https://github.com/mikro-orm/mikro-orm/commit/5a3e30e526f66d8ee7ae6ba323c6737050661bae)) * **core:** limit depth in custom `inspect` methods to get around debugging issues in vscode ([f706c06](https://github.com/mikro-orm/mikro-orm/commit/f706c06ff0219093644d90934d0b342ec4cbd075)), closes [#5525](https://github.com/mikro-orm/mikro-orm/issues/5525) * **core:** support path detection from decorators in bun ([6683bcc](https://github.com/mikro-orm/mikro-orm/commit/6683bcc13561f009189e78325b9e9e476f452524)), closes [#5496](https://github.com/mikro-orm/mikro-orm/issues/5496) * **mongo:** support cursor pagination on `Date` properties ([4281320](https://github.com/mikro-orm/mikro-orm/commit/4281320f233efb56d012da4fe60d380e8aa701a3)), closes [#5496](https://github.com/mikro-orm/mikro-orm/issues/5496) * **mysql:** infer unsigned value for FKs based on the target PK ([b7ae145](https://github.com/mikro-orm/mikro-orm/commit/b7ae1450121b4e6a024ce4069f4f378e36064016)), closes [#5485](https://github.com/mikro-orm/mikro-orm/issues/5485) * **query-builder:** do not reset join conditions when paginating ([0b851e5](https://github.com/mikro-orm/mikro-orm/commit/0b851e50b1fa64c76ead91c046aa5d3e231cfab4)), closes [#5538](https://github.com/mikro-orm/mikro-orm/issues/5538) * **schema:** skip extra columns in nested pivot entities ([f34e4d7](https://github.com/mikro-orm/mikro-orm/commit/f34e4d77fa75e842b898ee1a554d1bc6fd960aac)), closes [#5276](https://github.com/mikro-orm/mikro-orm/issues/5276) ### Features[​](#features-27 "Direct link to Features") * **core:** allow specifying the `runtimeType` explicitly ([e9c0c07](https://github.com/mikro-orm/mikro-orm/commit/e9c0c0758dd20c7674ed5df421bc3795212068a8)) ## [6.2.4](https://github.com/mikro-orm/mikro-orm/compare/v6.2.3...v6.2.4) (2024-05-02)[​](#624-2024-05-02 "Direct link to 624-2024-05-02") ### Bug Fixes[​](#bug-fixes-51 "Direct link to Bug Fixes") * **core:** do not issue extra updates when there are no matching changesets ([03934d0](https://github.com/mikro-orm/mikro-orm/commit/03934d072d545f4f6b01754eec9120b55dfbfc0a)), closes [#5510](https://github.com/mikro-orm/mikro-orm/issues/5510) * **core:** fix extra updates with `forceEntityConstructor` and JSON properties ([5ef57b6](https://github.com/mikro-orm/mikro-orm/commit/5ef57b684bf19c5ed7abed66e2a07cab1e5e655a)), closes [#5499](https://github.com/mikro-orm/mikro-orm/issues/5499) * **core:** keep transaction context when forking for `disableIdentityMap` ([ed88a02](https://github.com/mikro-orm/mikro-orm/commit/ed88a02470f3da101db4abfae125b318da8bc8c2)), closes [#5527](https://github.com/mikro-orm/mikro-orm/issues/5527) * **core:** keep transaction context when forking for `disableIdentityMap` ([8d4fe98](https://github.com/mikro-orm/mikro-orm/commit/8d4fe985bdd2aa331415fa0e9fa0c62295b41921)), closes [#5528](https://github.com/mikro-orm/mikro-orm/issues/5528) * **core:** support `onCreate` with `ScalarReference` properties ([09e5ca8](https://github.com/mikro-orm/mikro-orm/commit/09e5ca89e7eeedfed3f4d155bf4844ee99f1d2a8)), closes [#5506](https://github.com/mikro-orm/mikro-orm/issues/5506) ## [6.2.3](https://github.com/mikro-orm/mikro-orm/compare/v6.2.2...v6.2.3) (2024-04-24)[​](#623-2024-04-24 "Direct link to 623-2024-04-24") ### Bug Fixes[​](#bug-fixes-52 "Direct link to Bug Fixes") * **core:** fix handling of `first/last: 0` with cursor-based pagination ([508389e](https://github.com/mikro-orm/mikro-orm/commit/508389ea71cf63f4965d42b74a993572f388092b)), closes [#5501](https://github.com/mikro-orm/mikro-orm/issues/5501) * **core:** ignore upsert with inlined embedded properties ([7d2bed6](https://github.com/mikro-orm/mikro-orm/commit/7d2bed627ef0ed65206b59c4d5143eff9fe0326b)), closes [#5500](https://github.com/mikro-orm/mikro-orm/issues/5500) * **migrations:** fix reading migration snapshot ([096dcee](https://github.com/mikro-orm/mikro-orm/commit/096dcee04994d9c53f7e1bef6a6edf16589dddd4)), closes [#5497](https://github.com/mikro-orm/mikro-orm/issues/5497) * **query-builder:** do not prune join branches when paginating and there are raw fragments in select clause ([4d0fe15](https://github.com/mikro-orm/mikro-orm/commit/4d0fe152c1ca9479668b6a8bf9a5019575388917)), closes [#5490](https://github.com/mikro-orm/mikro-orm/issues/5490) ## [6.2.2](https://github.com/mikro-orm/mikro-orm/compare/v6.2.1...v6.2.2) (2024-04-20)[​](#622-2024-04-20 "Direct link to 622-2024-04-20") ### Bug Fixes[​](#bug-fixes-53 "Direct link to Bug Fixes") * **core:** do not enforce `require()` when running via ts-jest or on JSON imports ([7e8409b](https://github.com/mikro-orm/mikro-orm/commit/7e8409bb86ca6a35c755700b77e17b425c5ab186)), closes [#5461](https://github.com/mikro-orm/mikro-orm/issues/5461) * **core:** fix folder-based discovery for multiple entities in single file ([#5464](https://github.com/mikro-orm/mikro-orm/issues/5464)) ([d64be7e](https://github.com/mikro-orm/mikro-orm/commit/d64be7ef5ba7c2a655ea014992905d8afde3c231)) * **core:** ignore serialization options when using `toPOJO()` ([#5481](https://github.com/mikro-orm/mikro-orm/issues/5481)) ([46d6eb4](https://github.com/mikro-orm/mikro-orm/commit/46d6eb4248903f6729b6263dbafd171b8782178c)), closes [#5479](https://github.com/mikro-orm/mikro-orm/issues/5479) * **migrator:** store snapshot only after migration is generated ([#5470](https://github.com/mikro-orm/mikro-orm/issues/5470)) ([65ec57c](https://github.com/mikro-orm/mikro-orm/commit/65ec57cb441820c3db468869ab2ed9ce84aa9c5d)) * **mssql:** declare `import` types explicitly ([02494bf](https://github.com/mikro-orm/mikro-orm/commit/02494bf129e15261ba17218288a840120fedb089)), closes [#5462](https://github.com/mikro-orm/mikro-orm/issues/5462) * **mysql:** fix reading `auto_increment_increment` value ([1da88af](https://github.com/mikro-orm/mikro-orm/commit/1da88af065d17e7550d12b67bfac715a7041e9f9)), closes [#5460](https://github.com/mikro-orm/mikro-orm/issues/5460) * **postgres:** support wildcard native enums ([e183de3](https://github.com/mikro-orm/mikro-orm/commit/e183de3588437db2c41c9fb9d18940116f591a25)), closes [#5456](https://github.com/mikro-orm/mikro-orm/issues/5456) ### Features[​](#features-28 "Direct link to Features") * **entity-generator:** extend filtering options for EntityGenerator ([#5473](https://github.com/mikro-orm/mikro-orm/issues/5473)) ([0894ac9](https://github.com/mikro-orm/mikro-orm/commit/0894ac963bc3886e7a52596b4627c08627877afd)), closes [#5469](https://github.com/mikro-orm/mikro-orm/issues/5469) * **query-builder:** allow returning promise from virtual entity `expression` ([ee98412](https://github.com/mikro-orm/mikro-orm/commit/ee9841287c2fe312ef342e16d1396f620e575d3e)), closes [#5475](https://github.com/mikro-orm/mikro-orm/issues/5475) ## [6.2.1](https://github.com/mikro-orm/mikro-orm/compare/v6.2.0...v6.2.1) (2024-04-12)[​](#621-2024-04-12 "Direct link to 621-2024-04-12") ### Bug Fixes[​](#bug-fixes-54 "Direct link to Bug Fixes") * **core:** skip 1:1 owner auto-joins for lazy properties ([6442e57](https://github.com/mikro-orm/mikro-orm/commit/6442e5739fb8e3ed8284ec3bba64c7ee14808b97)) * **knex:** rework postgres and mysql dialect imports to fix compilation errors ([ffdca15](https://github.com/mikro-orm/mikro-orm/commit/ffdca15b5aa897f07988eb2218be893301636a5f)) * **mssql:** support instance names in `host` ([dc7dc4c](https://github.com/mikro-orm/mikro-orm/commit/dc7dc4cecfc8e3c426ce8c679365c8efa7705370)), closes [#5441](https://github.com/mikro-orm/mikro-orm/issues/5441) * **query-builder:** do not ignore unmatching partial loading hints in `qb.joinAndSelect` ([ccdf018](https://github.com/mikro-orm/mikro-orm/commit/ccdf018efd879419729b3fab4d08b2d4c6b29140)), closes [#5445](https://github.com/mikro-orm/mikro-orm/issues/5445) * **query-builder:** fix partial loading via `qb.joinAndSelect` with explicit aliasing ([da68503](https://github.com/mikro-orm/mikro-orm/commit/da6850329b93a5e6104acd2aa3ab946a805f045c)), closes [#5445](https://github.com/mikro-orm/mikro-orm/issues/5445) * **query-builder:** generate join on condition for subquery joins with known property name ([3dfbbde](https://github.com/mikro-orm/mikro-orm/commit/3dfbbde23b576aec2a0c8ed455627e2ee5e78749)), closes [#5445](https://github.com/mikro-orm/mikro-orm/issues/5445) * **query-builder:** respect collection property where conditions (declarative partial loading) ([3b4fc41](https://github.com/mikro-orm/mikro-orm/commit/3b4fc417c9f85f7309d78faddcf11985667c5c20)), closes [#5445](https://github.com/mikro-orm/mikro-orm/issues/5445) ## [6.2.0](https://github.com/mikro-orm/mikro-orm/compare/v6.1.12...v6.2.0) (2024-04-09)[​](#620-2024-04-09 "Direct link to 620-2024-04-09") ### Bug Fixes[​](#bug-fixes-55 "Direct link to Bug Fixes") * **core:** do not select 1:1 owning FK twice ([fa69276](https://github.com/mikro-orm/mikro-orm/commit/fa6927617f490c272ba2c7fe30d8bac688c6b613)) * **core:** fix querying by embedded properties inside relations ([2e74699](https://github.com/mikro-orm/mikro-orm/commit/2e746991f964072d3afcad621b10424485e8466e)), closes [#5391](https://github.com/mikro-orm/mikro-orm/issues/5391) * **core:** fix support for custom repositories in `@CreateRequestContext` on type level ([aacac83](https://github.com/mikro-orm/mikro-orm/commit/aacac830e7185fb923ad287bfd485fcc04fe0c4a)) * **core:** fix TypeError when ordering by embedded populating properties ([2c472ab](https://github.com/mikro-orm/mikro-orm/commit/2c472abaeb033347bca2cddd8820d0c97201a91d)), closes [#5389](https://github.com/mikro-orm/mikro-orm/issues/5389) * **core:** ignore current context when creating repository instance ([4c12fc5](https://github.com/mikro-orm/mikro-orm/commit/4c12fc5bd3b8d3dbad6711eaeaf839cf3470dcc8)), closes [#5395](https://github.com/mikro-orm/mikro-orm/issues/5395) * **core:** prefer entity type inference from the first parameter of entity manager methods ([523963b](https://github.com/mikro-orm/mikro-orm/commit/523963b459c0f5af4d9d0d78c03be9487efc9e9a)) * **core:** respect custom `EntityManager` type in `em.fork()` ([bb1a3f9](https://github.com/mikro-orm/mikro-orm/commit/bb1a3f917d9ed56aa274c9f3baf4d69aa893051e)), closes [#5415](https://github.com/mikro-orm/mikro-orm/issues/5415) * **core:** support passing `Configuration` instance to `MikroORM.init` ([54a37d0](https://github.com/mikro-orm/mikro-orm/commit/54a37d016755f989545145e43abb56771b1e19ba)), closes [#5413](https://github.com/mikro-orm/mikro-orm/issues/5413) * **entity-generator:** allow arbitrary class and prop names as identifiers ([#5359](https://github.com/mikro-orm/mikro-orm/issues/5359)) ([b0c0236](https://github.com/mikro-orm/mikro-orm/commit/b0c0236ac8a2154e7181ac737baccbe95782f337)) * **mariadb:** rework pagination mechanism to fix extra results ([a57cb19](https://github.com/mikro-orm/mikro-orm/commit/a57cb198654c541968e0c90d89d7186e7bb71b1a)) * **mysql:** support `order by nulls first/last` for raw query fragments in order by keys ([a2a8f0d](https://github.com/mikro-orm/mikro-orm/commit/a2a8f0df09c5e6f5420ecc352d1d034d84816a37)) * **postgres:** drop text enum check constraints only when necessary ([#5414](https://github.com/mikro-orm/mikro-orm/issues/5414)) ([5162345](https://github.com/mikro-orm/mikro-orm/commit/516234542373b6d62135b88e45df17d4e41cdf08)), closes [#4112](https://github.com/mikro-orm/mikro-orm/issues/4112) * **postgres:** removed erroneous duplicates in FK discovery query ([#5376](https://github.com/mikro-orm/mikro-orm/issues/5376)) ([eec2b38](https://github.com/mikro-orm/mikro-orm/commit/eec2b387f165b5390185887b695e219c09bd9b60)) * **query-builder:** fix serialization hint of nested `qb.joinAndSelect()` calls ([c2843b9](https://github.com/mikro-orm/mikro-orm/commit/c2843b9fc5598b5f3af57cbf9f6105a35b0d3536)) * **schema:** improve detection of renamed columns ([4d13c58](https://github.com/mikro-orm/mikro-orm/commit/4d13c585e0b0ea5552eba606897370c8aeab4b57)) * **schema:** rework dropping columns to support custom schemas and merge drop column queries ([255f425](https://github.com/mikro-orm/mikro-orm/commit/255f42594652453ba39676ff22af88dbb5f1990d)) ### Features[​](#features-29 "Direct link to Features") * **core:** add support for serialization groups ([#5416](https://github.com/mikro-orm/mikro-orm/issues/5416)) ([818c290](https://github.com/mikro-orm/mikro-orm/commit/818c29001a448e3d06fdc88e71f6a65ce9ff8b45)) * **core:** allow better type-safety for custom types via `IType` ([#5383](https://github.com/mikro-orm/mikro-orm/issues/5383)) ([0e18346](https://github.com/mikro-orm/mikro-orm/commit/0e183461026efb6d20c71623f366e7baa8041c40)) * **core:** allow configuring `driverOptions` on replica level ([05e81f8](https://github.com/mikro-orm/mikro-orm/commit/05e81f893a32b990d8bc0bebd22d86603242f156)) * **core:** include all dirty collections to `UoW.getCollectionUpdates()` ([e7bd66f](https://github.com/mikro-orm/mikro-orm/commit/e7bd66f523f6a12d89e16b4480a76321018c7e8b)) * **core:** make `assign` options configurable globally ([bc9f6f5](https://github.com/mikro-orm/mikro-orm/commit/bc9f6f5bbecac302f0beb227703a9654f71d967b)), closes [#5410](https://github.com/mikro-orm/mikro-orm/issues/5410) * **libsql:** add libSQL driver ([#5417](https://github.com/mikro-orm/mikro-orm/issues/5417)) ([6c63e4b](https://github.com/mikro-orm/mikro-orm/commit/6c63e4bd45c81b3a09b668f13dc0ce240e85107c)), closes [#5283](https://github.com/mikro-orm/mikro-orm/issues/5283) * **mssql:** add MS SQL Server driver ([#1375](https://github.com/mikro-orm/mikro-orm/issues/1375)) ([eeaad45](https://github.com/mikro-orm/mikro-orm/commit/eeaad45a60b3ef4732d5ba9eafc8719998e52181)), closes [#771](https://github.com/mikro-orm/mikro-orm/issues/771) * **postgres:** allow defining deferred FK constraints ([#5384](https://github.com/mikro-orm/mikro-orm/issues/5384)) ([f42d171](https://github.com/mikro-orm/mikro-orm/commit/f42d171f8bc7604c7b36f15f680f37402990bf9e)), closes [#5306](https://github.com/mikro-orm/mikro-orm/issues/5306) * **query-builder:** add `limit 1` when executing query via `getSingleResult()` or `execute('get')` ([c2b22e8](https://github.com/mikro-orm/mikro-orm/commit/c2b22e80c47eabd2284dca41cedd7c871a78eac4)), closes [#5379](https://github.com/mikro-orm/mikro-orm/issues/5379) * **query-builder:** add `qb.getLoggerContext()` and `qb.setLoggerContext()` ([779fa15](https://github.com/mikro-orm/mikro-orm/commit/779fa15ac762a9bae843a8b2f009e1861527469f)), closes [#5358](https://github.com/mikro-orm/mikro-orm/issues/5358) * **schema:** allow configuring `updateRule` and `deleteRule` for pivot tables ([cc69c3c](https://github.com/mikro-orm/mikro-orm/commit/cc69c3c391259c6160b3522c89b0852b3366921a)) * **schema:** improve `orm.schema.execute()` to support executing batches ([3c5a347](https://github.com/mikro-orm/mikro-orm/commit/3c5a347d0ce277dc8b33ed6f3dd6e6e4315aa4eb)) * **schema:** support recreating the whole database via `orm.schema.refreshDatabase()` ([2e4ab49](https://github.com/mikro-orm/mikro-orm/commit/2e4ab49e5abbb3ee6a6f19fd028cbce6d93e4aa0)) ### Performance Improvements[​](#performance-improvements-11 "Direct link to Performance Improvements") * **core:** optimize metadata discovery ([c322f9b](https://github.com/mikro-orm/mikro-orm/commit/c322f9bcca087180a77c5ed006b1624dd4879790)) * **query-builder:** remove unnecessary join branches when pagination is applied ([d228976](https://github.com/mikro-orm/mikro-orm/commit/d228976d9ca4b8a2e69361ad31f63ef88977ee9e)) ## [6.1.12](https://github.com/mikro-orm/mikro-orm/compare/v6.1.11...v6.1.12) (2024-03-24)[​](#6112-2024-03-24 "Direct link to 6112-2024-03-24") ### Bug Fixes[​](#bug-fixes-56 "Direct link to Bug Fixes") * **core:** fix assignability of partially loaded entities ([9de4965](https://github.com/mikro-orm/mikro-orm/commit/9de4965dc1ec952b3addc2d902ee5587c2f38f05)), closes [#5374](https://github.com/mikro-orm/mikro-orm/issues/5374) * **core:** fix inlining of `$and` conditions ([8ddb3e4](https://github.com/mikro-orm/mikro-orm/commit/8ddb3e4f5166a0e425c4a895fde003e80e0c6bdb)), closes [#5368](https://github.com/mikro-orm/mikro-orm/issues/5368) * **entity-generator:** try to resolve errors for foreign keys without indexes ([f2094ab](https://github.com/mikro-orm/mikro-orm/commit/f2094ab3383bc7de9da892b8d259c67b1144c741)), closes [#5364](https://github.com/mikro-orm/mikro-orm/issues/5364) * **postgres:** fix query for loading all foreign keys from existing schema ([2eb85d5](https://github.com/mikro-orm/mikro-orm/commit/2eb85d501727601ee86eba8c2c1a11d994cce8cf)), closes [#5364](https://github.com/mikro-orm/mikro-orm/issues/5364) * **reflection:** fallback to not proving path to tsconfig if not found ([a24d80d](https://github.com/mikro-orm/mikro-orm/commit/a24d80dc3353a6a84c9c6f1ac26b3c7e3e824901)) ### Features[​](#features-30 "Direct link to Features") * **cli:** add reason for failed connection check in `debug` command ([d61e248](https://github.com/mikro-orm/mikro-orm/commit/d61e248688676a875cdd16c9d780fe8485687c09)) * **core:** allow passing `EntityManager` or `EntityRepository` to `@CreateRequestContext` decorator ([184cdd4](https://github.com/mikro-orm/mikro-orm/commit/184cdd43ce4dcee5288b3297719914e9f25e50cb)) * **postgres:** add `?`, `?|` and `?&` json operators ([#5366](https://github.com/mikro-orm/mikro-orm/issues/5366)) ([6418872](https://github.com/mikro-orm/mikro-orm/commit/641887245abbded5df2d984fc24c6fe3cea80c9b)), closes [#4678](https://github.com/mikro-orm/mikro-orm/issues/4678) ### Performance Improvements[​](#performance-improvements-12 "Direct link to Performance Improvements") * **postgres:** try to optimize loading of foreign keys ([2dff96b](https://github.com/mikro-orm/mikro-orm/commit/2dff96bc48c6a84bc1fc213e8044b0ac722d4792)), closes [#5364](https://github.com/mikro-orm/mikro-orm/issues/5364) ## [6.1.11](https://github.com/mikro-orm/mikro-orm/compare/v6.1.10...v6.1.11) (2024-03-18)[​](#6111-2024-03-18 "Direct link to 6111-2024-03-18") ### Bug Fixes[​](#bug-fixes-57 "Direct link to Bug Fixes") * **core:** improve serialization of lazily partially loaded entities ([1c7b446](https://github.com/mikro-orm/mikro-orm/commit/1c7b44652100aa4e940787b3ee7ca4e208039984)), closes [#5139](https://github.com/mikro-orm/mikro-orm/issues/5139) * **core:** support unsetting composite FKs via flush ([64f2afd](https://github.com/mikro-orm/mikro-orm/commit/64f2afd1a899b86e54eef6e58d6f475b28f67c6f)) * **migrator:** type mismatch between Migration interface and class ([#5343](https://github.com/mikro-orm/mikro-orm/issues/5343)) ([2fba5ee](https://github.com/mikro-orm/mikro-orm/commit/2fba5eebbc118c98a890b3083d521b52b263ba30)), closes [#5340](https://github.com/mikro-orm/mikro-orm/issues/5340) * **query-builder:** fix aliasing of FK when used in deeply nested and/or conditions ([ebb966c](https://github.com/mikro-orm/mikro-orm/commit/ebb966caae9f06a8c4a9fec7a642e678ddfebb66)), closes [#5086](https://github.com/mikro-orm/mikro-orm/issues/5086) * **reflection:** respect custom tsconfig options ([e8cfdc0](https://github.com/mikro-orm/mikro-orm/commit/e8cfdc04cb5beed30f3ce144d7d57ee6d95e0c60)) * **sql:** fix aliasing of nested composite FK queries ([60b2c91](https://github.com/mikro-orm/mikro-orm/commit/60b2c9197249c8f982423ef320463cc8357b6542)) ## [6.1.10](https://github.com/mikro-orm/mikro-orm/compare/v6.1.9...v6.1.10) (2024-03-14)[​](#6110-2024-03-14 "Direct link to 6110-2024-03-14") ### Bug Fixes[​](#bug-fixes-58 "Direct link to Bug Fixes") * **core:** detect `ts-node` when using esm loader ([#5332](https://github.com/mikro-orm/mikro-orm/issues/5332)) ([23cc880](https://github.com/mikro-orm/mikro-orm/commit/23cc8803d22d90868e3411e77d5c81b04e7bc651)) * **core:** don't alias formulas in update/delete queries ([9e35642](https://github.com/mikro-orm/mikro-orm/commit/9e3564234ba80546df162b628bfebadad6b5c036)), closes [#5334](https://github.com/mikro-orm/mikro-orm/issues/5334) * **core:** fix populating references for 1 :m collections ([9b9027d](https://github.com/mikro-orm/mikro-orm/commit/9b9027d65a3dff6822b3463871e6571b3aa22a76)), closes [#5336](https://github.com/mikro-orm/mikro-orm/issues/5336) * **core:** fix value of `hasPrev[/Next]Page` when paginating backwards ([#5320](https://github.com/mikro-orm/mikro-orm/issues/5320)) ([00239eb](https://github.com/mikro-orm/mikro-orm/commit/00239ebe97d65aef520c39fdc6121fc138ebb8ce)) * **postgres:** fix diffing of native enums (create/remove via `schema:update`) ([7c8be79](https://github.com/mikro-orm/mikro-orm/commit/7c8be795e5c5b365dbb03ecadc7709cc42794b12)), closes [#5322](https://github.com/mikro-orm/mikro-orm/issues/5322) * **query-builder:** allow joining object/array properties ([fd90bae](https://github.com/mikro-orm/mikro-orm/commit/fd90bae88e02cda9f1f8fcb6246c723464209a00)), closes [#5325](https://github.com/mikro-orm/mikro-orm/issues/5325) * **query-builder:** fix `join on` conditions where `or` operator ([92936ef](https://github.com/mikro-orm/mikro-orm/commit/92936efd8ba5aa97c5c204127116f48133d63f90)) * **schema:** support compound index over JSON property and a regular column ([319df49](https://github.com/mikro-orm/mikro-orm/commit/319df499742475c68df3581f4863be649aa564d7)), closes [#5333](https://github.com/mikro-orm/mikro-orm/issues/5333) * **sql:** allow creating query builder from a global context ([9217bb3](https://github.com/mikro-orm/mikro-orm/commit/9217bb3fefe3bfa4570160b46f8475f2148bde97)) * **sql:** override FK value when it's disallowed by query condition ([0d20847](https://github.com/mikro-orm/mikro-orm/commit/0d20847ad10ba29f8bcab1c033400f6a2bf7b43a)) ### Features[​](#features-31 "Direct link to Features") * **core:** add `onlyOwnProperties` option to `assign` helper ([#5330](https://github.com/mikro-orm/mikro-orm/issues/5330)) ([a081bea](https://github.com/mikro-orm/mikro-orm/commit/a081bea80d17c01213c26a9cf7ad4b89e05ab33a)), closes [#5327](https://github.com/mikro-orm/mikro-orm/issues/5327) * **postgres:** provide more details in driver exceptions ([e782d06](https://github.com/mikro-orm/mikro-orm/commit/e782d0686e45ddfd1e91e613ed83b0b5a046dc6f)) ### Performance Improvements[​](#performance-improvements-13 "Direct link to Performance Improvements") * **core:** disable change tracking on scalars when `flushMode: auto` ([fc30bfe](https://github.com/mikro-orm/mikro-orm/commit/fc30bfe13888293a9ac9b91d8bbc874eb3c98e31)) ## [6.1.9](https://github.com/mikro-orm/mikro-orm/compare/v6.1.8...v6.1.9) (2024-03-10)[​](#619-2024-03-10 "Direct link to 619-2024-03-10") ### Bug Fixes[​](#bug-fixes-59 "Direct link to Bug Fixes") * **core:** don't propagate changes from `em.transactional()` to upper context if its global ([7ac9a19](https://github.com/mikro-orm/mikro-orm/commit/7ac9a1945469264ea32727c2e63fd89d9f2d7ec8)), closes [#5309](https://github.com/mikro-orm/mikro-orm/issues/5309) * **core:** ignore filters on relations inside embedded properties ([1e4b2ce](https://github.com/mikro-orm/mikro-orm/commit/1e4b2ce41d66e1686aac0d28bf8b6a06b2cbf9b4)), closes [#5310](https://github.com/mikro-orm/mikro-orm/issues/5310) * **core:** improve checks for generated columns ([0396e1e](https://github.com/mikro-orm/mikro-orm/commit/0396e1e8c0cd65f1dcd4ea4d29419ed2b5e7446a)) * **core:** map virtual relations with `persist: false` as formulas to preserve aliasing ([20a4cfb](https://github.com/mikro-orm/mikro-orm/commit/20a4cfb005fed168786d0da806d1c89e29b6f4ab)) * **entity-generator:** emit missing imports in `EntitySchema` generated files ([#5311](https://github.com/mikro-orm/mikro-orm/issues/5311)) ([f680d66](https://github.com/mikro-orm/mikro-orm/commit/f680d66d8da08f0c6c898c3dd300bf1e920439b4)) * **entity-generator:** output type import statements for type only core imports ([#5317](https://github.com/mikro-orm/mikro-orm/issues/5317)) ([bd3f160](https://github.com/mikro-orm/mikro-orm/commit/bd3f160988ac48c9d1a0b591f5674f9b8f5e16e7)) * **migrator:** allow `up` and `down` methods to be synchronous ([#5316](https://github.com/mikro-orm/mikro-orm/issues/5316)) ([dd6daf9](https://github.com/mikro-orm/mikro-orm/commit/dd6daf9fb212c643bb1cc7679e47ed027847b656)) ### Features[​](#features-32 "Direct link to Features") * **postgres:** add support for native enum arrays ([c2e362b](https://github.com/mikro-orm/mikro-orm/commit/c2e362bc6fe19ec792d13f475a11cf2290b94fde)), closes [#5322](https://github.com/mikro-orm/mikro-orm/issues/5322) ## [6.1.8](https://github.com/mikro-orm/mikro-orm/compare/v6.1.7...v6.1.8) (2024-03-06)[​](#618-2024-03-06 "Direct link to 618-2024-03-06") ### Bug Fixes[​](#bug-fixes-60 "Direct link to Bug Fixes") * **core:** allow setting values to `null` on unloaded references ([1cbead6](https://github.com/mikro-orm/mikro-orm/commit/1cbead6eec839777e5f8f00e9fcdfe7a9a8088bf)), closes [#5274](https://github.com/mikro-orm/mikro-orm/issues/5274) * **core:** fix bulk-inserting entities with nullable embedded arrays ([f16551e](https://github.com/mikro-orm/mikro-orm/commit/f16551ec37e4a12b29c7ada2427a29b81d15996e)) * **core:** skip STI discriminator condition when bulk-deleting entities ([fa712ca](https://github.com/mikro-orm/mikro-orm/commit/fa712ca134d16334aaba275779df14970ed8bfb8)), closes [#5303](https://github.com/mikro-orm/mikro-orm/issues/5303) * **query-builder:** fix `qb.getResultAndCount()` when pagination is triggered ([67444c0](https://github.com/mikro-orm/mikro-orm/commit/67444c08a27af1a2d6d65ee061a4e54f1dac0734)) ## [6.1.7](https://github.com/mikro-orm/mikro-orm/compare/v6.1.6...v6.1.7) (2024-03-04)[​](#617-2024-03-04 "Direct link to 617-2024-03-04") ### Bug Fixes[​](#bug-fixes-61 "Direct link to Bug Fixes") * **core:** add `em.addFilter()` fallback signature that allows more than 3 types ([b6efd44](https://github.com/mikro-orm/mikro-orm/commit/b6efd4470e9c060c3611c1e3395bd9f500cd0376)) * **core:** fix aliasing of queries with collection operators ([0435faf](https://github.com/mikro-orm/mikro-orm/commit/0435faf712783c89ed8b9de456c8da1c4f551c91)), closes [#5301](https://github.com/mikro-orm/mikro-orm/issues/5301) * **core:** ignore collection operators in `populateWhere` conditions ([7b6b363](https://github.com/mikro-orm/mikro-orm/commit/7b6b3634301469cd39fa18f39e6761f01a0d94bb)) * **query-builder:** check for duplicate selects when wrapping pagination query ([e005cc2](https://github.com/mikro-orm/mikro-orm/commit/e005cc22ef4e247f9741bdcaf1af012337977b7e)) * **query-builder:** fix cloning of alias map ([50d8fb9](https://github.com/mikro-orm/mikro-orm/commit/50d8fb9b1b3f9b59768badd70138c4b83e516bf1)) ### Features[​](#features-33 "Direct link to Features") * **core:** validate wrong placement of collection operators ([c35e705](https://github.com/mikro-orm/mikro-orm/commit/c35e705714f2f88b8da8a0264b5517d6f991274f)) ## [6.1.6](https://github.com/mikro-orm/mikro-orm/compare/v6.1.5...v6.1.6) (2024-02-28)[​](#616-2024-02-28 "Direct link to 616-2024-02-28") ### Bug Fixes[​](#bug-fixes-62 "Direct link to Bug Fixes") * **core:** don't refresh collection state via `Collection.load()` ([f5be639](https://github.com/mikro-orm/mikro-orm/commit/f5be6393a272b7d2d6d4083361573b574d865ae6)), closes [#5268](https://github.com/mikro-orm/mikro-orm/issues/5268) * **core:** fix type of `options` parameter in `repository.upsert/Many()` ([4c12e7f](https://github.com/mikro-orm/mikro-orm/commit/4c12e7f202ce93e884b4da87a8b3a5a42ee63216)) * **core:** support raw fragments in `orderBy` of 1 :m and m :n relations ([ed80163](https://github.com/mikro-orm/mikro-orm/commit/ed801634b6677da9f123f7033f27452a40558602)), closes [#5277](https://github.com/mikro-orm/mikro-orm/issues/5277) * **mysql:** apply current context when fetching `auto_increment_increment` ([#5280](https://github.com/mikro-orm/mikro-orm/issues/5280)) ([c8021da](https://github.com/mikro-orm/mikro-orm/commit/c8021da020d7afa0f338319811a72ef4c1877d12)), closes [#5279](https://github.com/mikro-orm/mikro-orm/issues/5279) ### Performance Improvements[​](#performance-improvements-14 "Direct link to Performance Improvements") * **core:** improve composite PK hashing ([73094ef](https://github.com/mikro-orm/mikro-orm/commit/73094efb8f140f57bf6e1f160edf209812182eab)) * **core:** improve hydration of simple FKs ([c4bd1f0](https://github.com/mikro-orm/mikro-orm/commit/c4bd1f0317a481df6fc55625353dd79f8dd056c4)) * **core:** optimize adding entities to large collections ([8a960d5](https://github.com/mikro-orm/mikro-orm/commit/8a960d571fc9c245d5dd10e5973e5b83ce454d92)) ## [6.1.5](https://github.com/mikro-orm/mikro-orm/compare/v6.1.4...v6.1.5) (2024-02-21)[​](#615-2024-02-21 "Direct link to 615-2024-02-21") ### Bug Fixes[​](#bug-fixes-63 "Direct link to Bug Fixes") * **core:** allow serializing raw SQL fragments outside of entity serialization ([9158f51](https://github.com/mikro-orm/mikro-orm/commit/9158f515e513310f593aade04e6bedaa29cd6459)), closes [#5257](https://github.com/mikro-orm/mikro-orm/issues/5257) * **core:** ensure missing type validation ignores enums ([a916710](https://github.com/mikro-orm/mikro-orm/commit/a916710dfb48156976c45fb824f95fb958c87409)), closes [#5255](https://github.com/mikro-orm/mikro-orm/issues/5255) * **core:** fix `orderBy` option on to-many properties with arrays ([fae2302](https://github.com/mikro-orm/mikro-orm/commit/fae2302bdfdc28629a8c21a6d53782d7d61b6240)), closes [#5265](https://github.com/mikro-orm/mikro-orm/issues/5265) * **core:** ignore virtual properties in partial loading hint ([d327db5](https://github.com/mikro-orm/mikro-orm/commit/d327db528529298dd23d8eb089a67a5b5e96a7fb)), closes [#5261](https://github.com/mikro-orm/mikro-orm/issues/5261) * **entity-generator:** fixed generation of unsigned columns ([#5254](https://github.com/mikro-orm/mikro-orm/issues/5254)) ([d78da29](https://github.com/mikro-orm/mikro-orm/commit/d78da297c701a319ea704847e97c2186934831bc)) * **entity-generator:** optional and hidden properties get type option + string defaults ([#5264](https://github.com/mikro-orm/mikro-orm/issues/5264)) ([12d3b54](https://github.com/mikro-orm/mikro-orm/commit/12d3b54118035195f5ee0ee5665e37a7f2e37164)), closes [#5260](https://github.com/mikro-orm/mikro-orm/issues/5260) * **schema:** allow 1 :m properties in pivot entities ([c370578](https://github.com/mikro-orm/mikro-orm/commit/c37057808aca5b6a4ac190d38374405edc833762)) ## [6.1.4](https://github.com/mikro-orm/mikro-orm/compare/v6.1.3...v6.1.4) (2024-02-16)[​](#614-2024-02-16 "Direct link to 614-2024-02-16") ### Bug Fixes[​](#bug-fixes-64 "Direct link to Bug Fixes") * **core:** fix populating 1:1 inverse sides when virtual FK is not selected ([46cb6a1](https://github.com/mikro-orm/mikro-orm/commit/46cb6a1ec91fe2b11dc6c8a0045c36ed194cabc8)), closes [#5245](https://github.com/mikro-orm/mikro-orm/issues/5245) * **entity-generator:** use `Ref` wrapper on all lazy properties ([#5252](https://github.com/mikro-orm/mikro-orm/issues/5252)) ([50311cb](https://github.com/mikro-orm/mikro-orm/commit/50311cbdd66d289e7048c8d77b395a541a9f2605)) * **query-builder:** fix caching of raw query fragments when `qb.getQuery()` is called ([f79a752](https://github.com/mikro-orm/mikro-orm/commit/f79a752eee23b555927610cf9d75739294302029)), closes [#5247](https://github.com/mikro-orm/mikro-orm/issues/5247) ### Features[​](#features-34 "Direct link to Features") * **entity-generator:** added support for generated columns ([#5250](https://github.com/mikro-orm/mikro-orm/issues/5250)) ([d2186da](https://github.com/mikro-orm/mikro-orm/commit/d2186da4ed3265d8667069c3ac0514843987cb2b)) ## [6.1.3](https://github.com/mikro-orm/mikro-orm/compare/v6.1.2...v6.1.3) (2024-02-13)[​](#613-2024-02-13 "Direct link to 613-2024-02-13") ### Bug Fixes[​](#bug-fixes-65 "Direct link to Bug Fixes") * **core:** fix extra updates when embedded property name matches inner field name ([e008dab](https://github.com/mikro-orm/mikro-orm/commit/e008dabc3d22c011a67ac0d0004e67c200410557)), closes [#5240](https://github.com/mikro-orm/mikro-orm/issues/5240) * **core:** fix validation for removing items from 1 :m collections ([34b8473](https://github.com/mikro-orm/mikro-orm/commit/34b8473d7056b864f0b4c7825f784368299edcfa)), closes [#5243](https://github.com/mikro-orm/mikro-orm/issues/5243) * **postgres:** implement casting for JSON queries on types like `double` or `bigint` ([b00eae6](https://github.com/mikro-orm/mikro-orm/commit/b00eae695aae3258e68799dc4e2101123eeac866)), closes [#5239](https://github.com/mikro-orm/mikro-orm/issues/5239) ### Features[​](#features-35 "Direct link to Features") * **entity-generator:** support `mapToPk` option ([#5241](https://github.com/mikro-orm/mikro-orm/issues/5241)) ([3afaa29](https://github.com/mikro-orm/mikro-orm/commit/3afaa29704c5889e24806a6f2027a465c53e0f2e)) ## [6.1.2](https://github.com/mikro-orm/mikro-orm/compare/v6.1.1...v6.1.2) (2024-02-11)[​](#612-2024-02-11 "Direct link to 612-2024-02-11") ### Bug Fixes[​](#bug-fixes-66 "Direct link to Bug Fixes") * **core:** allow multiple abstract levels for STI entities ([0c56118](https://github.com/mikro-orm/mikro-orm/commit/0c56118603c25a471a0c636912b976a4291290b3)), closes [#3745](https://github.com/mikro-orm/mikro-orm/issues/3745) * **core:** respect user provided env vars over those from `.env` file ([e25ca11](https://github.com/mikro-orm/mikro-orm/commit/e25ca11c20ebbf83946c9e29b9beee8d08cd97e3)) ### Features[​](#features-36 "Direct link to Features") * **entity-generator:** add the ability to use custom and/or core base entity ([#5232](https://github.com/mikro-orm/mikro-orm/issues/5232)) ([066dac1](https://github.com/mikro-orm/mikro-orm/commit/066dac1828802dca82361146b6eae012386baeff)) ## [6.1.1](https://github.com/mikro-orm/mikro-orm/compare/v6.1.0...v6.1.1) (2024-02-10)[​](#611-2024-02-10 "Direct link to 611-2024-02-10") ### Bug Fixes[​](#bug-fixes-67 "Direct link to Bug Fixes") * **core:** consider star populates on nested positions only for one level ([65d1575](https://github.com/mikro-orm/mikro-orm/commit/65d15753774aa5e61fbefaf86d9004ac206bec19)), closes [#5213](https://github.com/mikro-orm/mikro-orm/issues/5213) * **core:** do not enforce `discriminatorColumn` type ([d2a016e](https://github.com/mikro-orm/mikro-orm/commit/d2a016eccceec59de5b9ee62e6905110951f4d92)), closes [#5224](https://github.com/mikro-orm/mikro-orm/issues/5224) * **core:** fix change detection on STI entities ([3c43251](https://github.com/mikro-orm/mikro-orm/commit/3c43251d900f2b7bccd4117fd8cd57b1904232c8)), closes [#5224](https://github.com/mikro-orm/mikro-orm/issues/5224) * **core:** fix optimistic locking on STI entities ([36ad806](https://github.com/mikro-orm/mikro-orm/commit/36ad8066858ad8cbfd6af5fc3bcf6e0c87dbf020)), closes [#5224](https://github.com/mikro-orm/mikro-orm/issues/5224) * **core:** respect star in `parent.*` populate hints ([39910ab](https://github.com/mikro-orm/mikro-orm/commit/39910abb4d263c614868fcd4edc91cf12042ae32)), closes [#5213](https://github.com/mikro-orm/mikro-orm/issues/5213) * **postgres:** declare dependency on `postgres-array` ([e73fd1a](https://github.com/mikro-orm/mikro-orm/commit/e73fd1a2ec92534c2889255132fb95129de1bb23)) * **postgres:** fix parsing of date properties inside object emebddables ([760ec77](https://github.com/mikro-orm/mikro-orm/commit/760ec77b1f852103f878998bb2c76edce1fb5c77)), closes [#5216](https://github.com/mikro-orm/mikro-orm/issues/5216) * **reflection:** only validate known types to allow using type aliases ([d6b93be](https://github.com/mikro-orm/mikro-orm/commit/d6b93bee537e3e1b05756fda39c9bc320c93d4c1)), closes [#5221](https://github.com/mikro-orm/mikro-orm/issues/5221) ### Features[​](#features-37 "Direct link to Features") * **entity-generator:** support functions in extension hooks ([#5218](https://github.com/mikro-orm/mikro-orm/issues/5218)) ([b28321c](https://github.com/mikro-orm/mikro-orm/commit/b28321c14a848dcc5528044d5a4c0fe2a5bab6ba)) ## [6.1.0](https://github.com/mikro-orm/mikro-orm/compare/v6.0.7...v6.1.0) (2024-02-04)[​](#610-2024-02-04 "Direct link to 610-2024-02-04") ### Bug Fixes[​](#bug-fixes-68 "Direct link to Bug Fixes") * **core:** allow `CacheAdapter.get` to return `Promise` ([#5200](https://github.com/mikro-orm/mikro-orm/issues/5200)) ([98ce1e5](https://github.com/mikro-orm/mikro-orm/commit/98ce1e5509e5f97f1ab7568593ee973b1ed49eb5)), closes [#5199](https://github.com/mikro-orm/mikro-orm/issues/5199) * **core:** fix broken inference of `AutoPath` in TS 5.4 ([#5197](https://github.com/mikro-orm/mikro-orm/issues/5197)) ([8bbc252](https://github.com/mikro-orm/mikro-orm/commit/8bbc252cf1639a7653119bbc84bdf1a04e0410e1)) * **core:** handle possible match between virtual property name and another property's field name ([7fc779f](https://github.com/mikro-orm/mikro-orm/commit/7fc779f9b19271b12d2822ae754e80b309d361a9)), closes [#5191](https://github.com/mikro-orm/mikro-orm/issues/5191) * **core:** make `wrap(e, true).__em` correctly typed to `EntityManager` ([35d607c](https://github.com/mikro-orm/mikro-orm/commit/35d607cba16d551a36085d93f68acb8ec693ee60)) * **core:** process upsert data to allow using entity instances in place of relations ([9305653](https://github.com/mikro-orm/mikro-orm/commit/930565364dbf9aee4a7f79034768ce0f665e731c)), closes [#5165](https://github.com/mikro-orm/mikro-orm/issues/5165) * **core:** respect `upsertMany` options when batching ([d6d1381](https://github.com/mikro-orm/mikro-orm/commit/d6d138179f4f60071ce5efafc7a84e2befdae604)), closes [#5209](https://github.com/mikro-orm/mikro-orm/issues/5209) * **core:** respect hidden properties of composite PKs during serialization ([3d1cba3](https://github.com/mikro-orm/mikro-orm/commit/3d1cba32dfbed2094943091a8b25e186b24d2b1d)), closes [#5203](https://github.com/mikro-orm/mikro-orm/issues/5203) * **postgres:** improve diffing of native postgres enums ([49d6b4d](https://github.com/mikro-orm/mikro-orm/commit/49d6b4d561196c7c1e0c6f94e6cc1ee1966b9178)), closes [#5108](https://github.com/mikro-orm/mikro-orm/issues/5108) * **query-builder:** support `convertToJSValueSQL` on returning statement of update queries ([2e1d6c8](https://github.com/mikro-orm/mikro-orm/commit/2e1d6c80d108b2b736a44fba87592604127ed266)), closes [#5176](https://github.com/mikro-orm/mikro-orm/issues/5176) ### Features[​](#features-38 "Direct link to Features") * **core:** add second EM parameter to `onCreate` and `onUpdate` callback ([a964aeb](https://github.com/mikro-orm/mikro-orm/commit/a964aeb54bd4082f3fcbb8848739223bcdbc1c05)), closes [#5201](https://github.com/mikro-orm/mikro-orm/issues/5201) * **core:** allow declarative partial loading of collection items ([#5210](https://github.com/mikro-orm/mikro-orm/issues/5210)) ([5e4fa60](https://github.com/mikro-orm/mikro-orm/commit/5e4fa6024d803a410fa8cc3bb8ff9fd451e26ea2)), closes [#4963](https://github.com/mikro-orm/mikro-orm/issues/4963) * **core:** allow mapping array columns to arrays of objects via `ArrayType` ([#5204](https://github.com/mikro-orm/mikro-orm/issues/5204)) ([42cc9cc](https://github.com/mikro-orm/mikro-orm/commit/42cc9ccf4639d430d8d1cc60bb5c3385b0e501f2)), closes [#5188](https://github.com/mikro-orm/mikro-orm/issues/5188) * **entity-generator:** allow post processing the metadata ([#5113](https://github.com/mikro-orm/mikro-orm/issues/5113)) ([e82058f](https://github.com/mikro-orm/mikro-orm/commit/e82058f173f7f8404828b5974884b06d83f2b1eb)), closes [#5010](https://github.com/mikro-orm/mikro-orm/issues/5010) * **knex:** add `loggerContext` parameter to `em.execute` ([b6d46df](https://github.com/mikro-orm/mikro-orm/commit/b6d46dfa779462a630e12983454f83bfdd409b58)) ## [6.0.7](https://github.com/mikro-orm/mikro-orm/compare/v6.0.6...v6.0.7) (2024-01-30)[​](#607-2024-01-30 "Direct link to 607-2024-01-30") ### Bug Fixes[​](#bug-fixes-69 "Direct link to Bug Fixes") * **core:** consider `PrimaryKeyProp` as optional properties for `em.create()` ([69522f2](https://github.com/mikro-orm/mikro-orm/commit/69522f2e7bee589cf3363bae9e65f5d1ed498405)), closes [#5187](https://github.com/mikro-orm/mikro-orm/issues/5187) * **core:** do not add `undefined` to `null` types in `EntityDTO` ([d661c68](https://github.com/mikro-orm/mikro-orm/commit/d661c68dd8f529e92fc2275ce72fda0341d4e7bb)), closes [#5186](https://github.com/mikro-orm/mikro-orm/issues/5186) * **core:** fix ignoring function properties when they are optional ([fb33934](https://github.com/mikro-orm/mikro-orm/commit/fb339341661afa3d8fde8f357028f05e64ae846f)) * **reflection:** fix validation of string enums when loading via `QueryBuilder` ([908864c](https://github.com/mikro-orm/mikro-orm/commit/908864c741b3cd42498852f926253b6dbc523530)), closes [#5185](https://github.com/mikro-orm/mikro-orm/issues/5185) ### Features[​](#features-39 "Direct link to Features") * **postgres:** add support for `interval` type ([659a613](https://github.com/mikro-orm/mikro-orm/commit/659a613f802b7c47f94ee2729425c8576b20146a)), closes [#5181](https://github.com/mikro-orm/mikro-orm/issues/5181) ## [6.0.6](https://github.com/mikro-orm/mikro-orm/compare/v6.0.5...v6.0.6) (2024-01-29)[​](#606-2024-01-29 "Direct link to 606-2024-01-29") ### Bug Fixes[​](#bug-fixes-70 "Direct link to Bug Fixes") * **core:** ensure `em.insertMany` returns array of PKs for a single item too ([#5180](https://github.com/mikro-orm/mikro-orm/issues/5180)) ([0d58aaf](https://github.com/mikro-orm/mikro-orm/commit/0d58aaf77400638471f369406485fb3f42349ca6)), closes [#5179](https://github.com/mikro-orm/mikro-orm/issues/5179) * **core:** fix TypeError caused by validation of duplicate field names ([01d8c26](https://github.com/mikro-orm/mikro-orm/commit/01d8c261b9a92e9e0b067e2f38875ac5c419bf86)), closes [#5163](https://github.com/mikro-orm/mikro-orm/issues/5163) * **core:** make PK properties non-nullable in `EntityDTO` ([dc4fc6f](https://github.com/mikro-orm/mikro-orm/commit/dc4fc6f265ca0eb96fe647c16c3018014b91e5dc)) * **core:** respect optionality in `EntityDTO` type ([1691a79](https://github.com/mikro-orm/mikro-orm/commit/1691a799ff762e1ecde15388433cd2544e42fc5e)) * **core:** validate missing populate hint for cursor based pagination on relation properties ([ea48db0](https://github.com/mikro-orm/mikro-orm/commit/ea48db0c258080e6e98242a684122ba436c3cc04)), closes [#5155](https://github.com/mikro-orm/mikro-orm/issues/5155) * **mongo:** ensure `assign` on object properties won't ignore changes ([a360300](https://github.com/mikro-orm/mikro-orm/commit/a360300d64b7de1bb31b281949f64180f412ac66)), closes [#5158](https://github.com/mikro-orm/mikro-orm/issues/5158) * **query-builder:** only map the first result with `qb.getSingleResult()` ([0e56fe1](https://github.com/mikro-orm/mikro-orm/commit/0e56fe134775ed800bea99752a98ecd615c9d4a6)), closes [#5182](https://github.com/mikro-orm/mikro-orm/issues/5182) ## [6.0.5](https://github.com/mikro-orm/mikro-orm/compare/v6.0.4...v6.0.5) (2024-01-18)[​](#605-2024-01-18 "Direct link to 605-2024-01-18") ### Bug Fixes[​](#bug-fixes-71 "Direct link to Bug Fixes") * **cli:** try to respect windows ESM binary ([57e91e2](https://github.com/mikro-orm/mikro-orm/commit/57e91e2d9a2ac6fbe51e503e9208fc300e6b0d13)), closes [#5147](https://github.com/mikro-orm/mikro-orm/issues/5147) * **core:** do not infer `populate: ['*']` from `fields: ['*']` ([f658376](https://github.com/mikro-orm/mikro-orm/commit/f658376c81ad4636efbe21ee03df58bf5bf7d471)), closes [#5139](https://github.com/mikro-orm/mikro-orm/issues/5139) * **core:** do not mutate data provided to `em.upsert/Many` ([3d8c242](https://github.com/mikro-orm/mikro-orm/commit/3d8c242f6576c234c9d6b1eabbebe510039e3099)), closes [#5136](https://github.com/mikro-orm/mikro-orm/issues/5136) * **core:** don't convert mapped types for constructor parameters when creating new entity ([37befd3](https://github.com/mikro-orm/mikro-orm/commit/37befd30e7125a4248600b0324109664729ef75f)), closes [#5150](https://github.com/mikro-orm/mikro-orm/issues/5150) * **core:** fix bigint mode detection when hydrating new entity from returning statement ([a42321d](https://github.com/mikro-orm/mikro-orm/commit/a42321d422b6a2f86e6e6e319627dba13f2d7461)), closes [#5146](https://github.com/mikro-orm/mikro-orm/issues/5146) * **core:** merge serialization hints when lazy populating ([f1d2487](https://github.com/mikro-orm/mikro-orm/commit/f1d2487c690da948cedd77bcfd0e82048b8592b4)), closes [#5138](https://github.com/mikro-orm/mikro-orm/issues/5138) * **query-builder:** cache knex QB instance to get around issues with raw fragments ([f6e76d8](https://github.com/mikro-orm/mikro-orm/commit/f6e76d858e1b4869a8f9a93a518df4837d294df1)) * **reflection:** improve detection of `Ref` types with FK as PK ([c8858d2](https://github.com/mikro-orm/mikro-orm/commit/c8858d225f514957fc13591bb8806dbba2227e45)), closes [#5144](https://github.com/mikro-orm/mikro-orm/issues/5144) ## [6.0.4](https://github.com/mikro-orm/mikro-orm/compare/v6.0.3...v6.0.4) (2024-01-15)[​](#604-2024-01-15 "Direct link to 604-2024-01-15") ### Bug Fixes[​](#bug-fixes-72 "Direct link to Bug Fixes") * **core:** respect reloaded properties of partially loaded entity during serialization ([f7b6497](https://github.com/mikro-orm/mikro-orm/commit/f7b649738a484cbe87c908ca42ec1fa53d963de5)), closes [#5128](https://github.com/mikro-orm/mikro-orm/issues/5128) ### Features[​](#features-40 "Direct link to Features") * **core:** allow reusing single `raw` fragment in multiple keys ([fc967e2](https://github.com/mikro-orm/mikro-orm/commit/fc967e23f40c5201125ad3ab43be6bece4573862)), closes [#5129](https://github.com/mikro-orm/mikro-orm/issues/5129) ## [6.0.3](https://github.com/mikro-orm/mikro-orm/compare/v6.0.2...v6.0.3) (2024-01-13)[​](#603-2024-01-13 "Direct link to 603-2024-01-13") ### Bug Fixes[​](#bug-fixes-73 "Direct link to Bug Fixes") * **core:** allow raw fragments as keys with multiple conditions ([d0d5de8](https://github.com/mikro-orm/mikro-orm/commit/d0d5de8cc0b0f290a75dbd5962953b8e4065d02e)), closes [#5112](https://github.com/mikro-orm/mikro-orm/issues/5112) * **core:** fix leaking raw fragments cache ([9638410](https://github.com/mikro-orm/mikro-orm/commit/9638410583fb660de807dd1e18777d26bec9bfd6)) * **core:** respect raw fragments in `orderBy` and `populateOrderBy` ([7bf986c](https://github.com/mikro-orm/mikro-orm/commit/7bf986cebba090207f7d42f1c1d66fed919e7c77)), closes [#5110](https://github.com/mikro-orm/mikro-orm/issues/5110) * **core:** support raw fragments in order by with pagination ([67ee6f5](https://github.com/mikro-orm/mikro-orm/commit/67ee6f59d5f26d283080a686a001ab6dfa8ea515)), closes [#5110](https://github.com/mikro-orm/mikro-orm/issues/5110) ### Features[​](#features-41 "Direct link to Features") * **core:** do not map array types as `Loaded` when partially loaded ([75d035d](https://github.com/mikro-orm/mikro-orm/commit/75d035dbb56dfe4aec78db39a7dfbc99e1d372a2)), closes [#5123](https://github.com/mikro-orm/mikro-orm/issues/5123) * **core:** export `AutoPath` and `UnboxArray` types ([000c50c](https://github.com/mikro-orm/mikro-orm/commit/000c50c2dd1e6c8d74ee4994633c65192f420105)), closes [#5124](https://github.com/mikro-orm/mikro-orm/issues/5124) * **core:** map double and decimal properties to `number` or `string` based on the runtime type ([312f293](https://github.com/mikro-orm/mikro-orm/commit/312f293cb9a23115da440c64e0a8ff7e21ae13c2)), closes [#5120](https://github.com/mikro-orm/mikro-orm/issues/5120) * **core:** provide mapped custom types into constructor with `forceEntityConstructor` ([b293789](https://github.com/mikro-orm/mikro-orm/commit/b293789441ee179dcfac4016774bfd2ccb6f830b)), closes [#5118](https://github.com/mikro-orm/mikro-orm/issues/5118) ## [6.0.2](https://github.com/mikro-orm/mikro-orm/compare/v6.0.1...v6.0.2) (2024-01-09)[​](#602-2024-01-09 "Direct link to 602-2024-01-09") ### Bug Fixes[​](#bug-fixes-74 "Direct link to Bug Fixes") * **core:** allow calling `em.remove` with not managed entity ([88e055e](https://github.com/mikro-orm/mikro-orm/commit/88e055e09b2b2c9ef0abe192dbec7f175fe9fd4e)), closes [#5103](https://github.com/mikro-orm/mikro-orm/issues/5103) * **core:** respect `logging` options in `em.count` ([3b94bf9](https://github.com/mikro-orm/mikro-orm/commit/3b94bf957243e8ded787c853915c84cfc94832d7)), closes [#5085](https://github.com/mikro-orm/mikro-orm/issues/5085) * **core:** respect `logging` options in `em.count` ([481d02e](https://github.com/mikro-orm/mikro-orm/commit/481d02ed393a582856404be6cdf86ae028b5ba34)), closes [#5085](https://github.com/mikro-orm/mikro-orm/issues/5085) * **core:** support `$some/$none/$every` on nested relations ([2b3bd4d](https://github.com/mikro-orm/mikro-orm/commit/2b3bd4d15c9daac2cb2ba058bca3e74be8ca9cbc)), closes [#5099](https://github.com/mikro-orm/mikro-orm/issues/5099) * **reflection:** fix processing of `Opt` and `Hidden` types when used in intersection ([2bd612e](https://github.com/mikro-orm/mikro-orm/commit/2bd612ec70d73bf7f5e6e5d70e2c7259e8d9c90b)) ### Features[​](#features-42 "Direct link to Features") * **core:** add `wrap(entity).isManaged()` ([5931649](https://github.com/mikro-orm/mikro-orm/commit/59316495304199b93685324d0077b22fec502fb6)), closes [#5082](https://github.com/mikro-orm/mikro-orm/issues/5082) * **entity-generator:** allow customizing entity name based on schema name ([1e5afb8](https://github.com/mikro-orm/mikro-orm/commit/1e5afb8acbb7a8f06da1245d419074272d685f0f)), closes [#5084](https://github.com/mikro-orm/mikro-orm/issues/5084) ## [6.0.1](https://github.com/mikro-orm/mikro-orm/compare/v6.0.0...v6.0.1) (2024-01-08)[​](#601-2024-01-08 "Direct link to 601-2024-01-08") **Note:** Version bump only for package @mikro-orm/root ## [6.0.0](https://github.com/mikro-orm/mikro-orm/compare/v5.9.7...v6.0.0) (2024-01-08)[​](#600-2024-01-08 "Direct link to 600-2024-01-08") ### Bug Fixes[​](#bug-fixes-75 "Direct link to Bug Fixes") * **core:** allow using classes with private constructor with `EntitySchema` ([d4d5b5e](https://github.com/mikro-orm/mikro-orm/commit/d4d5b5e9ca58d8c8b9be1acfc76c40d79e55622c)) * **core:** collection.loadItems() should respect wildcard populate ([7f3065f](https://github.com/mikro-orm/mikro-orm/commit/7f3065ff0b20cf3280f201119d3c9cdd632953ef)), closes [#4977](https://github.com/mikro-orm/mikro-orm/issues/4977) * **core:** do not load all env vars from `.env` files automatically ([09e60f7](https://github.com/mikro-orm/mikro-orm/commit/09e60f7e1ccce96c98edcbef32ea005e2b957564)) * **core:** ensure correct serialization of not fully populated collections ([a39a850](https://github.com/mikro-orm/mikro-orm/commit/a39a850ee6b7d9173dadb654a1718d374783f38c)) * **core:** ensure propagation and change-tracking works with `useDefineForClassFields` ([#4730](https://github.com/mikro-orm/mikro-orm/issues/4730)) ([83f24aa](https://github.com/mikro-orm/mikro-orm/commit/83f24aa3fc065fdfa50ae3df6af5ea14516018e1)), closes [#4216](https://github.com/mikro-orm/mikro-orm/issues/4216) * **core:** fix automatic calling of `ensureDatabase` on `init` ([827b1f1](https://github.com/mikro-orm/mikro-orm/commit/827b1f1e5fb25b8b29a75a5877c23806bf6dbc33)) * **core:** fix hydration of complex FKs with joined strategy ([a4f30ac](https://github.com/mikro-orm/mikro-orm/commit/a4f30ac14d75c73d78eac6039dc544083d1eddee)) * **core:** fix hydration of object embeddables via joined strategy ([b3e3e55](https://github.com/mikro-orm/mikro-orm/commit/b3e3e555758ab250f6d1ba478b596f9eb5cbb6bd)), closes [#5020](https://github.com/mikro-orm/mikro-orm/issues/5020) * **core:** ignore SQL converter on object embeddables with custom types ([83b989e](https://github.com/mikro-orm/mikro-orm/commit/83b989ebdb2adc27c2f42f717f5d95abd01c109c)), closes [#5074](https://github.com/mikro-orm/mikro-orm/issues/5074) * **core:** improve `EntitySchema` typing for `repository` option ([37ee42e](https://github.com/mikro-orm/mikro-orm/commit/37ee42e1db019cfaae3f7ff743377c7596b594f9)), closes [#5006](https://github.com/mikro-orm/mikro-orm/issues/5006) * **core:** make `em.create` strictly typed for relations too ([#4752](https://github.com/mikro-orm/mikro-orm/issues/4752)) ([3535cc0](https://github.com/mikro-orm/mikro-orm/commit/3535cc05fc87bb46bfac46b91465587f08328153)), closes [#4748](https://github.com/mikro-orm/mikro-orm/issues/4748) * **core:** make `Loaded` type more flexible ([c95e3b6](https://github.com/mikro-orm/mikro-orm/commit/c95e3b635f70bfecbef31ec1a416c5f7014f3ade)), closes [#3277](https://github.com/mikro-orm/mikro-orm/issues/3277) * **core:** mark `Reference.set()` as private ([#5017](https://github.com/mikro-orm/mikro-orm/issues/5017)) ([5aebf0b](https://github.com/mikro-orm/mikro-orm/commit/5aebf0bddfdef41edbce737286faa52dd7783cd1)), closes [#5003](https://github.com/mikro-orm/mikro-orm/issues/5003) * **core:** refactor mapping of `Date` properties ([#4391](https://github.com/mikro-orm/mikro-orm/issues/4391)) ([3a80369](https://github.com/mikro-orm/mikro-orm/commit/3a8036928ce36d31a2005b7e5133cf825b84a1b5)), closes [#4362](https://github.com/mikro-orm/mikro-orm/issues/4362) [#4360](https://github.com/mikro-orm/mikro-orm/issues/4360) [#1476](https://github.com/mikro-orm/mikro-orm/issues/1476) * **core:** respect `@Index` and `@Unique` decorators on embeddables ([#4736](https://github.com/mikro-orm/mikro-orm/issues/4736)) ([c3d7717](https://github.com/mikro-orm/mikro-orm/commit/c3d77178f50d0b162baa95cf3dedb9065666e582)) * **core:** respect global `schema` option in first level cache ([1833455](https://github.com/mikro-orm/mikro-orm/commit/18334552e69d39d5e344bbf62a95888c24ff7349)) * **core:** respect schema option for entity instances in `em.insert/Many` ([7eae031](https://github.com/mikro-orm/mikro-orm/commit/7eae031a6b31eb29f38afb0d3359fec5116685c7)), closes [#4424](https://github.com/mikro-orm/mikro-orm/issues/4424) * **core:** return managed entity from `em.refresh()` ([0bf5363](https://github.com/mikro-orm/mikro-orm/commit/0bf5363ef8fff4b3b965d744d18d51af55eb45cf)) * **core:** return managed entity from `em.refresh()` ([55815f4](https://github.com/mikro-orm/mikro-orm/commit/55815f4511750dbac4da8358bff115a54221425a)) * **core:** rework `Collection` initialization to use `em.populate()` ([#4571](https://github.com/mikro-orm/mikro-orm/issues/4571)) ([7495142](https://github.com/mikro-orm/mikro-orm/commit/749514234752274212203b18189ba72494cd246e)), closes [#4464](https://github.com/mikro-orm/mikro-orm/issues/4464) * **core:** rework pivot table joining ([#4438](https://github.com/mikro-orm/mikro-orm/issues/4438)) ([0506d36](https://github.com/mikro-orm/mikro-orm/commit/0506d36dc1e5bad16aeefee8419717e0054c6764)), closes [#4423](https://github.com/mikro-orm/mikro-orm/issues/4423) * **core:** support embedded properties with conflicting property names ([b43ef63](https://github.com/mikro-orm/mikro-orm/commit/b43ef6334b28cf8a128260886c3453bac8c510ff)), closes [#5065](https://github.com/mikro-orm/mikro-orm/issues/5065) * **core:** use `join on` conditions for `populateWhere` ([#4025](https://github.com/mikro-orm/mikro-orm/issues/4025)) ([a03e57c](https://github.com/mikro-orm/mikro-orm/commit/a03e57c5c70ed08de9626e454e1b8d0d17df574a)), closes [#3871](https://github.com/mikro-orm/mikro-orm/issues/3871) * **entity-generator:** use index expressions for complex indexes (e.g. conditional) ([64a39f8](https://github.com/mikro-orm/mikro-orm/commit/64a39f82c7d391d28e28c639512a810c516f08a9)), closes [#4911](https://github.com/mikro-orm/mikro-orm/issues/4911) * **knex:** respect connection type in `em.getKnex()` ([46957ba](https://github.com/mikro-orm/mikro-orm/commit/46957ba7a7a89004fe6cd40ebc226911fca9ca89)) * **mongo:** don't rename `id` to `_id` for embeddables and entities without serialized PK ([0cee82d](https://github.com/mikro-orm/mikro-orm/commit/0cee82d1806456443ec5d096a574f856c7d1102e)), closes [#4960](https://github.com/mikro-orm/mikro-orm/issues/4960) * **postgres:** allow postgres array operators on embedded array properties ([ecf1f0c](https://github.com/mikro-orm/mikro-orm/commit/ecf1f0c96484178a4d7fc8228c2a41198d20ec30)), closes [#4930](https://github.com/mikro-orm/mikro-orm/issues/4930) * **postgres:** parse timestamp dates less than year 100 ([e774d40](https://github.com/mikro-orm/mikro-orm/commit/e774d4092eb13d81772701f7d8e35ada55fb4d45)), closes [#5071](https://github.com/mikro-orm/mikro-orm/issues/5071) * respect postgresql no timestamptz precision default ([#3832](https://github.com/mikro-orm/mikro-orm/issues/3832)) ([9fd7e26](https://github.com/mikro-orm/mikro-orm/commit/9fd7e2610912971ae5cccf307fc97dc2a02706fa)) * **sql:** do not alias conditions for update queries with collection operators ([5820d66](https://github.com/mikro-orm/mikro-orm/commit/5820d66cc7a81a357d6397f1e234a5485f2054d5)), closes [#4956](https://github.com/mikro-orm/mikro-orm/issues/4956) * **sql:** do not branch to-many joins for `$and` with a single item ([a737b20](https://github.com/mikro-orm/mikro-orm/commit/a737b207744a85b2034a5e4a2b362e4aaefea570)) * **test:** fixed seed-manager.test.js on windows ([#4924](https://github.com/mikro-orm/mikro-orm/issues/4924)) ([27a4504](https://github.com/mikro-orm/mikro-orm/commit/27a4504e2984393b8c0065b4adab4ebe913fa222)) ### Code Refactoring[​](#code-refactoring "Direct link to Code Refactoring") * remove `JavaScriptMetadataProvider` ([4e337cb](https://github.com/mikro-orm/mikro-orm/commit/4e337cb55f765196c31f93a01bb6380708f63a0b)) * remove `Reference.load(prop: keyof T)` signature ([#5015](https://github.com/mikro-orm/mikro-orm/issues/5015)) ([32b48f7](https://github.com/mikro-orm/mikro-orm/commit/32b48f7ea959880bd6b61720c83515f2bfcb8822)) ### Features[​](#features-43 "Direct link to Features") * **core:** add `@EnsureRequestContext` decorator + rename `@UseRequestContext` ([5e088ae](https://github.com/mikro-orm/mikro-orm/commit/5e088ae837f4c91ae5c5a27964b7ee94db82fc48)), closes [#4009](https://github.com/mikro-orm/mikro-orm/issues/4009) * **core:** add `Collection.load()` method ([8aa1ad1](https://github.com/mikro-orm/mikro-orm/commit/8aa1ad1fef91869b43ec17cc36bbe627d6bb9b7a)) * **core:** add `EagerProps` symbol to respect eager props on type level ([dfcf1f8](https://github.com/mikro-orm/mikro-orm/commit/dfcf1f88be79f855a45e5d5545118d6e541dc1a3)) * **core:** add `em.findAll()` with optional `where` option ([#4946](https://github.com/mikro-orm/mikro-orm/issues/4946)) ([23b0551](https://github.com/mikro-orm/mikro-orm/commit/23b05510b833c970e3af3930dcb82fe74f61a798)), closes [#3982](https://github.com/mikro-orm/mikro-orm/issues/3982) * **core:** add `FindOptions.exclude` ([#5024](https://github.com/mikro-orm/mikro-orm/issues/5024)) ([fe239cf](https://github.com/mikro-orm/mikro-orm/commit/fe239cf1c273af0e0128b38b7bd6d47064081194)) * **core:** add `GeneratedCacheAdapter` for production usage ([#4167](https://github.com/mikro-orm/mikro-orm/issues/4167)) ([bd478af](https://github.com/mikro-orm/mikro-orm/commit/bd478affd81f61f9aab8b94752d897ef871e1f0a)), closes [#4164](https://github.com/mikro-orm/mikro-orm/issues/4164) * **core:** add `Hidden`type as an alternative to `HiddenProps` symbol ([#5009](https://github.com/mikro-orm/mikro-orm/issues/5009)) ([c047bb1](https://github.com/mikro-orm/mikro-orm/commit/c047bb1e702a1a59fb6bf5efff26cbb41c2b6cdc)) * **core:** add `HiddenProps` symbol as type-level companion for `hidden: true` ([7984769](https://github.com/mikro-orm/mikro-orm/commit/79847697d8a93ca5ea967d34ace81719e621ae4e)), closes [#4093](https://github.com/mikro-orm/mikro-orm/issues/4093) * **core:** add `MikroORM.initSync()` helper ([#4166](https://github.com/mikro-orm/mikro-orm/issues/4166)) ([8b1a1fa](https://github.com/mikro-orm/mikro-orm/commit/8b1a1fa324db9227f5caae35fb2d8ab6a2b76e8a)), closes [#4164](https://github.com/mikro-orm/mikro-orm/issues/4164) * **core:** add `Opt` type as an alternative to `OptionalProps` symbol ([#4753](https://github.com/mikro-orm/mikro-orm/issues/4753)) ([8853904](https://github.com/mikro-orm/mikro-orm/commit/8853904e8f09a96cb0b66fdb4f4f658a60a1c8ba)) * **core:** add `orm.checkConnection()` helper ([#4961](https://github.com/mikro-orm/mikro-orm/issues/4961)) ([b868f02](https://github.com/mikro-orm/mikro-orm/commit/b868f02870c116315513188d4bf24bee5c362d24)), closes [#4959](https://github.com/mikro-orm/mikro-orm/issues/4959) * **core:** add `ScalarRef` and `EntityRef` types to allow explicit control ([1ef7856](https://github.com/mikro-orm/mikro-orm/commit/1ef7856a1cdf8d327765fc86e450b06c9ddd97c9)), closes [#4907](https://github.com/mikro-orm/mikro-orm/issues/4907) * **core:** add `sql.now()`, `sql.lower()` and `sql.upper()` functions ([#5044](https://github.com/mikro-orm/mikro-orm/issues/5044)) ([016fe63](https://github.com/mikro-orm/mikro-orm/commit/016fe63e0e0db448a31da00c4690fc5c5ae59069)) * **core:** add `sql.ref()` helper ([#4402](https://github.com/mikro-orm/mikro-orm/issues/4402)) ([b695811](https://github.com/mikro-orm/mikro-orm/commit/b6958115a52c500c2b61b6a91b8ef3a9abb2a8e9)) * **core:** add cursor-based pagination via `em.findByCursor()` ([#3975](https://github.com/mikro-orm/mikro-orm/issues/3975)) ([1e6825f](https://github.com/mikro-orm/mikro-orm/commit/1e6825f2ff5a7d505b73225b1696b44629a7eebb)) * **core:** add customizable `LoggerContext` with labeling support ([#4233](https://github.com/mikro-orm/mikro-orm/issues/4233)) ([b985646](https://github.com/mikro-orm/mikro-orm/commit/b985646d77590c7b36757381aff5da5256b5bc12)), closes [#4230](https://github.com/mikro-orm/mikro-orm/issues/4230) * **core:** add discovery hooks `onMetadata` and `afterDiscovered` ([#4799](https://github.com/mikro-orm/mikro-orm/issues/4799)) ([5f6c4f8](https://github.com/mikro-orm/mikro-orm/commit/5f6c4f8b5af2586e0d01af7014e6f1f614fd8b02)) * **core:** add entity to identity map on `em.persist()` ([1b09d26](https://github.com/mikro-orm/mikro-orm/commit/1b09d263f94f4c216936f6f85673810f7c6f9099)), closes [#4905](https://github.com/mikro-orm/mikro-orm/issues/4905) * **core:** add global `serialization.forceObject` option ([731087d](https://github.com/mikro-orm/mikro-orm/commit/731087def690418b39089a1e08d982d16004ed94)), closes [#4881](https://github.com/mikro-orm/mikro-orm/issues/4881) * **core:** add optional `Type.compareValues` method to allow custom comparators ([732307a](https://github.com/mikro-orm/mikro-orm/commit/732307a1ec9a6ab7309ba43c7f835c067079c7cd)), closes [#4870](https://github.com/mikro-orm/mikro-orm/issues/4870) * **core:** add support for indexes on JSON properties ([#4735](https://github.com/mikro-orm/mikro-orm/issues/4735)) ([82c8629](https://github.com/mikro-orm/mikro-orm/commit/82c8629d5e96a8552890cd17eb485ca3020156dc)), closes [#1230](https://github.com/mikro-orm/mikro-orm/issues/1230) * **core:** allow all `CountOptions` in `Collection.loadCount()` ([25d1851](https://github.com/mikro-orm/mikro-orm/commit/25d18512d44ca1d57514d6df235db650045253a7)) * **core:** allow auto-discovery of base classes with `EntitySchema` ([10cfd28](https://github.com/mikro-orm/mikro-orm/commit/10cfd28785b01cebdbf80686debec8567ee1ba30)) * **core:** allow class references in `subscribers` array ([7c8f776](https://github.com/mikro-orm/mikro-orm/commit/7c8f776c70450319d8d3e47902cf7ce67fc046d6)), closes [#4231](https://github.com/mikro-orm/mikro-orm/issues/4231) * **core:** allow configuring filters in `Reference.load()` and `Collection.load()` ([#5025](https://github.com/mikro-orm/mikro-orm/issues/5025)) ([06012f7](https://github.com/mikro-orm/mikro-orm/commit/06012f79f06d1f7378da1c5083d17c20ebf0839a)), closes [#4975](https://github.com/mikro-orm/mikro-orm/issues/4975) * **core:** allow defining `serialization.forceObject: true` on type level ([#5045](https://github.com/mikro-orm/mikro-orm/issues/5045)) ([88eb3e5](https://github.com/mikro-orm/mikro-orm/commit/88eb3e5a24284b523437de55e7f019689cf65c3d)) * **core:** allow disabling colors via `colors` ORM config option ([1bcaf09](https://github.com/mikro-orm/mikro-orm/commit/1bcaf0954292e952bf5413466bb33b8ac1595cdd)), closes [#5037](https://github.com/mikro-orm/mikro-orm/issues/5037) * **core:** allow extending `EntityManager` ([#5064](https://github.com/mikro-orm/mikro-orm/issues/5064)) ([6c363e7](https://github.com/mikro-orm/mikro-orm/commit/6c363e7666ddf713ae601d1c9325c5b7f4523fbe)) * **core:** allow inferring populate hint from filter via `populate: ['$infer']` ([#4939](https://github.com/mikro-orm/mikro-orm/issues/4939)) ([080fdbb](https://github.com/mikro-orm/mikro-orm/commit/080fdbb7cde3a1c5d158330eeef0b6b855712c9d)), closes [#1309](https://github.com/mikro-orm/mikro-orm/issues/1309) * **core:** allow M:1 and 1:1 relations in virtual entities ([#4932](https://github.com/mikro-orm/mikro-orm/issues/4932)) ([164a69e](https://github.com/mikro-orm/mikro-orm/commit/164a69eaa13a66805423071f7ccd4ddbe8a15c59)) * **core:** allow mapping database defaults from inline embeddables ([#4384](https://github.com/mikro-orm/mikro-orm/issues/4384)) ([22ad61e](https://github.com/mikro-orm/mikro-orm/commit/22ad61e5b6487947c60334739db3e197a9934417)), closes [#3887](https://github.com/mikro-orm/mikro-orm/issues/3887) * **core:** allow overriding global logging options on per-query basis ([#4273](https://github.com/mikro-orm/mikro-orm/issues/4273)) ([51b6250](https://github.com/mikro-orm/mikro-orm/commit/51b62507e2bbed5f9fbc07c02451aadb49d5cd88)), closes [#4223](https://github.com/mikro-orm/mikro-orm/issues/4223) * **core:** allow overriding ORM config path via `--config` ([#3924](https://github.com/mikro-orm/mikro-orm/issues/3924)) ([2c929e0](https://github.com/mikro-orm/mikro-orm/commit/2c929e06ffab996fa23664a19c7429305868b5c1)) * **core:** allow passing string values for `PopulateHint` enum (`populateWhere`) ([2bd21eb](https://github.com/mikro-orm/mikro-orm/commit/2bd21ebc431ba7ff0e9cf0d488ff5455aa707203)) * **core:** allow populating collections with references ([#4776](https://github.com/mikro-orm/mikro-orm/issues/4776)) ([3da6c39](https://github.com/mikro-orm/mikro-orm/commit/3da6c39aeef295aa63eed7ce52630c9c5840e158)), closes [#1158](https://github.com/mikro-orm/mikro-orm/issues/1158) * **core:** allow setting logger context on EM level ([#5023](https://github.com/mikro-orm/mikro-orm/issues/5023)) ([7e56104](https://github.com/mikro-orm/mikro-orm/commit/7e5610400ba30623f31c56ffd480de1bbe37b9c6)), closes [#5022](https://github.com/mikro-orm/mikro-orm/issues/5022) * **core:** allow type-safe populate all via `populate: ['*']` ([#4927](https://github.com/mikro-orm/mikro-orm/issues/4927)) ([7780f34](https://github.com/mikro-orm/mikro-orm/commit/7780f34fae2a34b38f9e291b302b1e38ece447a6)), closes [#4920](https://github.com/mikro-orm/mikro-orm/issues/4920) * **core:** allow using `Ref` wrapper on scalar properties ([#4358](https://github.com/mikro-orm/mikro-orm/issues/4358)) ([f9c30f1](https://github.com/mikro-orm/mikro-orm/commit/f9c30f1f6ea5788f72cc50b37411de6ea31068e5)) * **core:** allow using dataloader for references and collections ([#4321](https://github.com/mikro-orm/mikro-orm/issues/4321)) ([8f4790f](https://github.com/mikro-orm/mikro-orm/commit/8f4790f01b0704cb18d31ff89686ec2eb80b6537)), closes [#266](https://github.com/mikro-orm/mikro-orm/issues/266) * **core:** allow using string values for `loadStrategy` and `flushMode` ([f4e4e3b](https://github.com/mikro-orm/mikro-orm/commit/f4e4e3b8fd9e7e13796a000008d88eab789605de)) * **core:** auto-join M:1 and 1:1 relations with filters ([#5063](https://github.com/mikro-orm/mikro-orm/issues/5063)) ([66a6b75](https://github.com/mikro-orm/mikro-orm/commit/66a6b75632d6df46445898233e2dd28067497e98)), closes [#4975](https://github.com/mikro-orm/mikro-orm/issues/4975) * **core:** improve validation of bidirectional 1:1 relations ([7eb6ee6](https://github.com/mikro-orm/mikro-orm/commit/7eb6ee62095b1a985db57786aef9e81744cef50f)) * **core:** infer property type from default value ([#4150](https://github.com/mikro-orm/mikro-orm/issues/4150)) ([38be986](https://github.com/mikro-orm/mikro-orm/commit/38be986876df7e4fec5d93a8028e8ff48222e4c0)), closes [#4060](https://github.com/mikro-orm/mikro-orm/issues/4060) * **core:** make `em.insert/Many` strictly typed (require all properties) ([01935e6](https://github.com/mikro-orm/mikro-orm/commit/01935e6ffad670d36e9905efe11e2f0eeff52beb)) * **core:** native `BigInt` support ([#4719](https://github.com/mikro-orm/mikro-orm/issues/4719)) ([31a905c](https://github.com/mikro-orm/mikro-orm/commit/31a905cf84e9abfd823cfb160276a96467a6ea7f)) * **core:** re-export the core package from all drivers ([#3816](https://github.com/mikro-orm/mikro-orm/issues/3816)) ([175c059](https://github.com/mikro-orm/mikro-orm/commit/175c05912d3f53eac0788ecd32002cb9a30e7cfa)) * **core:** remove static require calls ([#3814](https://github.com/mikro-orm/mikro-orm/issues/3814)) ([b58f476](https://github.com/mikro-orm/mikro-orm/commit/b58f4763995738cad11d08665b239443f9fb4499)), closes [#3743](https://github.com/mikro-orm/mikro-orm/issues/3743) * **core:** require `mappedBy` option for 1 :m properties ([716aa76](https://github.com/mikro-orm/mikro-orm/commit/716aa76111c07c9a25ddf601c3fe1f3d2edcc81f)) * **core:** require explicitly marked raw queries via `raw()` helper ([#4197](https://github.com/mikro-orm/mikro-orm/issues/4197)) ([9c1b205](https://github.com/mikro-orm/mikro-orm/commit/9c1b205f4cb9fede6330360982f23cf6ef37f346)) * **core:** respect `ignoreFields` on type level in `wrap().toObject()` ([15de7a0](https://github.com/mikro-orm/mikro-orm/commit/15de7a0249d4bdc5485b43815e2c6c0d269a33aa)), closes [#4198](https://github.com/mikro-orm/mikro-orm/issues/4198) * **core:** respect `schema` parameter in `clientUrl` ([#4998](https://github.com/mikro-orm/mikro-orm/issues/4998)) ([9176ee0](https://github.com/mikro-orm/mikro-orm/commit/9176ee080fc4051c4b149a8c8ba2b83ed1794446)), closes [#4997](https://github.com/mikro-orm/mikro-orm/issues/4997) * **core:** respect naming strategy and explicit field names on embedded properties ([#4866](https://github.com/mikro-orm/mikro-orm/issues/4866)) ([6151f3b](https://github.com/mikro-orm/mikro-orm/commit/6151f3b96ce478de81d697c658bcccf89cfee669)), closes [#4371](https://github.com/mikro-orm/mikro-orm/issues/4371) [#2165](https://github.com/mikro-orm/mikro-orm/issues/2165) [#2361](https://github.com/mikro-orm/mikro-orm/issues/2361) * **core:** respect updates to M :N inverse sides and batch them ([#4798](https://github.com/mikro-orm/mikro-orm/issues/4798)) ([ec65001](https://github.com/mikro-orm/mikro-orm/commit/ec650013f3486a89a12c105ea49a8fc28b1f8072)), closes [#4564](https://github.com/mikro-orm/mikro-orm/issues/4564) * **core:** return `Loaded` type from `Ref.load()` ([bc3ffa9](https://github.com/mikro-orm/mikro-orm/commit/bc3ffa9b650366bac2a00b50ab6f7657fbe01505)), closes [#3755](https://github.com/mikro-orm/mikro-orm/issues/3755) * **core:** return single entity from `em.populate()` when called on single entity ([4c4ec23](https://github.com/mikro-orm/mikro-orm/commit/4c4ec2312ea9d6930b342c3707c54d6fa7c26ab7)) * **core:** rework serialization rules to always respect populate hint ([#4203](https://github.com/mikro-orm/mikro-orm/issues/4203)) ([32d7c5f](https://github.com/mikro-orm/mikro-orm/commit/32d7c5f79fc7c8796e5ad24d3f89484a0a5d537a)), closes [#4138](https://github.com/mikro-orm/mikro-orm/issues/4138) [#4199](https://github.com/mikro-orm/mikro-orm/issues/4199) * **core:** strict partial loading ([#4092](https://github.com/mikro-orm/mikro-orm/issues/4092)) ([d5d8c2d](https://github.com/mikro-orm/mikro-orm/commit/d5d8c2d487f7f676b1a237042c57aa323e29fbab)), closes [#3443](https://github.com/mikro-orm/mikro-orm/issues/3443) * **core:** support atomic updates via `raw()` helper ([#4094](https://github.com/mikro-orm/mikro-orm/issues/4094)) ([1cd0d1e](https://github.com/mikro-orm/mikro-orm/commit/1cd0d1ed7fe4b434402230f0af5f1c176e44086c)), closes [#3657](https://github.com/mikro-orm/mikro-orm/issues/3657) * **core:** support mapping one column to different STI properties ([#4769](https://github.com/mikro-orm/mikro-orm/issues/4769)) ([e8d391b](https://github.com/mikro-orm/mikro-orm/commit/e8d391bb6814de6b2fb94d504e249a1ed2f5a40e)), closes [#2388](https://github.com/mikro-orm/mikro-orm/issues/2388) [#4440](https://github.com/mikro-orm/mikro-orm/issues/4440) * **core:** throw when trying to iterate on a not initialized collection ([2a3fd27](https://github.com/mikro-orm/mikro-orm/commit/2a3fd273980e9948458e2ac7e7dc7f6fd5bfda76)), closes [#3750](https://github.com/mikro-orm/mikro-orm/issues/3750) * **core:** validate abstract target in relation decorators ([dddb901](https://github.com/mikro-orm/mikro-orm/commit/dddb9015d8dee5a56e680b3fcd75c0a3ec1c298e)) * **core:** validate duplicate field names ([#4968](https://github.com/mikro-orm/mikro-orm/issues/4968)) ([71fead4](https://github.com/mikro-orm/mikro-orm/commit/71fead4577d89e4ef39e9b1d17c8069c0b33ce6c)), closes [#4359](https://github.com/mikro-orm/mikro-orm/issues/4359) * **core:** validate missing relation decorator ([af31b3b](https://github.com/mikro-orm/mikro-orm/commit/af31b3b9c52c4c3e9c404d17f174863218ff5ce0)), closes [#3807](https://github.com/mikro-orm/mikro-orm/issues/3807) * **entity-generator:** added ability to output type option in decorator ([#4935](https://github.com/mikro-orm/mikro-orm/issues/4935)) ([2d1936a](https://github.com/mikro-orm/mikro-orm/commit/2d1936a80f948e0fd83b8fc89bb48feb132537d6)) * **entity-generator:** allow generating scalar properties for FKs ([#4892](https://github.com/mikro-orm/mikro-orm/issues/4892)) ([abad6ca](https://github.com/mikro-orm/mikro-orm/commit/abad6ca9dcafaaf9319261b4ac116ef5ad6485b3)), closes [#4898](https://github.com/mikro-orm/mikro-orm/issues/4898) * **entity-generator:** allow local and global configuration of all options ([#4965](https://github.com/mikro-orm/mikro-orm/issues/4965)) ([2876b8a](https://github.com/mikro-orm/mikro-orm/commit/2876b8a74560e60605ff0de2feaba0d29c28d4aa)) * **entity-generator:** allow overriding generated entity file name ([4ebc8e3](https://github.com/mikro-orm/mikro-orm/commit/4ebc8e3665d7c75788b51a6da59575ccff19f612)), closes [#5026](https://github.com/mikro-orm/mikro-orm/issues/5026) * **entity-generator:** detect more ManyToMany relations ([#4974](https://github.com/mikro-orm/mikro-orm/issues/4974)) ([d0e3ac9](https://github.com/mikro-orm/mikro-orm/commit/d0e3ac97d6443c050ce4c9a1a4fab6a20edaf9c0)) * **entity-generator:** generate `OptionalProps` and other symbols for `EntitySchema` ([00f0a34](https://github.com/mikro-orm/mikro-orm/commit/00f0a3465808670a79d47ea345dfd50706f843b7)) * **mysql:** support `order by nulls first/last` ([#5021](https://github.com/mikro-orm/mikro-orm/issues/5021)) ([df75b24](https://github.com/mikro-orm/mikro-orm/commit/df75b2452a72adfc473772c37342c75e7e731d50)), closes [#5004](https://github.com/mikro-orm/mikro-orm/issues/5004) * **postgres:** add support for native enums ([#4296](https://github.com/mikro-orm/mikro-orm/issues/4296)) ([8515380](https://github.com/mikro-orm/mikro-orm/commit/8515380b7d54aabdef89098139d533ae15adc91b)), closes [#2764](https://github.com/mikro-orm/mikro-orm/issues/2764) * **postgres:** add support for weighted tsvectors and a custom regconfig ([#3805](https://github.com/mikro-orm/mikro-orm/issues/3805)) ([a0e2c7f](https://github.com/mikro-orm/mikro-orm/commit/a0e2c7f4063d0774afd608a178b0e1edc220c3d5)), closes [#3317](https://github.com/mikro-orm/mikro-orm/pull/3317) * **query-builder:** add support for lateral sub-query joins ([99f87c4](https://github.com/mikro-orm/mikro-orm/commit/99f87c487d1d23f772562eb7e243b160e6a2cfda)), closes [#624](https://github.com/mikro-orm/mikro-orm/issues/624) * **query-builder:** allow joining sub-queries ([#4747](https://github.com/mikro-orm/mikro-orm/issues/4747)) ([613332c](https://github.com/mikro-orm/mikro-orm/commit/613332c1664648a0f7d90f4e6cb1966a8e510fc9)), closes [#4429](https://github.com/mikro-orm/mikro-orm/issues/4429) [#4549](https://github.com/mikro-orm/mikro-orm/issues/4549) * **query-builder:** respect discriminator column when joining STI relation ([57b7094](https://github.com/mikro-orm/mikro-orm/commit/57b7094b40e5d2ff2d1c2eaa8da36064fe6da1b4)), closes [#4351](https://github.com/mikro-orm/mikro-orm/issues/4351) * **query-builder:** support virtual entities ([27f0c83](https://github.com/mikro-orm/mikro-orm/commit/27f0c83e11ea74513279c05b84c81707a1e7e8c3)), closes [#5069](https://github.com/mikro-orm/mikro-orm/issues/5069) * **schema:** add options to `schema.ensureDatabase()` method to create/clear ([6a12fe1](https://github.com/mikro-orm/mikro-orm/commit/6a12fe18b0713cc8161318764badd6b00271382f)) * **sql:** add native support for generated columns ([#4884](https://github.com/mikro-orm/mikro-orm/issues/4884)) ([a928291](https://github.com/mikro-orm/mikro-orm/commit/a928291335f6867e02ed948afb5c9abd17975dba)) * **sql:** print number of affected rows for insert and update queries ([36336d9](https://github.com/mikro-orm/mikro-orm/commit/36336d9e17a4bf67d8f78fa00feb777fb9ea00f0)) * **sql:** rework joined strategy to support the default `populateWhere: 'all'` ([#4957](https://github.com/mikro-orm/mikro-orm/issues/4957)) ([e5dbc24](https://github.com/mikro-orm/mikro-orm/commit/e5dbc245d0a3eebc5013321345d2d5d7630cc312)) * **sql:** support `$some`, `$none` and `$every` subquery operators ([#4917](https://github.com/mikro-orm/mikro-orm/issues/4917)) ([50d2265](https://github.com/mikro-orm/mikro-orm/commit/50d2265507e5add684317e2722666ac817bae804)), closes [#2916](https://github.com/mikro-orm/mikro-orm/issues/2916) * **sql:** use joined strategy as default for SQL drivers ([#4958](https://github.com/mikro-orm/mikro-orm/issues/4958)) ([90ec766](https://github.com/mikro-orm/mikro-orm/commit/90ec7663d01ea0bd577b15051f7bfb02afc687e2)) * **sql:** use returning statements for reloading version fields on update ([0a3abd7](https://github.com/mikro-orm/mikro-orm/commit/0a3abd7d9142377fc823dfadcccf6b365f3f53a7)) ### Performance Improvements[​](#performance-improvements-15 "Direct link to Performance Improvements") * **core:** cache if entity has event listeners ([cfa8d52](https://github.com/mikro-orm/mikro-orm/commit/cfa8d52fa0c3e783ae7842ef7932cc1f73663942)) * **core:** optimize handling of FK value propagation ([f3d0ec5](https://github.com/mikro-orm/mikro-orm/commit/f3d0ec5b19a0d9b3fb4db051eaa9d5e3ac439c01)) * **core:** speed up detection of constructor/toJSON parameters during discovery ([a1288de](https://github.com/mikro-orm/mikro-orm/commit/a1288deb5e58805c6d0af3604d24f19837d57282)) ### BREAKING CHANGES[​](#breaking-changes "Direct link to BREAKING CHANGES") Please see the [upgrading guide](https://mikro-orm.io/docs/upgrading-v5-to-v6). ## [5.9.7](https://github.com/mikro-orm/mikro-orm/compare/v5.9.5...v5.9.7) (2023-12-30)[​](#597-2023-12-30 "Direct link to 597-2023-12-30") ### Bug Fixes[​](#bug-fixes-76 "Direct link to Bug Fixes") * **core:** check for root entity properties in `em.canPopulate()` when using STI ([b8fcf45](https://github.com/mikro-orm/mikro-orm/commit/b8fcf45932e5021541b4782b39b139bccd09cae6)), closes [#5043](https://github.com/mikro-orm/mikro-orm/issues/5043) * **core:** fix eager loading detection with multiple populate hints for one property ([da1daf5](https://github.com/mikro-orm/mikro-orm/commit/da1daf5c416684fd49c5fd0261732dd6faa77b60)), closes [#5057](https://github.com/mikro-orm/mikro-orm/issues/5057) * **core:** support pivot entities with autoincrement PK ([e250634](https://github.com/mikro-orm/mikro-orm/commit/e250634e1d4bc18b8e0f47cbed17b4d3bef78787)), closes [#4988](https://github.com/mikro-orm/mikro-orm/issues/4988) * **postgres:** respect column length in down migrations ([222e2b8](https://github.com/mikro-orm/mikro-orm/commit/222e2b8a25692535490b8bc8dd700b23f931b474)), closes [#5048](https://github.com/mikro-orm/mikro-orm/issues/5048) ## [5.9.6](https://github.com/mikro-orm/mikro-orm/compare/v5.9.5...v5.9.6) (2023-12-21)[​](#596-2023-12-21 "Direct link to 596-2023-12-21") ### Bug Fixes[​](#bug-fixes-77 "Direct link to Bug Fixes") * **core:** fix `assign` on collections of unloaded entities ([b60e4ee](https://github.com/mikro-orm/mikro-orm/commit/b60e4ee207849425b6faf7c8fa677388e16bb22e)) * **core:** fix extra updates with select-in strategy and composite FKs ([c848f8c](https://github.com/mikro-orm/mikro-orm/commit/c848f8c840cd2c4690e5852e06d36dc5b2393d9b)) ## [5.9.5](https://github.com/mikro-orm/mikro-orm/compare/v5.9.4...v5.9.5) (2023-12-15)[​](#595-2023-12-15 "Direct link to 595-2023-12-15") ### Bug Fixes[​](#bug-fixes-78 "Direct link to Bug Fixes") * **core:** ensure eager loading on deeper levels work with joined strategy ([cc5f476](https://github.com/mikro-orm/mikro-orm/commit/cc5f476ad481097e392b75e3507a17b6b9171432)) * **core:** fix extra updates for composite FKs that share a column ([78772fb](https://github.com/mikro-orm/mikro-orm/commit/78772fb3173822facd8a94c1e9d224130a41d8d9)) * **core:** fix infinite loop with `populate: true` and `refresh: true` ([#5001](https://github.com/mikro-orm/mikro-orm/issues/5001)) ([9f63378](https://github.com/mikro-orm/mikro-orm/commit/9f63378ee7896c04cb5f727e9e6d827f5a9c3117)) * **core:** fix returning statement hydration after `em.upsert` ([a7e9a82](https://github.com/mikro-orm/mikro-orm/commit/a7e9a82710b3b1451dba5d60add87c85393ec74b)), closes [#4945](https://github.com/mikro-orm/mikro-orm/issues/4945) * **core:** respect context in virtual entity expression callback ([84d42a7](https://github.com/mikro-orm/mikro-orm/commit/84d42a73fb26170ffe9fe97ca15bfb7b3897e313)) * **postgres:** allow using array operators (e.g. `@>`) with object arrays ([6a5a1ef](https://github.com/mikro-orm/mikro-orm/commit/6a5a1efe9c7266ffd80c77c956433bc5345fa543)), closes [#4973](https://github.com/mikro-orm/mikro-orm/issues/4973) * **schema:** improve json default diffing for down migrations ([5bc19ba](https://github.com/mikro-orm/mikro-orm/commit/5bc19baf5ee4808c9f20806ebe0946f3fd43f83d)) * **sql:** deduplicate keys in batch update queries ([7de7a48](https://github.com/mikro-orm/mikro-orm/commit/7de7a48b555f5059fb5eb8d29e22c241a7fb61ca)) ## [5.9.4](https://github.com/mikro-orm/mikro-orm/compare/v5.9.3...v5.9.4) (2023-11-17)[​](#594-2023-11-17 "Direct link to 594-2023-11-17") ### Bug Fixes[​](#bug-fixes-79 "Direct link to Bug Fixes") * **cli:** support `mikro-orm-esm` on windows ([c491af9](https://github.com/mikro-orm/mikro-orm/commit/c491af9113eed8d274c2ec1f2a736a4cfbaa81f7)) * **core:** fix auto-refresh detection in `em.find` for inlined embedded properties ([759b7b8](https://github.com/mikro-orm/mikro-orm/commit/759b7b8b5aa95bea8c6b1074ec1f5c2c9ffc5286)), closes [#4904](https://github.com/mikro-orm/mikro-orm/issues/4904) * **core:** support composite PKs in `em.upsertMany()` ([85c38d4](https://github.com/mikro-orm/mikro-orm/commit/85c38d4465bf37b8448522c835ad77ce6300e317)), closes [#4923](https://github.com/mikro-orm/mikro-orm/issues/4923) * **mysql:** improve diffing of defaults for JSON columns ([d92a440](https://github.com/mikro-orm/mikro-orm/commit/d92a44059b3b6dc8eeb107e8bd6fd4644f18383a)), closes [#4926](https://github.com/mikro-orm/mikro-orm/issues/4926) * **schema:** do not inherit schema for FKs if not a wildcard entity ([cc7fed9](https://github.com/mikro-orm/mikro-orm/commit/cc7fed9fcdf62e6ff76f4fa9d2b65192d6ca5f46)), closes [#4918](https://github.com/mikro-orm/mikro-orm/issues/4918) * **schema:** respect explicit schema in FKs to STI entities ([cc19ebb](https://github.com/mikro-orm/mikro-orm/commit/cc19ebb3addf6e68891e78c36b8857280ddae4a5)), closes [#4933](https://github.com/mikro-orm/mikro-orm/issues/4933) * **schema:** respect up migration when detecting column renaming in down migration ([d5af5bd](https://github.com/mikro-orm/mikro-orm/commit/d5af5bdd3a709212edb9aa0127d29d8bd9610f25)), closes [#4919](https://github.com/mikro-orm/mikro-orm/issues/4919) ## [5.9.3](https://github.com/mikro-orm/mikro-orm/compare/v5.9.2...v5.9.3) (2023-11-06)[​](#593-2023-11-06 "Direct link to 593-2023-11-06") ### Bug Fixes[​](#bug-fixes-80 "Direct link to Bug Fixes") * **core:** only check the same entity type when detecting early update/delete ([fef7a1b](https://github.com/mikro-orm/mikro-orm/commit/fef7a1b5f0dc6a013134ae43d7b2de32418ec26c)), closes [#4895](https://github.com/mikro-orm/mikro-orm/issues/4895) * **core:** return `DriverException` from `em.upsertMany()` ([1ebfbdd](https://github.com/mikro-orm/mikro-orm/commit/1ebfbdd3eaec3910c44eb5c6d4ef8d25eae6031b)), closes [#4897](https://github.com/mikro-orm/mikro-orm/issues/4897) * **core:** fix populating relations with cycles via select-in strategy ([d0b35da](https://github.com/mikro-orm/mikro-orm/commit/d0b35da672bb8f367346bbb2f2b15a6ab851485e)), closes [#4899](https://github.com/mikro-orm/mikro-orm/issues/4899) ## [5.9.2](https://github.com/mikro-orm/mikro-orm/compare/v5.9.1...v5.9.2) (2023-11-02)[​](#592-2023-11-02 "Direct link to 592-2023-11-02") ### Bug Fixes[​](#bug-fixes-81 "Direct link to Bug Fixes") * **core:** fix partial loading of embedded properties with joined strategy ([f887e77](https://github.com/mikro-orm/mikro-orm/commit/f887e77686635c9a9d8928c528bbea4bad5254af)) * **core:** ignore limit, offset and order in `em.count` on virtual entity ([03a7b86](https://github.com/mikro-orm/mikro-orm/commit/03a7b86106f0ec600365504ffa6f6707a6dcd1d6)) * **mongo:** fix support for `ignoreUndefinedInQuery` ([cef26c5](https://github.com/mikro-orm/mikro-orm/commit/cef26c5e32ef09fd6be8262ef691f50d4832e0c6)), closes [#4891](https://github.com/mikro-orm/mikro-orm/issues/4891) ## [5.9.1](https://github.com/mikro-orm/mikro-orm/compare/v5.9.0...v5.9.1) (2023-10-31)[​](#591-2023-10-31 "Direct link to 591-2023-10-31") ### Bug Fixes[​](#bug-fixes-82 "Direct link to Bug Fixes") * **core:** propagate to owning side of 1:1 relation even if not initialized ([9b2c9fe](https://github.com/mikro-orm/mikro-orm/commit/9b2c9fe89b67f3f1190dc0cdd7bab9911c2f9efa)), closes [#4879](https://github.com/mikro-orm/mikro-orm/issues/4879) * **postgres:** fix hydrating of serial properties via returning statement ([620309c](https://github.com/mikro-orm/mikro-orm/commit/620309cbf3db0a97280c894c24647cfbe242dd5e)) ## [5.9.0](https://github.com/mikro-orm/mikro-orm/compare/v5.8.10...v5.9.0) (2023-10-24)[​](#590-2023-10-24 "Direct link to 590-2023-10-24") ### Bug Fixes[​](#bug-fixes-83 "Direct link to Bug Fixes") * **core:** apply `convertToJSValueSQL` on composite FKs too ([41425cb](https://github.com/mikro-orm/mikro-orm/commit/41425cbad836a9e81ffa09c5d9ef881a7e7e8b9d)), closes [#4843](https://github.com/mikro-orm/mikro-orm/issues/4843) * **core:** clean up removed entities from relations in identity map ([1e3bb0e](https://github.com/mikro-orm/mikro-orm/commit/1e3bb0e1e7b8e76fa42fa1573d0f5265f83508aa)), closes [#4863](https://github.com/mikro-orm/mikro-orm/issues/4863) * **core:** infer property type from `columnType` for non-inferrable types (e.g. unions with `null`) ([6bc116a](https://github.com/mikro-orm/mikro-orm/commit/6bc116aabdc9ca958238faaa7ac4a44cf3c71c08)), closes [#4833](https://github.com/mikro-orm/mikro-orm/issues/4833) * **core:** remove some computed properties from metadata cache ([eb138ad](https://github.com/mikro-orm/mikro-orm/commit/eb138adb74237f98cf001b4b84e13e7f2636fb61)) * **core:** use write connection for fetching changes after upsert/upsertMany ([#4872](https://github.com/mikro-orm/mikro-orm/issues/4872)) ([6b444ed](https://github.com/mikro-orm/mikro-orm/commit/6b444edef5333265ad4f20154a6151f6f0f3a1b5)), closes [#4868](https://github.com/mikro-orm/mikro-orm/issues/4868) * **query-builder:** do not alias formula expressions used in `qb.groupBy()` ([e27e4b9](https://github.com/mikro-orm/mikro-orm/commit/e27e4b907154933feba985badd4f6a60dee06317)), closes [#2929](https://github.com/mikro-orm/mikro-orm/issues/2929) * **query-builder:** respect `preferReadReplicas` in `QueryBuilder` ([22e140e](https://github.com/mikro-orm/mikro-orm/commit/22e140e986420105c1b5941aae92a7bca1be6fef)), closes [#4847](https://github.com/mikro-orm/mikro-orm/issues/4847) * **serialization:** run custom serializer on getters ([#4860](https://github.com/mikro-orm/mikro-orm/issues/4860)) ([e76836e](https://github.com/mikro-orm/mikro-orm/commit/e76836e75fbb9b9226078496d59e251baaced074)), closes [#4859](https://github.com/mikro-orm/mikro-orm/issues/4859) ### Features[​](#features-44 "Direct link to Features") * **core:** allow ignoring `undefined` values in `em.find` queries ([#4875](https://github.com/mikro-orm/mikro-orm/issues/4875)) ([e163bfb](https://github.com/mikro-orm/mikro-orm/commit/e163bfb43c64ff8fa356c30e1523334e06e5e1aa)), closes [#4873](https://github.com/mikro-orm/mikro-orm/issues/4873) * **core:** create context from async orm instance ([#4812](https://github.com/mikro-orm/mikro-orm/issues/4812)) ([fbf3a4d](https://github.com/mikro-orm/mikro-orm/commit/fbf3a4dca6767e74579620b6aec020ac1cc07c0d)), closes [#4805](https://github.com/mikro-orm/mikro-orm/issues/4805) * **query-builder:** respect `EntityManager` schema ([#4849](https://github.com/mikro-orm/mikro-orm/issues/4849)) ([5bc12a9](https://github.com/mikro-orm/mikro-orm/commit/5bc12a9e53f27f4e5b89b39bae5d5aaa00b12936)) ## [5.8.10](https://github.com/mikro-orm/mikro-orm/compare/v5.8.9...v5.8.10) (2023-10-18)[​](#5810-2023-10-18 "Direct link to 5810-2023-10-18") ### Bug Fixes[​](#bug-fixes-84 "Direct link to Bug Fixes") * **knex:** fix populating M :N from inverse side with joined strategy ([9f82e95](https://github.com/mikro-orm/mikro-orm/commit/9f82e95b3353be2ef476dc3ce129674e863b44b8)) * **reflection:** ensure complete stripping of relative paths with multiple leading slashes ([#4844](https://github.com/mikro-orm/mikro-orm/issues/4844)) ([8a635c7](https://github.com/mikro-orm/mikro-orm/commit/8a635c79d8939251545f02f3e569a0589c64f33a)) ## [5.8.9](https://github.com/mikro-orm/mikro-orm/compare/v5.8.8...v5.8.9) (2023-10-15)[​](#589-2023-10-15 "Direct link to 589-2023-10-15") ### Bug Fixes[​](#bug-fixes-85 "Direct link to Bug Fixes") * **core:** ignore SQL convertor methods on object embeddables ([92e1d6f](https://github.com/mikro-orm/mikro-orm/commit/92e1d6f663cf44a52db21b105ed0ffbca59cdf59)), closes [#4824](https://github.com/mikro-orm/mikro-orm/issues/4824) * **core:** respect database name in `clientUrl` of read replicas ([015d4f4](https://github.com/mikro-orm/mikro-orm/commit/015d4f4b96ca5329f89df4b8666e9781efbba96c)), closes [#4813](https://github.com/mikro-orm/mikro-orm/issues/4813) * **query-builder:** merge raw join results in `qb.execute()` ([#4825](https://github.com/mikro-orm/mikro-orm/issues/4825)) ([5a28e9b](https://github.com/mikro-orm/mikro-orm/commit/5a28e9b4d7fd627e1a1689d16e877740ca2a3d2d)), closes [#4816](https://github.com/mikro-orm/mikro-orm/issues/4816) [#4741](https://github.com/mikro-orm/mikro-orm/issues/4741) * **schema:** skip changes of enum items on enum arrays ([9accdf6](https://github.com/mikro-orm/mikro-orm/commit/9accdf60fbed330a039d013495b5b4f44c181657)), closes [#476](https://github.com/mikro-orm/mikro-orm/issues/476) ## [5.8.8](https://github.com/mikro-orm/mikro-orm/compare/v5.8.7...v5.8.8) (2023-10-11)[​](#588-2023-10-11 "Direct link to 588-2023-10-11") ### Bug Fixes[​](#bug-fixes-86 "Direct link to Bug Fixes") * **core:** do not rehydrate values provided to constructor ([8ff3f65](https://github.com/mikro-orm/mikro-orm/commit/8ff3f65907e37f971edd0cc7542d62b7646ec958)), closes [#4790](https://github.com/mikro-orm/mikro-orm/issues/4790) * **core:** hydrate relations with `mapToPk` as scalars to support custom types ([4118076](https://github.com/mikro-orm/mikro-orm/commit/4118076d985191f8c57f66042e71e835616e4931)), closes [#4803](https://github.com/mikro-orm/mikro-orm/issues/4803) * **postgres:** escape array literal values containing backslash ([#4797](https://github.com/mikro-orm/mikro-orm/issues/4797)) ([20179ec](https://github.com/mikro-orm/mikro-orm/commit/20179ec839def5f8144e56f3a6bc89131f7e72a4)), closes [#4796](https://github.com/mikro-orm/mikro-orm/issues/4796) ### Performance Improvements[​](#performance-improvements-16 "Direct link to Performance Improvements") * **core:** fix duplicate processing of collection items when flushing ([a8a1021](https://github.com/mikro-orm/mikro-orm/commit/a8a1021a423ba0d17a16848f51b54360241eb3d5)), closes [#4807](https://github.com/mikro-orm/mikro-orm/issues/4807) ## [5.8.7](https://github.com/mikro-orm/mikro-orm/compare/v5.8.6...v5.8.7) (2023-10-05)[​](#587-2023-10-05 "Direct link to 587-2023-10-05") ### Bug Fixes[​](#bug-fixes-87 "Direct link to Bug Fixes") * **core:** ensure virtual relation properties have no effect on commit order ([606d633](https://github.com/mikro-orm/mikro-orm/commit/606d63315cde1fc1ae409c816f81882713e515cf)), closes [#4781](https://github.com/mikro-orm/mikro-orm/issues/4781) * **core:** fix conditions in `em.upsertMany` with composite keys ([2f58556](https://github.com/mikro-orm/mikro-orm/commit/2f58556023c3f4777b4bccb2242ad6286dca22c4)), closes [#4786](https://github.com/mikro-orm/mikro-orm/issues/4786) * **core:** fix extra updates when nullable embedded properties contain FK ([77ffa4f](https://github.com/mikro-orm/mikro-orm/commit/77ffa4f46c06425e25761e936679d8f2e455921b)), closes [#4788](https://github.com/mikro-orm/mikro-orm/issues/4788) * **core:** improve handling of nullable embedded properties ([eae7e38](https://github.com/mikro-orm/mikro-orm/commit/eae7e3856a3eb2a5cc8889162fd3e090a2ff3b81)), closes [#4787](https://github.com/mikro-orm/mikro-orm/issues/4787) * **schema:** respect length of default value of datetime columns ([cbc0c50](https://github.com/mikro-orm/mikro-orm/commit/cbc0c50d8b4ec9b31b29ff825c32b0ee828ec846)), closes [#4782](https://github.com/mikro-orm/mikro-orm/issues/4782) ## [5.8.6](https://github.com/mikro-orm/mikro-orm/compare/v5.8.5...v5.8.6) (2023-10-02)[​](#586-2023-10-02 "Direct link to 586-2023-10-02") ### Bug Fixes[​](#bug-fixes-88 "Direct link to Bug Fixes") * **core:** alias joins on non persistent properties ([d70d323](https://github.com/mikro-orm/mikro-orm/commit/d70d3237fd653b2675fe869c42bdec0a4f06a3cd)), closes [#4773](https://github.com/mikro-orm/mikro-orm/issues/4773) * **core:** respect `disableContextResolution` option when forking ([5964e52](https://github.com/mikro-orm/mikro-orm/commit/5964e5276e30543f9be5c3f0309f057301dc2d70)), closes [#4717](https://github.com/mikro-orm/mikro-orm/issues/4717) [#3338](https://github.com/mikro-orm/mikro-orm/issues/3338) * **migrations:** allow running migrations outside of main transaction ([e0dfb0c](https://github.com/mikro-orm/mikro-orm/commit/e0dfb0c07f4cad5dc428132cdcf65f6570caad1a)), closes [#4775](https://github.com/mikro-orm/mikro-orm/issues/4775) ## [5.8.5](https://github.com/mikro-orm/mikro-orm/compare/v5.8.4...v5.8.5) (2023-09-30)[​](#585-2023-09-30 "Direct link to 585-2023-09-30") ### Bug Fixes[​](#bug-fixes-89 "Direct link to Bug Fixes") * **core:** allow joining a formula property ([1200e5b](https://github.com/mikro-orm/mikro-orm/commit/1200e5b3e30361ec225bfa56a2f37b23dd58dfbc)), closes [#4759](https://github.com/mikro-orm/mikro-orm/issues/4759) * **core:** map virtual properties that shadow a regular property from joined results ([d0b3698](https://github.com/mikro-orm/mikro-orm/commit/d0b3698eebbbd2a74809b70f7aa37c82cee0359e)), closes [#4764](https://github.com/mikro-orm/mikro-orm/issues/4764) * **core:** pin all internal dependencies ([f4868ed](https://github.com/mikro-orm/mikro-orm/commit/f4868edec97457e7c4548d887fb3ba23cf266c59)), closes [#4764](https://github.com/mikro-orm/mikro-orm/issues/4764) * **core:** support overlapping composite FKs with different nullability ([208fbaa](https://github.com/mikro-orm/mikro-orm/commit/208fbaac0fbead9c0122f410d93289d7fe822013)), closes [#4478](https://github.com/mikro-orm/mikro-orm/issues/4478) * **mongo:** fix querying object embedded JSON properties ([b38a327](https://github.com/mikro-orm/mikro-orm/commit/b38a327d852597cda9105f299e329c27a5222d1e)), closes [#4755](https://github.com/mikro-orm/mikro-orm/issues/4755) * **reflection:** detect JSON properties defined with `Record` or `Dictionary` types ([62740d1](https://github.com/mikro-orm/mikro-orm/commit/62740d187e16c2d22140ec5649c19af6964951f8)), closes [#4755](https://github.com/mikro-orm/mikro-orm/issues/4755) ## [5.8.4](https://github.com/mikro-orm/mikro-orm/compare/v5.8.3...v5.8.4) (2023-09-27)[​](#584-2023-09-27 "Direct link to 584-2023-09-27") ### Bug Fixes[​](#bug-fixes-90 "Direct link to Bug Fixes") * **core:** fix recomputing of changesets when entity has unique properties ([d03afad](https://github.com/mikro-orm/mikro-orm/commit/d03afad05327d66edee48186313589ee4b975ea5)), closes [#4749](https://github.com/mikro-orm/mikro-orm/issues/4749) * **query-builder:** fix mapping of complex joined results with cycles ([a9846dd](https://github.com/mikro-orm/mikro-orm/commit/a9846dda01c4cdcf584452add15a4dea70c805a3)), closes [#4741](https://github.com/mikro-orm/mikro-orm/issues/4741) ### Features[​](#features-45 "Direct link to Features") * **core:** add `EntityRepository.getEntityName()` method ([#4745](https://github.com/mikro-orm/mikro-orm/issues/4745)) ([47bfedd](https://github.com/mikro-orm/mikro-orm/commit/47bfeddc282580dc90d61cffa68c32e50ecf11db)) * **core:** allow setting default `schema` on `EntityManager` ([#4717](https://github.com/mikro-orm/mikro-orm/issues/4717)) ([f7c1ef2](https://github.com/mikro-orm/mikro-orm/commit/f7c1ef24076ef760cabe3e73356d7f35999ddf6f)) * **core:** deprecate `UseRequestContext` decorator ([#4744](https://github.com/mikro-orm/mikro-orm/issues/4744)) ([280733f](https://github.com/mikro-orm/mikro-orm/commit/280733f46ae48bf6c2ceb2c847f3e3fb106ca116)) ## [5.8.3](https://github.com/mikro-orm/mikro-orm/compare/v5.8.2...v5.8.3) (2023-09-24)[​](#583-2023-09-24 "Direct link to 583-2023-09-24") ### Bug Fixes[​](#bug-fixes-91 "Direct link to Bug Fixes") * **core:** do not skip `cjs/mjs/cts/mts` extensions during folder-based discovery ([ce574a4](https://github.com/mikro-orm/mikro-orm/commit/ce574a4f2c861b1953c9ae37f79ad7308101f9d0)), closes [#4727](https://github.com/mikro-orm/mikro-orm/issues/4727) * **core:** ensure no duplicates exist in checks/indexes/hooks ([fb523c8](https://github.com/mikro-orm/mikro-orm/commit/fb523c8a4e684dbd6ab32086059d15f765d3aaca)), closes [#4733](https://github.com/mikro-orm/mikro-orm/issues/4733) * **core:** fix updating complex composite key entities via UoW ([#4739](https://github.com/mikro-orm/mikro-orm/issues/4739)) ([898dcda](https://github.com/mikro-orm/mikro-orm/commit/898dcda9680e03c882910d3ee2980ff7ee664ff5)), closes [#4720](https://github.com/mikro-orm/mikro-orm/issues/4720) * **knex:** allow using knex query builder as virtual entity expression ([#4740](https://github.com/mikro-orm/mikro-orm/issues/4740)) ([427cc88](https://github.com/mikro-orm/mikro-orm/commit/427cc88e4c428709e8643bed6b6914585dd57c85)), closes [#4628](https://github.com/mikro-orm/mikro-orm/issues/4628) * **knex:** hydrate nullable relations with joined strategy ([8ddaa93](https://github.com/mikro-orm/mikro-orm/commit/8ddaa93f1401d86e05b8b839b9456ae3623ff250)), closes [#4675](https://github.com/mikro-orm/mikro-orm/issues/4675) * **mongo-migrations:** fix logging of executed migrations ([8ae7eeb](https://github.com/mikro-orm/mikro-orm/commit/8ae7eebe9b04f1514e881c004b31f55a03bd4eab)), closes [#4698](https://github.com/mikro-orm/mikro-orm/issues/4698) ## [5.8.2](https://github.com/mikro-orm/mikro-orm/compare/v5.8.1...v5.8.2) (2023-09-20)[​](#582-2023-09-20 "Direct link to 582-2023-09-20") ### Bug Fixes[​](#bug-fixes-92 "Direct link to Bug Fixes") * **core:** fix query processing when PK is falsy ([#4713](https://github.com/mikro-orm/mikro-orm/issues/4713)) ([3624cb7](https://github.com/mikro-orm/mikro-orm/commit/3624cb7e3362a2625076072a7150f60e625b9100)) * **mongo-migrations:** fix logging of executed migrations ([2d9fc86](https://github.com/mikro-orm/mikro-orm/commit/2d9fc86ccdbcf31efffff4a05df0e31a21e9534f)), closes [#4698](https://github.com/mikro-orm/mikro-orm/issues/4698) * **query-builder:** fix aliasing of joined embedded properties ([24c4ece](https://github.com/mikro-orm/mikro-orm/commit/24c4ece2775c0dbfc4e53ffbc3f33ec5524e5760)), closes [#4711](https://github.com/mikro-orm/mikro-orm/issues/4711) ### Features[​](#features-46 "Direct link to Features") * **core:** allow to use `.ts` files as configuration without `ts-node` ([#4702](https://github.com/mikro-orm/mikro-orm/issues/4702)) ([bda7eca](https://github.com/mikro-orm/mikro-orm/commit/bda7eca955124e13f68aaf1fecdb993f0f3eb8b1)), closes [#4701](https://github.com/mikro-orm/mikro-orm/issues/4701) * **entity-generator:** generate `PrimaryKeyProp` and `PrimaryKeyType` symbols ([605446a](https://github.com/mikro-orm/mikro-orm/commit/605446a5f9f19fc9c67e7dd758132e487c28a29a)) ## [5.8.1](https://github.com/mikro-orm/mikro-orm/compare/v5.8.0...v5.8.1) (2023-09-12)[​](#581-2023-09-12 "Direct link to 581-2023-09-12") ### Bug Fixes[​](#bug-fixes-93 "Direct link to Bug Fixes") * **core:** ensure entity is not in persist stack after `em.insert/Many()` is called ([94eed5e](https://github.com/mikro-orm/mikro-orm/commit/94eed5e1aa7192d1b0658eb5b0cc3589cfaacff5)), closes [#4692](https://github.com/mikro-orm/mikro-orm/issues/4692) * **core:** ensure merging of data to already loaded entities won't fail in some cases ([f6e8204](https://github.com/mikro-orm/mikro-orm/commit/f6e8204f6c4fbafe882c0cb0b475dd45e19a4777)), closes [#4688](https://github.com/mikro-orm/mikro-orm/issues/4688) * **core:** fix merging of collections loaded via joined strategy ([b4a0260](https://github.com/mikro-orm/mikro-orm/commit/b4a0260afb3c41da4c15a8f69b09c228303b7a3f)), closes [#4694](https://github.com/mikro-orm/mikro-orm/issues/4694) * **core:** try to fix merging of large collections loaded via joined strategy ([faae84e](https://github.com/mikro-orm/mikro-orm/commit/faae84e19b40f0a5fcbf057cce5370602b34ec80)), closes [#4694](https://github.com/mikro-orm/mikro-orm/issues/4694) ## [5.8.0](https://github.com/mikro-orm/mikro-orm/compare/v5.7.14...v5.8.0) (2023-09-10)[​](#580-2023-09-10 "Direct link to 580-2023-09-10") ### Bug Fixes[​](#bug-fixes-94 "Direct link to Bug Fixes") * **core:** default baseUrl value to '.' when registering ts-node ([#4680](https://github.com/mikro-orm/mikro-orm/issues/4680)) ([cc0fc5f](https://github.com/mikro-orm/mikro-orm/commit/cc0fc5f8e4190270c197c3f0c1d2f326fd133212)), closes [#4679](https://github.com/mikro-orm/mikro-orm/issues/4679) * **core:** ensure partial loading respects advanced mapped type methods ([72554fd](https://github.com/mikro-orm/mikro-orm/commit/72554fddf8fae907c47fed2e22820960bee296fa)), closes [#4622](https://github.com/mikro-orm/mikro-orm/issues/4622) * **core:** fix assigning collection items with `updateNestedEntities: false` ([e1bfd20](https://github.com/mikro-orm/mikro-orm/commit/e1bfd20502d22d4760e3edebc142f356ab4043f3)) * **core:** fix metadata cache for `@Check()` with callback signature ([44d973e](https://github.com/mikro-orm/mikro-orm/commit/44d973e2e041440bbca69978a3e8e0409862ed5b)), closes [#4505](https://github.com/mikro-orm/mikro-orm/issues/4505) * **core:** fix removing entity that has an inverse relation with M:1 `owner` property ([fbed4a6](https://github.com/mikro-orm/mikro-orm/commit/fbed4a67d56301e90b85eb7c09423532e12dcb6f)), closes [#4578](https://github.com/mikro-orm/mikro-orm/issues/4578) * **core:** ignore null values of unknown properties in `assign()` ([a600f55](https://github.com/mikro-orm/mikro-orm/commit/a600f55c0c75400c33dffd845feb4938f256a86e)), closes [#4566](https://github.com/mikro-orm/mikro-orm/issues/4566) * **core:** map property names to column names in `qb.onConflict()` ([e38d126](https://github.com/mikro-orm/mikro-orm/commit/e38d126b219d5b004a3dfeb777a0c9cad59e0502)), closes [#4483](https://github.com/mikro-orm/mikro-orm/issues/4483) * **core:** remove old items from 1 :m collections via `set()` even if not initialized ([b03e165](https://github.com/mikro-orm/mikro-orm/commit/b03e1656d6bf0a626bdca2f4395ef3a221acfcbf)) * **core:** respect explicit schema name of pivot tables ([af74491](https://github.com/mikro-orm/mikro-orm/commit/af74491aaa3706d205fa3526d4eff4eb31ecd9ee)), closes [#4516](https://github.com/mikro-orm/mikro-orm/issues/4516) * **core:** respect filters with joined loading strategy ([#4683](https://github.com/mikro-orm/mikro-orm/issues/4683)) ([847c35a](https://github.com/mikro-orm/mikro-orm/commit/847c35a5ae263ea876012747308994d458b1a5f0)), closes [#704](https://github.com/mikro-orm/mikro-orm/issues/704) [#2440](https://github.com/mikro-orm/mikro-orm/issues/2440) * **core:** support calling `em.findAndCount()` on virtual entities with `orderBy` ([7f328ac](https://github.com/mikro-orm/mikro-orm/commit/7f328acd733460709df9101248488fd7adfdf1f4)), closes [#4628](https://github.com/mikro-orm/mikro-orm/issues/4628) * **core:** support calling `em.insertMany()` with empty array ([2f65bc8](https://github.com/mikro-orm/mikro-orm/commit/2f65bc8f71d776b8b38658edf23d37cc5f5daabc)), closes [#4640](https://github.com/mikro-orm/mikro-orm/issues/4640) * **core:** use join on conditions for `populateWhere` ([#4682](https://github.com/mikro-orm/mikro-orm/issues/4682)) ([99177cc](https://github.com/mikro-orm/mikro-orm/commit/99177cc94f9b0347c2e0a5e41dcbe347936e74b3)), closes [#3871](https://github.com/mikro-orm/mikro-orm/issues/3871) * **entity-generator:** respect `precision` and `scale` in numeric column type ([3a52c39](https://github.com/mikro-orm/mikro-orm/commit/3a52c399ce5188125704c29417f8587a02c05637)) * **mysql:** fix extra updates on entities with non-primary autoincrement property ([5d6ebe3](https://github.com/mikro-orm/mikro-orm/commit/5d6ebe326a3e26343c268f55806a9aa97d66f439)), closes [#4577](https://github.com/mikro-orm/mikro-orm/issues/4577) * **query-builder:** apply join condition to the target entity in M :N relations ([c78d812](https://github.com/mikro-orm/mikro-orm/commit/c78d812e53f4ac6b12ad186e327f1e9fbcaf30b6)), closes [#4644](https://github.com/mikro-orm/mikro-orm/issues/4644) * **query-builder:** make `QBFilterQuery` type more strict ([755ef67](https://github.com/mikro-orm/mikro-orm/commit/755ef67fd6fa8a3764314c4c7d3fe70b53d9330d)) * **schema:** respect `columnType` on enum properties ([#4601](https://github.com/mikro-orm/mikro-orm/issues/4601)) ([0eae590](https://github.com/mikro-orm/mikro-orm/commit/0eae5900f42d6c7394dfc57422c84975cc7127fb)) ### Features[​](#features-47 "Direct link to Features") * **cli:** add `--drop-db` flag to `migration:fresh` and `schema:fresh` ([cf1db80](https://github.com/mikro-orm/mikro-orm/commit/cf1db80b26a2f4e9f6fd917ee78a0925bebc215d)), closes [#4569](https://github.com/mikro-orm/mikro-orm/issues/4569) * **core:** add `clear` option to `em.transactional()` ([01d1ad7](https://github.com/mikro-orm/mikro-orm/commit/01d1ad7a3fc4d07c7605b34609c60ae8dce000d8)) * **core:** add `Collection.isEmpty()` method ([#4599](https://github.com/mikro-orm/mikro-orm/issues/4599)) ([2d8d506](https://github.com/mikro-orm/mikro-orm/commit/2d8d506f9ea689ddbde41dafc454bbd59fe6f7e9)) * **core:** add `Collection.slice()` method ([#4608](https://github.com/mikro-orm/mikro-orm/issues/4608)) ([7c99c37](https://github.com/mikro-orm/mikro-orm/commit/7c99c37faec3f0c77fb897b0853930a75c2cd760)) * **core:** add `Collection` helpers `map/filter/reduce/exists/findFirst/indexBy` ([3ba33ac](https://github.com/mikro-orm/mikro-orm/commit/3ba33aca5a73649a7290d5daf9c6d85af3c33d93)), closes [#4592](https://github.com/mikro-orm/mikro-orm/issues/4592) * **core:** allow disabling duplicate entities discovery validation ([#4618](https://github.com/mikro-orm/mikro-orm/issues/4618)) ([3ff0dda](https://github.com/mikro-orm/mikro-orm/commit/3ff0ddae5d56ad36009531cafedaab931c522300)) * **core:** allow enabling result cache globally ([5876c99](https://github.com/mikro-orm/mikro-orm/commit/5876c99e398919ca63ce105c644a8621813ffffa)), closes [#4656](https://github.com/mikro-orm/mikro-orm/issues/4656) * **core:** allow fine-grained control over `em.upsert()` ([#4669](https://github.com/mikro-orm/mikro-orm/issues/4669)) ([ab0ddee](https://github.com/mikro-orm/mikro-orm/commit/ab0ddee271149dd201e5661fa38f6d7b1b9054ef)), closes [#4325](https://github.com/mikro-orm/mikro-orm/issues/4325) [#4602](https://github.com/mikro-orm/mikro-orm/issues/4602) * **core:** allow global config option for `disableIdentityMap` ([ef32b14](https://github.com/mikro-orm/mikro-orm/commit/ef32b14111245caba8cc9f7298eb8f81a88488a6)), closes [#4653](https://github.com/mikro-orm/mikro-orm/issues/4653) * **core:** respect `batchSize` in `em.upsertMany()` ([4a21c33](https://github.com/mikro-orm/mikro-orm/commit/4a21c33954649a031460fa474539f54b81eec5a0)), closes [#4421](https://github.com/mikro-orm/mikro-orm/issues/4421) * **entity-generator:** allow skipping some tables or columns ([e603108](https://github.com/mikro-orm/mikro-orm/commit/e603108445ed97b05cb48dd60830bb04cb095d57)), closes [#4584](https://github.com/mikro-orm/mikro-orm/issues/4584) * **migrations:** add `Migration.getEntityManager()` helper ([79af75c](https://github.com/mikro-orm/mikro-orm/commit/79af75ceac90f1acb48628d1a2d987261f72a550)), closes [#4605](https://github.com/mikro-orm/mikro-orm/issues/4605) * **mongo:** support indexes on embedded properties ([040896e](https://github.com/mikro-orm/mikro-orm/commit/040896e43664507d010692649d6b331567150e23)), closes [#2129](https://github.com/mikro-orm/mikro-orm/issues/2129) * **sql:** add `readOnly` option to `em.begin()` and `em.transactional()` ([86bb7d4](https://github.com/mikro-orm/mikro-orm/commit/86bb7d4f99f37409180274c4e13c0bac82d4f334)) * **sql:** allow specifying query comments ([06d4d20](https://github.com/mikro-orm/mikro-orm/commit/06d4d203cc28e33d664b48b907d3e372fc90f516)) ## [5.7.14](https://github.com/mikro-orm/mikro-orm/compare/v5.7.13...v5.7.14) (2023-07-27)[​](#5714-2023-07-27 "Direct link to 5714-2023-07-27") ### Bug Fixes[​](#bug-fixes-95 "Direct link to Bug Fixes") * **core:** ensure JSON arrays are correctly handled ([5327bcc](https://github.com/mikro-orm/mikro-orm/commit/5327bccd52596fe1368f2766e38300b0d4cda03c)), closes [#4555](https://github.com/mikro-orm/mikro-orm/issues/4555) * **core:** inferring JSON type based on `columnType` when mapping to array ([96d87ba](https://github.com/mikro-orm/mikro-orm/commit/96d87ba50b0e31dd66ae194caab70f41c0747e73)), closes [#4548](https://github.com/mikro-orm/mikro-orm/issues/4548) * **entity-generator:** use ref instead of wrappedReference ([#4559](https://github.com/mikro-orm/mikro-orm/issues/4559)) ([be02aa4](https://github.com/mikro-orm/mikro-orm/commit/be02aa4eba3706023eb474e8cfa222f31a95a494)) * **mongo:** do not create collections for embeddable entities ([0759df0](https://github.com/mikro-orm/mikro-orm/commit/0759df0f463a575940d3f8514291c59c8482b4d9)), closes [#4495](https://github.com/mikro-orm/mikro-orm/issues/4495) * **seeder:** allow run method to return without promise ([#4541](https://github.com/mikro-orm/mikro-orm/issues/4541)) ([8012507](https://github.com/mikro-orm/mikro-orm/commit/80125071510ace0c0376d026065b607f9e7b33bd)) ## [5.7.13](https://github.com/mikro-orm/mikro-orm/compare/v5.7.12...v5.7.13) (2023-07-16)[​](#5713-2023-07-16 "Direct link to 5713-2023-07-16") ### Bug Fixes[​](#bug-fixes-96 "Direct link to Bug Fixes") * **core:** deprecate `wrappedReference` on m:1 decorator options ([d7f362e](https://github.com/mikro-orm/mikro-orm/commit/d7f362eae354437e0d2427f680420f370c6038fd)) * **core:** do not fail when detecting mapped type for enum columns ([b94048b](https://github.com/mikro-orm/mikro-orm/commit/b94048bc2aa8cd537edd9bf34333996f2c4bef7c)), closes [#2323](https://github.com/mikro-orm/mikro-orm/issues/2323) * **core:** fix handling shared columns in composite foreign keys ([fbb6958](https://github.com/mikro-orm/mikro-orm/commit/fbb6958944998ca1abee331002e5aedd8bfa9c37)) * **core:** fix multiple `?` in fulltext fields updates ([9c9915e](https://github.com/mikro-orm/mikro-orm/commit/9c9915eb54b3d6989ea05938498f6e0b84397e5f)), closes [#4484](https://github.com/mikro-orm/mikro-orm/issues/4484) * **core:** fix updating composite key entities via flush ([733cb80](https://github.com/mikro-orm/mikro-orm/commit/733cb80918fa83a2d028b59ee807e0a3bb9b72b7)), closes [#4533](https://github.com/mikro-orm/mikro-orm/issues/4533) * **core:** respect `persist: false` on relations ([a127fff](https://github.com/mikro-orm/mikro-orm/commit/a127fff66914add81a6f54fd1f8f9f5ae56366ee)), closes [#4504](https://github.com/mikro-orm/mikro-orm/issues/4504) * **migrations:** support reverting migrations that had extenion in the database ([72df9ad](https://github.com/mikro-orm/mikro-orm/commit/72df9ad3dfa497111fa7c949ae1a0d60e5cca6d0)), closes [#4528](https://github.com/mikro-orm/mikro-orm/issues/4528) * **mongo:** drop migrations table when requested ([278ba3a](https://github.com/mikro-orm/mikro-orm/commit/278ba3a36b087fc1e8a65a1b9114a7a21c8da76c)), closes [#4513](https://github.com/mikro-orm/mikro-orm/issues/4513) * **postgres:** fix hydration of 1:1 properties when entity has version fields ([474eb73](https://github.com/mikro-orm/mikro-orm/commit/474eb73c1551a3a9ee05170760b9f377fe10d749)), closes [#4497](https://github.com/mikro-orm/mikro-orm/issues/4497) * **sqlite:** allow using `clientUrl` without a `host` ([#4447](https://github.com/mikro-orm/mikro-orm/issues/4447)) ([9a01bbd](https://github.com/mikro-orm/mikro-orm/commit/9a01bbd5f535a4c31520bce3c27eb8fb2b461283)) * **sqlite:** fix processing queries with large parameters ([48ee8c2](https://github.com/mikro-orm/mikro-orm/commit/48ee8c28ecb7664c0cd3d8540162687ec96c4bd1)), closes [#4526](https://github.com/mikro-orm/mikro-orm/issues/4526) * **sql:** schema not inherited in query with relations ([#4477](https://github.com/mikro-orm/mikro-orm/issues/4477)) ([b680477](https://github.com/mikro-orm/mikro-orm/commit/b680477ddda430b443c1127ab4a9c91ec4c96a5f)), closes [#4472](https://github.com/mikro-orm/mikro-orm/issues/4472) ## [5.7.12](https://github.com/mikro-orm/mikro-orm/compare/v5.7.11...v5.7.12) (2023-06-10)[​](#5712-2023-06-10 "Direct link to 5712-2023-06-10") ### Bug Fixes[​](#bug-fixes-97 "Direct link to Bug Fixes") * **core:** allow async filter callbacks in `em.addFilter()` on type level ([308c45b](https://github.com/mikro-orm/mikro-orm/commit/308c45bcdc0ae88b263cf6f35f7ab66f91cf97df)) * **core:** fallback to direct property access ([320c52f](https://github.com/mikro-orm/mikro-orm/commit/320c52f8066bb5471a72c70e6bb87aa9b562e17f)), closes [#4434](https://github.com/mikro-orm/mikro-orm/issues/4434) [#4216](https://github.com/mikro-orm/mikro-orm/issues/4216) * **core:** fix extra updates when `forceEntityConstructor` enabled ([41874eb](https://github.com/mikro-orm/mikro-orm/commit/41874eb8c8c5ec3f62894d0b79e66df2ef799b56)), closes [#4426](https://github.com/mikro-orm/mikro-orm/issues/4426) * **core:** fix returning clause for upsert with embeddables ([#4427](https://github.com/mikro-orm/mikro-orm/issues/4427)) ([b9682f0](https://github.com/mikro-orm/mikro-orm/commit/b9682f03b34dc028cc593f8a3ffbd672d3e9bcee)) * **core:** respect `undefined` when assigning to object properties ([217ff8f](https://github.com/mikro-orm/mikro-orm/commit/217ff8f7321b6ed2551df5214f9f5934bb6d8896)), closes [#4428](https://github.com/mikro-orm/mikro-orm/issues/4428) * **core:** respect falsy values in `em.upsert` ([ef22b21](https://github.com/mikro-orm/mikro-orm/commit/ef22b21ad853c020fcd1c149d61714b40d7d390a)), closes [#4420](https://github.com/mikro-orm/mikro-orm/issues/4420) * **mongo:** allow saving self-references inside M :N properties in one flush ([c1b5fc4](https://github.com/mikro-orm/mikro-orm/commit/c1b5fc49de2b962e4d44b5673a8df1437f0f71ab)), closes [#4431](https://github.com/mikro-orm/mikro-orm/issues/4431) ### Features[​](#features-48 "Direct link to Features") * **core:** add `em.getMetadata(Entity)` shortcut ([e5834b4](https://github.com/mikro-orm/mikro-orm/commit/e5834b4314c190c1557aeddf31c88131ea855d89)) * **core:** support Uint8Array ([#4419](https://github.com/mikro-orm/mikro-orm/issues/4419)) ([01a9c59](https://github.com/mikro-orm/mikro-orm/commit/01a9c5973d723827e485ce0f9a36ea03b24db676)), closes [#4418](https://github.com/mikro-orm/mikro-orm/issues/4418) ## [5.7.11](https://github.com/mikro-orm/mikro-orm/compare/v5.7.10...v5.7.11) (2023-06-01)[​](#5711-2023-06-01 "Direct link to 5711-2023-06-01") ### Bug Fixes[​](#bug-fixes-98 "Direct link to Bug Fixes") * **cli:** expose missing `migration:check` command ([#4388](https://github.com/mikro-orm/mikro-orm/issues/4388)) ([79e128e](https://github.com/mikro-orm/mikro-orm/commit/79e128e34fd1587e345716174fcb7c11ce983568)) * **core:** fix change tracking of optional properties with `forceUndefined` ([9303c3f](https://github.com/mikro-orm/mikro-orm/commit/9303c3f58c05b266307c774134cb0057e03d29fa)), closes [#4412](https://github.com/mikro-orm/mikro-orm/issues/4412) * **core:** fix populating relations in parallel via `Promise.all` ([#4415](https://github.com/mikro-orm/mikro-orm/issues/4415)) ([f4127a7](https://github.com/mikro-orm/mikro-orm/commit/f4127a7e9f28151c1043a0463c17cc0480ee3e90)), closes [#4213](https://github.com/mikro-orm/mikro-orm/issues/4213) [#4343](https://github.com/mikro-orm/mikro-orm/issues/4343) ## [5.7.10](https://github.com/mikro-orm/mikro-orm/compare/v5.7.9...v5.7.10) (2023-05-23)[​](#5710-2023-05-23 "Direct link to 5710-2023-05-23") ### Bug Fixes[​](#bug-fixes-99 "Direct link to Bug Fixes") * **core:** exclude collections from `returning` clause from `em.upsert` ([e342449](https://github.com/mikro-orm/mikro-orm/commit/e342449c1c291b74de8821afc43236f217260165)), closes [#4382](https://github.com/mikro-orm/mikro-orm/issues/4382) * **core:** re-export `Reference` class as `Ref` ([50eea37](https://github.com/mikro-orm/mikro-orm/commit/50eea370a43d70366643c8578c51ea427b79a64c)), closes [#4161](https://github.com/mikro-orm/mikro-orm/issues/4161) * **core:** respect `skipNull` when serializing object properties/embeddables ([f27ee9a](https://github.com/mikro-orm/mikro-orm/commit/f27ee9a6dcaf4b9ad72c4aba652c1afb23b74577)), closes [#4383](https://github.com/mikro-orm/mikro-orm/issues/4383) ### Features[​](#features-49 "Direct link to Features") * **core:** add `meta` to `EventArgs` to the upsert events ([ed431ea](https://github.com/mikro-orm/mikro-orm/commit/ed431eaba1c62aa9d3cc5e664c1ec73eef59fceb)) ### Performance Improvements[​](#performance-improvements-17 "Direct link to Performance Improvements") * **core:** set `Collection._property` early for managed entities ([23ca682](https://github.com/mikro-orm/mikro-orm/commit/23ca682ad8792de145a5c4c7e32c8ff226c0cae1)), closes [#4376](https://github.com/mikro-orm/mikro-orm/issues/4376) ## [5.7.9](https://github.com/mikro-orm/mikro-orm/compare/v5.7.8...v5.7.9) (2023-05-22)[​](#579-2023-05-22 "Direct link to 579-2023-05-22") ### Bug Fixes[​](#bug-fixes-100 "Direct link to Bug Fixes") * **core:** fix mapping of results from partial loading ([541c449](https://github.com/mikro-orm/mikro-orm/commit/541c449e00d49c42e57ca0be536f26a4799bfa3c)), closes [#4377](https://github.com/mikro-orm/mikro-orm/issues/4377) ### Performance Improvements[​](#performance-improvements-18 "Direct link to Performance Improvements") * **core:** don't double clone when merging data to exiting entity ([c175652](https://github.com/mikro-orm/mikro-orm/commit/c175652445a58e26fac79eb6e7546a5397f2ee4c)), closes [#4376](https://github.com/mikro-orm/mikro-orm/issues/4376) ## [5.7.8](https://github.com/mikro-orm/mikro-orm/compare/v5.7.7...v5.7.8) (2023-05-21)[​](#578-2023-05-21 "Direct link to 578-2023-05-21") ### Bug Fixes[​](#bug-fixes-101 "Direct link to Bug Fixes") * **core:** ensure `em.upsert` returns initialized entity ([#4370](https://github.com/mikro-orm/mikro-orm/issues/4370)) ([bad0b37](https://github.com/mikro-orm/mikro-orm/commit/bad0b37b83552cf6da6606b547ccb19d91062acc)), closes [#4242](https://github.com/mikro-orm/mikro-orm/issues/4242) * **core:** ensure correct number of results is logged in SQL drivers ([e3cd184](https://github.com/mikro-orm/mikro-orm/commit/e3cd1845365c59fc3e8cdabd97a6be74c6374d79)) * **core:** ensure strict type-checking of enum queries ([8f8464a](https://github.com/mikro-orm/mikro-orm/commit/8f8464a53cb8125b8fe7f9cf11c4962b435c9f24)) * **query-builder:** `qb.clone()` shouldn't ignore `groupBy` and `having` clauses ([7127ff6](https://github.com/mikro-orm/mikro-orm/commit/7127ff623b1f64940e9f24d658a2f2a258227c19)) ### Features[​](#features-50 "Direct link to Features") * **query-builder:** add `qb.returning()` ([b5ab66b](https://github.com/mikro-orm/mikro-orm/commit/b5ab66bccf4dc3867194a6ba50626d4891646fe1)) * **query-builder:** allow partial loading via `qb.(left/inner)JoinAndSelect()` ([22c8c84](https://github.com/mikro-orm/mikro-orm/commit/22c8c84d9852008522e21389b2304f7f646cdb99)), closes [#4364](https://github.com/mikro-orm/mikro-orm/issues/4364) ## [5.7.7](https://github.com/mikro-orm/mikro-orm/compare/v5.7.6...v5.7.7) (2023-05-14)[​](#577-2023-05-14 "Direct link to 577-2023-05-14") ### Bug Fixes[​](#bug-fixes-102 "Direct link to Bug Fixes") * **core:** deprecate `@Subscriber()` decorator ([033b71d](https://github.com/mikro-orm/mikro-orm/commit/033b71d8ecb3313a51fb042b088c886f303c72f0)) * **core:** revert the `const enums` as they break projects with `isolatedModules` ([8b23674](https://github.com/mikro-orm/mikro-orm/commit/8b2367401d055590e402241a46a996c2b026e873)), closes [#4350](https://github.com/mikro-orm/mikro-orm/issues/4350) * **knex:** remove constraints from knex's peer dependencies ([ce81071](https://github.com/mikro-orm/mikro-orm/commit/ce8107169d817f794766f1470cb3eabb19de3cd7)) * **query-builder:** do not enable query pagination when explicit `groupBy` is set ([921251a](https://github.com/mikro-orm/mikro-orm/commit/921251a5d9cfdeefb0adabddcd889c305b1ef696)), closes [#4353](https://github.com/mikro-orm/mikro-orm/issues/4353) ### Features[​](#features-51 "Direct link to Features") * **core:** add `options` argument to filter callback ([c57ee5e](https://github.com/mikro-orm/mikro-orm/commit/c57ee5e3efda1d1516a0295a5b395f01dccdcad3)), closes [#4352](https://github.com/mikro-orm/mikro-orm/issues/4352) * **query-builder:** validate unknown alias when explicitly joining ([8d4a83a](https://github.com/mikro-orm/mikro-orm/commit/8d4a83a08aee3e280356a8321f78085ff36bea5c)), closes [#4353](https://github.com/mikro-orm/mikro-orm/issues/4353) ## [5.7.6](https://github.com/mikro-orm/mikro-orm/compare/v5.7.5...v5.7.6) (2023-05-13)[​](#576-2023-05-13 "Direct link to 576-2023-05-13") ### Bug Fixes[​](#bug-fixes-103 "Direct link to Bug Fixes") * **core:** allow `em.populate()` on lazy formula properties ([5c6bb13](https://github.com/mikro-orm/mikro-orm/commit/5c6bb13fd92ad941f1f8de1982544620bb3e1547)) * **core:** ensure database values are used in the identity map keys ([46b5e3a](https://github.com/mikro-orm/mikro-orm/commit/46b5e3ab50e8347fa6af0ca4289bf7d7ed7653d3)), closes [#4335](https://github.com/mikro-orm/mikro-orm/issues/4335) * **core:** fix re-populating relations with `refresh: true` ([74b6a98](https://github.com/mikro-orm/mikro-orm/commit/74b6a98d1157a27ee57c7233c92cd460d787adb8)), closes [#4339](https://github.com/mikro-orm/mikro-orm/issues/4339) ### Features[​](#features-52 "Direct link to Features") * **core:** add `wrap(entity).populate([...])` shortcut ([6b519c4](https://github.com/mikro-orm/mikro-orm/commit/6b519c4a7336ba0df023e0067701f4b46dc15343)) * **core:** log number of results ([261b3d9](https://github.com/mikro-orm/mikro-orm/commit/261b3d95ac225b819a26b67a65f4c32c3e34e52f)) ### Performance Improvements[​](#performance-improvements-19 "Direct link to Performance Improvements") * **core:** define some enums as const enums, so they get inlined ([3cb43ba](https://github.com/mikro-orm/mikro-orm/commit/3cb43baf14e4aa9b23d6085756198b6dbc796fb9)) ## [5.7.5](https://github.com/mikro-orm/mikro-orm/compare/v5.7.4...v5.7.5) (2023-05-09)[​](#575-2023-05-09 "Direct link to 575-2023-05-09") ### Bug Fixes[​](#bug-fixes-104 "Direct link to Bug Fixes") * **core:** deprecate `wrappedReference` and `IdentifiedReference` ([ab79832](https://github.com/mikro-orm/mikro-orm/commit/ab79832a8f119bc5c473ee8fb749ba1c9e4d01b3)) * **core:** detect early deletes for compound unique constraints ([f9530e4](https://github.com/mikro-orm/mikro-orm/commit/f9530e4b24bd806e33f1997d4e1ef548e02b6b90)), closes [#4305](https://github.com/mikro-orm/mikro-orm/issues/4305) * **core:** fix extra updates caused by bigint type ([2acd25e](https://github.com/mikro-orm/mikro-orm/commit/2acd25e1dfd2eb7764e38c4ff224a84e52d5ed0f)), closes [#4249](https://github.com/mikro-orm/mikro-orm/issues/4249) * **core:** fix extra updates caused by property initializers when `forceEntityConstructor` is enabled ([7ee883d](https://github.com/mikro-orm/mikro-orm/commit/7ee883df04be893a1c01b3ef0b41a736f5d6b3b9)), closes [#4323](https://github.com/mikro-orm/mikro-orm/issues/4323) * **core:** respect schema name when checking duplicate table names ([5b89b00](https://github.com/mikro-orm/mikro-orm/commit/5b89b0056b6f87e6d5f4960bb2395d37bb9b3c28)), closes [#4332](https://github.com/mikro-orm/mikro-orm/issues/4332) * **mongo:** sorting with UnderscoreNamingStrategy ([#4314](https://github.com/mikro-orm/mikro-orm/issues/4314)) ([a5b0f94](https://github.com/mikro-orm/mikro-orm/commit/a5b0f94895a1485249156d26290f60cc7080b65a)), closes [#4313](https://github.com/mikro-orm/mikro-orm/issues/4313) * **postgres:** improve enum/check constraint inspection in schema diffing ([6c44b42](https://github.com/mikro-orm/mikro-orm/commit/6c44b4277976c2c4bd79818d997a1a6bff861d7c)), closes [#4312](https://github.com/mikro-orm/mikro-orm/issues/4312) ## [5.7.4](https://github.com/mikro-orm/mikro-orm/compare/v5.7.3...v5.7.4) (2023-05-01)[​](#574-2023-05-01 "Direct link to 574-2023-05-01") ### Bug Fixes[​](#bug-fixes-105 "Direct link to Bug Fixes") * **core:** expand PK conditions inside top level operators ([305ce5d](https://github.com/mikro-orm/mikro-orm/commit/305ce5d6eef0971440f8bf7b01106f2da6fcfccc)), closes [#4222](https://github.com/mikro-orm/mikro-orm/issues/4222) * **core:** fix extra updates when caching inlined embedded entities ([3dc3b32](https://github.com/mikro-orm/mikro-orm/commit/3dc3b3267ea7a2c4cbc9835214b84165d816adb2)), closes [#4295](https://github.com/mikro-orm/mikro-orm/issues/4295) * **core:** fix object merging in `assign` helper when current value is scalar ([c012f95](https://github.com/mikro-orm/mikro-orm/commit/c012f95cfe0e4cd312652ff2d541a09b6ddfcde6)), closes [#4290](https://github.com/mikro-orm/mikro-orm/issues/4290) * **core:** only consider valid query as tuple comparison ([7212a53](https://github.com/mikro-orm/mikro-orm/commit/7212a53fddc8c7712d7b2ec1eba8df41ccdab0eb)), closes [#4220](https://github.com/mikro-orm/mikro-orm/issues/4220) * **migrations:** respect custom migration name in migration class names ([#4294](https://github.com/mikro-orm/mikro-orm/issues/4294)) ([c402a99](https://github.com/mikro-orm/mikro-orm/commit/c402a993b75a09a78f8fb9ea3de44f5298729689)) ## [5.7.3](https://github.com/mikro-orm/mikro-orm/compare/v5.7.2...v5.7.3) (2023-04-28)[​](#573-2023-04-28 "Direct link to 573-2023-04-28") ### Bug Fixes[​](#bug-fixes-106 "Direct link to Bug Fixes") * **core:** merge returned values to the initial entity snapshot ([e123076](https://github.com/mikro-orm/mikro-orm/commit/e1230764633ecdc906f3b1a4073f1dc44100e5a1)), closes [#4284](https://github.com/mikro-orm/mikro-orm/issues/4284) * **postgres:** do not convert `date` column type to `Date` object automatically ([a7d1d09](https://github.com/mikro-orm/mikro-orm/commit/a7d1d09e710497d08d2c12346a76c664ed2d67e5)), closes [#4194](https://github.com/mikro-orm/mikro-orm/issues/4194) [#4276](https://github.com/mikro-orm/mikro-orm/issues/4276) ### Features[​](#features-53 "Direct link to Features") * **core:** add `beforeUpsert` and `afterUpsert` events ([db9ff09](https://github.com/mikro-orm/mikro-orm/commit/db9ff0974c0c51450729aec81436bacffb2362f6)), closes [#4282](https://github.com/mikro-orm/mikro-orm/issues/4282) * **core:** allow creating DELETE changesets via `uow.computeChangeSet()` ([61479b6](https://github.com/mikro-orm/mikro-orm/commit/61479b642751f9bc347ae2ab6f0bbf630d6a6295)), closes [#4280](https://github.com/mikro-orm/mikro-orm/issues/4280) * **core:** allow disabling validation for duplicate `tableName` ([dfb87bf](https://github.com/mikro-orm/mikro-orm/commit/dfb87bf96d801666edb30a35da41a6cf9e2369d9)) ## [5.7.2](https://github.com/mikro-orm/mikro-orm/compare/v5.7.1...v5.7.2) (2023-04-25)[​](#572-2023-04-25 "Direct link to 572-2023-04-25") ### Bug Fixes[​](#bug-fixes-107 "Direct link to Bug Fixes") * **cli:** await the yargs.parse call in esm.ts ([#4272](https://github.com/mikro-orm/mikro-orm/issues/4272)) ([dcdf70a](https://github.com/mikro-orm/mikro-orm/commit/dcdf70a537eb733d7b4f0dea054bbef0b72b48a0)) * **core:** don't skip updates from propagation triggered via `em.create()` ([30778c3](https://github.com/mikro-orm/mikro-orm/commit/30778c35667d275bf4407a762feb1a92d91f7fe2)), closes [#4209](https://github.com/mikro-orm/mikro-orm/issues/4209) * **core:** quote JSON property paths if they contain special characters ([a94bbce](https://github.com/mikro-orm/mikro-orm/commit/a94bbcec526fd372ef4d34be06fb7b79197e3878)), closes [#4264](https://github.com/mikro-orm/mikro-orm/issues/4264) * **core:** respect `forceUndefined` in the original entity data ([d2d9cc0](https://github.com/mikro-orm/mikro-orm/commit/d2d9cc0bd45dd775aa0e951578b6f9f88fd01cec)), closes [#4262](https://github.com/mikro-orm/mikro-orm/issues/4262) [#4266](https://github.com/mikro-orm/mikro-orm/issues/4266) * **core:** respect `serialize()` `skipNull` option inside embeddables ([4cf7669](https://github.com/mikro-orm/mikro-orm/commit/4cf766932e902cc96d56b2a9aa9d1215785c8ad6)), closes [#4263](https://github.com/mikro-orm/mikro-orm/issues/4263) * **migrations:** allow generating named initial migration ([01d6a39](https://github.com/mikro-orm/mikro-orm/commit/01d6a39b22885ffa16332122d6279911440448dc)), closes [#4271](https://github.com/mikro-orm/mikro-orm/issues/4271) ## [5.7.1](https://github.com/mikro-orm/mikro-orm/compare/v5.7.0...v5.7.1) (2023-04-25)[​](#571-2023-04-25 "Direct link to 571-2023-04-25") ### Bug Fixes[​](#bug-fixes-108 "Direct link to Bug Fixes") * **cli:** await the `yargs.parse` call ([3757472](https://github.com/mikro-orm/mikro-orm/commit/37574723d0ce37a8d0d3284124d836a517f451a7)), closes [#4265](https://github.com/mikro-orm/mikro-orm/issues/4265) ## [5.7.0](https://github.com/mikro-orm/mikro-orm/compare/v5.6.16...v5.7.0) (2023-04-23)[​](#570-2023-04-23 "Direct link to 570-2023-04-23") ### Bug Fixes[​](#bug-fixes-109 "Direct link to Bug Fixes") * **core:** clean up bidirectional references after removal of entity ([bfd3840](https://github.com/mikro-orm/mikro-orm/commit/bfd3840a81ae01cc9f2b8fce77edf2f7e814d5fa)), closes [#4234](https://github.com/mikro-orm/mikro-orm/issues/4234) * **core:** detect `JsonType` based on `columnType` ([#4252](https://github.com/mikro-orm/mikro-orm/issues/4252)) ([2e01622](https://github.com/mikro-orm/mikro-orm/commit/2e01622963c8b22c6468b93a9cd3bc4d8e13bada)), closes [#4229](https://github.com/mikro-orm/mikro-orm/issues/4229) * **core:** do not try to propagate changes to `mapToPk` relations ([7028890](https://github.com/mikro-orm/mikro-orm/commit/7028890a3c902ed042e89da10168572544f0e595)), closes [#4254](https://github.com/mikro-orm/mikro-orm/issues/4254) * **core:** fix mapping of joined relations with buffer PKs ([8e9e7ee](https://github.com/mikro-orm/mikro-orm/commit/8e9e7ee5fc4cbea0225113b735628a1f0298c5f5)), closes [#4219](https://github.com/mikro-orm/mikro-orm/issues/4219) * **core:** merge env vars with explicit configuration recursively ([392a623](https://github.com/mikro-orm/mikro-orm/commit/392a623a9602eb42e8215dd71381c215d4ac1503)), closes [#4235](https://github.com/mikro-orm/mikro-orm/issues/4235) * **core:** prevent tuple type properties from being converted to array when serializing entities ([#4205](https://github.com/mikro-orm/mikro-orm/issues/4205)) ([04ad72e](https://github.com/mikro-orm/mikro-orm/commit/04ad72e968b997fdc113b11db605fbb119a52f77)) * **core:** propagate changes from extra updates back to the original changeset ([77f5c14](https://github.com/mikro-orm/mikro-orm/commit/77f5c147efc5e96007908a481cf2d3c34ac321fa)), closes [#4245](https://github.com/mikro-orm/mikro-orm/issues/4245) * **core:** rework JSON value processing ([#4194](https://github.com/mikro-orm/mikro-orm/issues/4194)) ([5594c46](https://github.com/mikro-orm/mikro-orm/commit/5594c469f05d2c1fc76f3cc1a388f5e7162f4e72)), closes [#4193](https://github.com/mikro-orm/mikro-orm/issues/4193) * **mariadb:** use `json_extract` when querying JSON fields ([ca96acc](https://github.com/mikro-orm/mikro-orm/commit/ca96acc640ae36a1b9d5992b248a8d32f019e18c)) * **query-builder:** fix pagination when PK uses `BigIntType` ([b789031](https://github.com/mikro-orm/mikro-orm/commit/b789031300e752cfd9565371e7989776b18bd3a0)), closes [#4227](https://github.com/mikro-orm/mikro-orm/issues/4227) * **query-builder:** support `onConflict().ignore()` without parameters ([3a3b0bd](https://github.com/mikro-orm/mikro-orm/commit/3a3b0bd956354917f31481582cc2e6381951a7c5)), closes [#4224](https://github.com/mikro-orm/mikro-orm/issues/4224) * **schema:** fix comparing default value of JSON properties ([41277a1](https://github.com/mikro-orm/mikro-orm/commit/41277a1376904b197851bbc3a6cb7692187d90d0)), closes [#4212](https://github.com/mikro-orm/mikro-orm/issues/4212) ### Features[​](#features-54 "Direct link to Features") * **core:** allow disabling transactions ([#4260](https://github.com/mikro-orm/mikro-orm/issues/4260)) ([8e8bc38](https://github.com/mikro-orm/mikro-orm/commit/8e8bc38d7d4056d59dc7058b0f2d2c3827588bc0)), closes [#3747](https://github.com/mikro-orm/mikro-orm/issues/3747) [#3992](https://github.com/mikro-orm/mikro-orm/issues/3992) * **core:** deprecate `persist/flush/remove` methods from `EntityRepository` ([#4259](https://github.com/mikro-orm/mikro-orm/issues/4259)) ([eba4563](https://github.com/mikro-orm/mikro-orm/commit/eba45635c61c13f3646a19e640522bce09f5a24a)), closes [#3989](https://github.com/mikro-orm/mikro-orm/issues/3989) * **core:** validate repository type in `repo.populate()` and `repo.assign()` ([301bdf8](https://github.com/mikro-orm/mikro-orm/commit/301bdf881b56ffb373c168f7be9af71a061466da)), closes [#3989](https://github.com/mikro-orm/mikro-orm/issues/3989) * **core:** validate unique `tableName` ([0693029](https://github.com/mikro-orm/mikro-orm/commit/069302936bfa1fd10aeb2636ccdc3ca6ea021c4b)), closes [#4149](https://github.com/mikro-orm/mikro-orm/issues/4149) * **migrations:** add support for custom migration names ([#4250](https://github.com/mikro-orm/mikro-orm/issues/4250)) ([fb2879e](https://github.com/mikro-orm/mikro-orm/commit/fb2879e21575a54d1b05c7d1fc250d5f713d9b44)) * **mongo:** allow setting weights on index ([299b188](https://github.com/mikro-orm/mikro-orm/commit/299b18861339a8e7d5ebb5ac06a9350d0983a1a7)), closes [#4172](https://github.com/mikro-orm/mikro-orm/issues/4172) ### Performance Improvements[​](#performance-improvements-20 "Direct link to Performance Improvements") * **core:** fix eager loading of multiple properties causing a cycles ([ecbecfc](https://github.com/mikro-orm/mikro-orm/commit/ecbecfc9b46ea7402024e7fd31e3f818b361d860)), closes [#4213](https://github.com/mikro-orm/mikro-orm/issues/4213) ## [5.6.16](https://github.com/mikro-orm/mikro-orm/compare/v5.6.15...v5.6.16) (2023-04-04)[​](#5616-2023-04-04 "Direct link to 5616-2023-04-04") ### Bug Fixes[​](#bug-fixes-110 "Direct link to Bug Fixes") * **core:** don't override discovery options when `alwaysAnalyseProperties` is used ([f4acc91](https://github.com/mikro-orm/mikro-orm/commit/f4acc918ad25af3a97c2673de36922d5ce90eccf)), closes [#4181](https://github.com/mikro-orm/mikro-orm/issues/4181) * **core:** ensure correct FK as PK identity map key ([475e2a3](https://github.com/mikro-orm/mikro-orm/commit/475e2a33d1a2682cc9168269e36f14b10b6fe7fd)) * **core:** fix hydration of 1:1 FK as PK property via joined strategy ([75653f0](https://github.com/mikro-orm/mikro-orm/commit/75653f0d857e74ab83f06290ffc8ed59f7e91f3c)), closes [#4160](https://github.com/mikro-orm/mikro-orm/issues/4160) * **core:** hydrate collection items when merging data in `factory.create` ([493d653](https://github.com/mikro-orm/mikro-orm/commit/493d653d84442cd854f3c6d1e67ce92d688f5924)), closes [#4173](https://github.com/mikro-orm/mikro-orm/issues/4173) * **core:** normalize zero in bigint type to string ([78a8e48](https://github.com/mikro-orm/mikro-orm/commit/78a8e48bec188fbe17d8b9deb4b623a4d1810a3b)), closes [#4159](https://github.com/mikro-orm/mikro-orm/issues/4159) * **core:** use JsonType automatically when `type: 'jsonb'` ([43cb6d7](https://github.com/mikro-orm/mikro-orm/commit/43cb6d70ed38694424fcc6a218a1a3063991de8a)) * **migrations:** do not interact with the database when snapshot exists ([48df462](https://github.com/mikro-orm/mikro-orm/commit/48df46219811e33c296ad3bd182a95702d3a2007)) * **mysql:** fix mapping of PK in `upsertMany` ([0f4cf85](https://github.com/mikro-orm/mikro-orm/commit/0f4cf85f8655326727f6fd27c6dbb66c606e922a)), closes [#4153](https://github.com/mikro-orm/mikro-orm/issues/4153) ### Features[​](#features-55 "Direct link to Features") * **migrator:** allow disabling logging via `migrations.silent` ([#4182](https://github.com/mikro-orm/mikro-orm/issues/4182)) ([4b778bf](https://github.com/mikro-orm/mikro-orm/commit/4b778bf2db55bdc678a13c7dd6c27c3d72fde97d)), closes [#4124](https://github.com/mikro-orm/mikro-orm/issues/4124) ### Performance Improvements[​](#performance-improvements-21 "Direct link to Performance Improvements") * **core:** populating many large 1 :M collections ([875d966](https://github.com/mikro-orm/mikro-orm/commit/875d966db9b4d4ea313709e0f1382f025599edbf)), closes [#4171](https://github.com/mikro-orm/mikro-orm/issues/4171) ## [5.6.15](https://github.com/mikro-orm/mikro-orm/compare/v5.6.14...v5.6.15) (2023-03-18)[​](#5615-2023-03-18 "Direct link to 5615-2023-03-18") ### Bug Fixes[​](#bug-fixes-111 "Direct link to Bug Fixes") * **core:** deduplicate columns in insert queries ([db734d6](https://github.com/mikro-orm/mikro-orm/commit/db734d69b23a97f1cca186dba6629b112d788b16)) * **core:** fix nested inlined embedded property hydration ([2bbcb47](https://github.com/mikro-orm/mikro-orm/commit/2bbcb477890fc87cb2a349922d83bfdb54f68b59)), closes [#4145](https://github.com/mikro-orm/mikro-orm/issues/4145) * **core:** fix snapshot of relation properties loaded via joined strategy ([6015f3f](https://github.com/mikro-orm/mikro-orm/commit/6015f3fb2b09ca920d0fbe3329733d3d5f8d134e)), closes [#4129](https://github.com/mikro-orm/mikro-orm/issues/4129) * **core:** respect explicit `unsigned` option ([#4126](https://github.com/mikro-orm/mikro-orm/issues/4126)) ([846a57d](https://github.com/mikro-orm/mikro-orm/commit/846a57dc3baffe8897065710a6368efd91985401)) * **sqlite:** fix detecting multi-line `returning` queries ([ba1a5fc](https://github.com/mikro-orm/mikro-orm/commit/ba1a5fc95c611ffd2c393e7dc8763255fa0ca6c7)), closes [#4133](https://github.com/mikro-orm/mikro-orm/issues/4133) ## [5.6.14](https://github.com/mikro-orm/mikro-orm/compare/v5.6.13...v5.6.14) (2023-03-12)[​](#5614-2023-03-12 "Direct link to 5614-2023-03-12") ### Bug Fixes[​](#bug-fixes-112 "Direct link to Bug Fixes") * **core:** allow comparing `{}` with `Object.create(null)` ([955895e](https://github.com/mikro-orm/mikro-orm/commit/955895ec9b29caf4172852efd3da90cef8d7d0f5)), closes [#4109](https://github.com/mikro-orm/mikro-orm/issues/4109) * **core:** assigning to reference properties inside embeddables ([ede04e6](https://github.com/mikro-orm/mikro-orm/commit/ede04e6d9c77f064268eb94937a64bfd4666e42c)), closes [#4106](https://github.com/mikro-orm/mikro-orm/issues/4106) * **core:** discover pivot entities automatically when specified by reference ([3ea4776](https://github.com/mikro-orm/mikro-orm/commit/3ea47760faa1bb1092be374105fe85f0ffb2408d)) * **core:** ensure `populate: true` supports nested relations inside M :N ([b42f0f3](https://github.com/mikro-orm/mikro-orm/commit/b42f0f3a54cb3e3f7146584caf4d34f200ccc195)) * **core:** extra update on a reference with 1:1 self-reference ([f2fa2bd](https://github.com/mikro-orm/mikro-orm/commit/f2fa2bd5c30d70f511009a8cbc20966587be46c5)), closes [#4121](https://github.com/mikro-orm/mikro-orm/issues/4121) * **core:** fix nested object merging in JSON properties ([694ef28](https://github.com/mikro-orm/mikro-orm/commit/694ef281abf970434f42c7b620bfb81b1c794815)), closes [#4101](https://github.com/mikro-orm/mikro-orm/issues/4101) * **core:** improve handling of complex pivot table entities ([45449c4](https://github.com/mikro-orm/mikro-orm/commit/45449c4fd263198fb6220267ab1070a38ca3ef03)), closes [#4083](https://github.com/mikro-orm/mikro-orm/issues/4083) * **postgres:** use explicit schema in table identifier when altering comments ([#4123](https://github.com/mikro-orm/mikro-orm/issues/4123)) ([60d96de](https://github.com/mikro-orm/mikro-orm/commit/60d96de64de7f01a4d9baab485046c7f7f43ee7c)), closes [#4108](https://github.com/mikro-orm/mikro-orm/issues/4108) * **query-builder:** ensure inner paginate query selects sub-queries used in orderBy ([22b7146](https://github.com/mikro-orm/mikro-orm/commit/22b7146cae14a3e153ed4d144f18de1fb6b8cc45)), closes [#4104](https://github.com/mikro-orm/mikro-orm/issues/4104) * **query-builder:** fix update query with auto-join of 1:1 owner ([0a053fe](https://github.com/mikro-orm/mikro-orm/commit/0a053fe8854a088be8262291f51697749e89cd05)), closes [#4122](https://github.com/mikro-orm/mikro-orm/issues/4122) ### Features[​](#features-56 "Direct link to Features") * **core:** allow skipping `convertToDatabaseValue` during hydration ([d1ce240](https://github.com/mikro-orm/mikro-orm/commit/d1ce2408306a9bdd805077ef1a3f9c561eefe982)), closes [#4120](https://github.com/mikro-orm/mikro-orm/issues/4120) * **migrations:** add `params` to the `Migration.execute` method ([f280e6d](https://github.com/mikro-orm/mikro-orm/commit/f280e6d0d39dcd5a087497c7d533bec79b32f7cb)), closes [#4099](https://github.com/mikro-orm/mikro-orm/issues/4099) ## [5.6.13](https://github.com/mikro-orm/mikro-orm/compare/v5.6.12...v5.6.13) (2023-03-01)[​](#5613-2023-03-01 "Direct link to 5613-2023-03-01") ### Bug Fixes[​](#bug-fixes-113 "Direct link to Bug Fixes") * **core:** fix deep assigning of collection items with complex composite keys ([95631f4](https://github.com/mikro-orm/mikro-orm/commit/95631f4234cfc943c215c11097a21df325a1709d)), closes [#4074](https://github.com/mikro-orm/mikro-orm/issues/4074) * **core:** fix diffing of JSON properties ([2e9a026](https://github.com/mikro-orm/mikro-orm/commit/2e9a02689adb7129f9671aa4038076d3504fa986)), closes [#4078](https://github.com/mikro-orm/mikro-orm/issues/4078) * **core:** log abstract entity names during discovery ([e721ad7](https://github.com/mikro-orm/mikro-orm/commit/e721ad757ecf6df7da466c589bce772f4589fc72)), closes [#4080](https://github.com/mikro-orm/mikro-orm/issues/4080) * **postgres:** use quoted schema+table name when dropping constraints ([#4079](https://github.com/mikro-orm/mikro-orm/issues/4079)) ([ff1dfb6](https://github.com/mikro-orm/mikro-orm/commit/ff1dfb69ff9841d45cb9ce78c37341748df47c08)) ## [5.6.12](https://github.com/mikro-orm/mikro-orm/compare/v5.6.11...v5.6.12) (2023-02-26)[​](#5612-2023-02-26 "Direct link to 5612-2023-02-26") ### Bug Fixes[​](#bug-fixes-114 "Direct link to Bug Fixes") * **core:** enforce select-in strategy for self-referencing eager relations ([cc07c6b](https://github.com/mikro-orm/mikro-orm/commit/cc07c6b3393e220da8afb7bec615b2fd553921ed)), closes [#4061](https://github.com/mikro-orm/mikro-orm/issues/4061) * **core:** ensure custom types are processed in `em.upsert/upsertMany/insertMany` ([53a08ac](https://github.com/mikro-orm/mikro-orm/commit/53a08acfa285edb0c9da7185a3de9c763361245d)), closes [#4070](https://github.com/mikro-orm/mikro-orm/issues/4070) * **core:** move repository cache to the EM fork ([05fabb9](https://github.com/mikro-orm/mikro-orm/commit/05fabb9c3b06fa8a811a9ef475281c0df5836ee2)), closes [#3074](https://github.com/mikro-orm/mikro-orm/issues/3074) * **mongo:** move $fulltext from $and to top level ([#4066](https://github.com/mikro-orm/mikro-orm/issues/4066)) ([680a99c](https://github.com/mikro-orm/mikro-orm/commit/680a99c19a5636e9cdb3ec06ec5d4b185f077eeb)), closes [#4065](https://github.com/mikro-orm/mikro-orm/issues/4065) * **mysql:** fix reloading of db defaults for complex composite PKs ([8dcc1bd](https://github.com/mikro-orm/mikro-orm/commit/8dcc1bd5a9039475f97d1d817e13d1d32af5271d)), closes [#4062](https://github.com/mikro-orm/mikro-orm/issues/4062) ## [5.6.11](https://github.com/mikro-orm/mikro-orm/compare/v5.6.10...v5.6.11) (2023-02-17)[​](#5611-2023-02-17 "Direct link to 5611-2023-02-17") ### Bug Fixes[​](#bug-fixes-115 "Direct link to Bug Fixes") * **core:** do not process custom types twice in `em.upsertMany` ([3928e78](https://github.com/mikro-orm/mikro-orm/commit/3928e789d9efec0def8fd62f24d11b020a70ca25)), closes [#3787](https://github.com/mikro-orm/mikro-orm/issues/3787) * **core:** fix mapping of `null` in datetime columns ([73e483a](https://github.com/mikro-orm/mikro-orm/commit/73e483ae7bb821a6abd188803765ed3ff0b25775)), closes [#4057](https://github.com/mikro-orm/mikro-orm/issues/4057) * **core:** infer custom type even if there is explicit `columnType` option ([a901112](https://github.com/mikro-orm/mikro-orm/commit/a9011124fbcc5b5e1db9a655fa37f290a2d7771f)) * **schema:** fix merging of primary keys from base entity ([c40e15c](https://github.com/mikro-orm/mikro-orm/commit/c40e15ca5c500878acd047a2f22adbe3e83d50a9)), closes [#4051](https://github.com/mikro-orm/mikro-orm/issues/4051) ## [5.6.10](https://github.com/mikro-orm/mikro-orm/compare/v5.6.9...v5.6.10) (2023-02-17)[​](#5610-2023-02-17 "Direct link to 5610-2023-02-17") ### Bug Fixes[​](#bug-fixes-116 "Direct link to Bug Fixes") * **core:** convert custom types in delete queries from orphan removal ([b32df88](https://github.com/mikro-orm/mikro-orm/commit/b32df88db95e4aa3da703026b25d9dc7b78eca3f)), closes [#4033](https://github.com/mikro-orm/mikro-orm/issues/4033) * **core:** convert custom types when snapshotting scalar composite keys ([391732e](https://github.com/mikro-orm/mikro-orm/commit/391732ee9fd35d1f245f2420f99d58bc986a6375)), closes [#3988](https://github.com/mikro-orm/mikro-orm/issues/3988) * **core:** map returned values correctly after batch insert ([a61a84f](https://github.com/mikro-orm/mikro-orm/commit/a61a84f82caa0185bdc809fb7c76854bdf259811)) * **core:** map values from returning statement in `em.upsert` ([bed72fe](https://github.com/mikro-orm/mikro-orm/commit/bed72fe20ff236a059756a6b20f21fc13bed7d2a)), closes [#4020](https://github.com/mikro-orm/mikro-orm/issues/4020) * **core:** use types from `discovery.getMappedType` on runtime too ([2f682e3](https://github.com/mikro-orm/mikro-orm/commit/2f682e33587bf31c5020d66b1d963d60cbc39cac)), closes [#4042](https://github.com/mikro-orm/mikro-orm/issues/4042) ### Performance Improvements[​](#performance-improvements-22 "Direct link to Performance Improvements") * **core:** improve result mapping and snapshotting ([#4053](https://github.com/mikro-orm/mikro-orm/issues/4053)) ([8bb0268](https://github.com/mikro-orm/mikro-orm/commit/8bb0268a6d67143b0aa4dd0a5c6a6fb1bd0f8374)) ## [5.6.9](https://github.com/mikro-orm/mikro-orm/compare/v5.6.8...v5.6.9) (2023-02-10)[​](#569-2023-02-10 "Direct link to 569-2023-02-10") ### Bug Fixes[​](#bug-fixes-117 "Direct link to Bug Fixes") * **core:** add missing `repo.upsertMany` shortcut ([c101d51](https://github.com/mikro-orm/mikro-orm/commit/c101d51dcb550acb4705653a42bfd3066b2fd347)) * **core:** do not serialize JSON values twice ([f06eeb0](https://github.com/mikro-orm/mikro-orm/commit/f06eeb02a9e9038f107a338b1a51a5db1973e83d)) * **core:** do not snapshot missing embedded properties as `undefined` ([4ad4cdf](https://github.com/mikro-orm/mikro-orm/commit/4ad4cdf7a8a081b4bfa1e14695bd446dac49d9e1)) * **core:** ensure json type is recognized with `type: 'jsonb'` ([e1f82bc](https://github.com/mikro-orm/mikro-orm/commit/e1f82bc5b63ea7547685244fa42a7f612250b909)), closes [#3998](https://github.com/mikro-orm/mikro-orm/issues/3998) * **core:** improve handling of not managed references created via `ref()/rel()` ([2e814e8](https://github.com/mikro-orm/mikro-orm/commit/2e814e89e78a3ac0d5dcedf88d9acdb1be06e287)), closes [#4027](https://github.com/mikro-orm/mikro-orm/issues/4027) * **query-builder:** respect `qb.joinAndSelect` when serializing ([4025869](https://github.com/mikro-orm/mikro-orm/commit/4025869c5183899b459c6dc7a88d8b60cd4e2689)), closes [#4034](https://github.com/mikro-orm/mikro-orm/issues/4034) [#3812](https://github.com/mikro-orm/mikro-orm/issues/3812) ### Features[​](#features-57 "Direct link to Features") * **core:** optionally log if entity is managed or not ([68e073b](https://github.com/mikro-orm/mikro-orm/commit/68e073bc07281ebbfe0cef4008a3c2ff0006d953)) * **migrations:** add `cjs` option for emit ([#4016](https://github.com/mikro-orm/mikro-orm/issues/4016)) ([d5cfa22](https://github.com/mikro-orm/mikro-orm/commit/d5cfa2239e7a2686b6d820371e9dd06920cf75fd)), closes [#4005](https://github.com/mikro-orm/mikro-orm/issues/4005) ## [5.6.8](https://github.com/mikro-orm/mikro-orm/compare/v5.6.7...v5.6.8) (2023-01-25)[​](#568-2023-01-25 "Direct link to 568-2023-01-25") ### Bug Fixes[​](#bug-fixes-118 "Direct link to Bug Fixes") * **mysql:** fix reloading of database defaults for complex composite PKs ([d36af00](https://github.com/mikro-orm/mikro-orm/commit/d36af00514d96d1060fb18e68ac66b1117e706cb)), closes [#3965](https://github.com/mikro-orm/mikro-orm/issues/3965) * **reflection:** do not rehydrate metadata cache for enum items unless needed ([e4761b6](https://github.com/mikro-orm/mikro-orm/commit/e4761b66f556476544ebbed240178e6cfc582a99)), closes [#3955](https://github.com/mikro-orm/mikro-orm/issues/3955) ### Features[​](#features-58 "Direct link to Features") * **core:** add `forceConstructor` option to `@Entity()` decorator ([c89b4af](https://github.com/mikro-orm/mikro-orm/commit/c89b4af628e8fc895f4dfd49a8ccb53692979808)) * **core:** add `hydrate` option to `@Property()` decorator ([f4ba092](https://github.com/mikro-orm/mikro-orm/commit/f4ba0928d8cf6109b9c88b2220ec8eac8cb6981c)), closes [#3936](https://github.com/mikro-orm/mikro-orm/issues/3936) * **core:** allow filtering in `Collection.loadCount()` ([#3958](https://github.com/mikro-orm/mikro-orm/issues/3958)) ([08ea320](https://github.com/mikro-orm/mikro-orm/commit/08ea320f3c13e73db9e995eaf5b9b22a45f33fe9)), closes [#3527](https://github.com/mikro-orm/mikro-orm/issues/3527) * **migrations-mongo:** replace backslash in the glob to fix windows support ([d904ba0](https://github.com/mikro-orm/mikro-orm/commit/d904ba0039847638dd8f1b3ecb33b594fdddd812)), closes [#3957](https://github.com/mikro-orm/mikro-orm/issues/3957) * **mongo:** add missing `MongoEntityRepository.getCollection()` shortcut ([5e4e126](https://github.com/mikro-orm/mikro-orm/commit/5e4e1266eb704d458c98bed902c6424d2e358b70)), closes [#3951](https://github.com/mikro-orm/mikro-orm/issues/3951) ## [5.6.7](https://github.com/mikro-orm/mikro-orm/compare/v5.6.6...v5.6.7) (2023-01-13)[​](#567-2023-01-13 "Direct link to 567-2023-01-13") ### Bug Fixes[​](#bug-fixes-119 "Direct link to Bug Fixes") * **core:** ensure propagation during hydration dont produce extra updates ([88595bd](https://github.com/mikro-orm/mikro-orm/commit/88595bdf450d2b93fd9a1c18449fc27ee7229738)), closes [#3941](https://github.com/mikro-orm/mikro-orm/issues/3941) * **core:** propagate ManyToOne only to matching collections (STI) ([#3940](https://github.com/mikro-orm/mikro-orm/issues/3940)) ([8ff7ed1](https://github.com/mikro-orm/mikro-orm/commit/8ff7ed193738cf518b54995eeb1f6a5bd59f052f)), closes [#3939](https://github.com/mikro-orm/mikro-orm/issues/3939) * **core:** respect `mapToPk` during hydration with custom type FK ([75d05ee](https://github.com/mikro-orm/mikro-orm/commit/75d05ee7ed57107072a44c29be24a64ff27e6db0)), closes [#3921](https://github.com/mikro-orm/mikro-orm/issues/3921) ### Features[​](#features-59 "Direct link to Features") * **seeder:** expose `Factory.makeEntity` method that does not call `em.persist()` ([bb8f1b0](https://github.com/mikro-orm/mikro-orm/commit/bb8f1b03f7c25811f87311e997646bf793b52a13)), closes [#3932](https://github.com/mikro-orm/mikro-orm/issues/3932) ## [5.6.6](https://github.com/mikro-orm/mikro-orm/compare/v5.6.5...v5.6.6) (2023-01-10)[​](#566-2023-01-10 "Direct link to 566-2023-01-10") ### Bug Fixes[​](#bug-fixes-120 "Direct link to Bug Fixes") * **core:** do not allow functions and symbols in `FilterQuery` ([85b1fc1](https://github.com/mikro-orm/mikro-orm/commit/85b1fc13399a04539f8dcfa31ef12aaef540aa95)), closes [#3928](https://github.com/mikro-orm/mikro-orm/issues/3928) * **core:** make `FilterQuery` strict again! ([5427097](https://github.com/mikro-orm/mikro-orm/commit/5427097c9987e3d428c43df12373dcc4496b38f8)) ## [5.6.5](https://github.com/mikro-orm/mikro-orm/compare/v5.6.4...v5.6.5) (2023-01-09)[​](#565-2023-01-09 "Direct link to 565-2023-01-09") ### Bug Fixes[​](#bug-fixes-121 "Direct link to Bug Fixes") * **core:** do not fail on serialization when POJO instead of embeddable instance found ([c8de84b](https://github.com/mikro-orm/mikro-orm/commit/c8de84babe28c13eaf3efb62e27a0fea3337f9ac)) * **core:** make serialization of embedded properties support `null` instead of value ([3006507](https://github.com/mikro-orm/mikro-orm/commit/3006507132b7ba465430af6e0f918179f08ab5c6)), closes [#3906](https://github.com/mikro-orm/mikro-orm/issues/3906) * **entity-generator:** use table name instead of class name in `EntitySchema` ([#3916](https://github.com/mikro-orm/mikro-orm/issues/3916)) ([84d9407](https://github.com/mikro-orm/mikro-orm/commit/84d9407b75137b1e69d66d257fb0a72ab2229558)), closes [#3915](https://github.com/mikro-orm/mikro-orm/issues/3915) ### Features[​](#features-60 "Direct link to Features") * **cli:** add check for migrations command ([#3923](https://github.com/mikro-orm/mikro-orm/issues/3923)) ([a0ac946](https://github.com/mikro-orm/mikro-orm/commit/a0ac946be35e6dd5bebd263036ce10c068a81af6)) * **core:** add `em.insertMany()` ([5d1565d](https://github.com/mikro-orm/mikro-orm/commit/5d1565dca46f91058720b6ad8df1b373bdb8ff65)) ## [5.6.4](https://github.com/mikro-orm/mikro-orm/compare/v5.6.3...v5.6.4) (2023-01-04)[​](#564-2023-01-04 "Direct link to 564-2023-01-04") ### Bug Fixes[​](#bug-fixes-122 "Direct link to Bug Fixes") * **core:** improve inference of driver exported `MikroORM.init()` ([497f274](https://github.com/mikro-orm/mikro-orm/commit/497f27451bbca37c7dd9222716257692724d3a0d)) * **core:** respect transaction context in `em.execute()` ([832105d](https://github.com/mikro-orm/mikro-orm/commit/832105d23de63df29010ccf62f4ec7a67955a47f)), closes [#3896](https://github.com/mikro-orm/mikro-orm/issues/3896) * **mongo:** register serialized PK get/set pair only when explicitly requested ([7004100](https://github.com/mikro-orm/mikro-orm/commit/700410075e0ff83207c17fe6a0413cd534208472)), closes [#3900](https://github.com/mikro-orm/mikro-orm/issues/3900) * **mongo:** respect field names in batch update conditions ([3466c86](https://github.com/mikro-orm/mikro-orm/commit/3466c86e9bf6bbffea1f661186c854b9d1c976e9)), closes [#3897](https://github.com/mikro-orm/mikro-orm/issues/3897) ### Features[​](#features-61 "Direct link to Features") * **cli:** check database connection in debug command ([#3875](https://github.com/mikro-orm/mikro-orm/issues/3875)) ([3523410](https://github.com/mikro-orm/mikro-orm/commit/35234100b68cc1e56e4149821f2cd664f09eb32a)), closes [#3855](https://github.com/mikro-orm/mikro-orm/issues/3855) * **core:** add getResultAndCount() ([#3891](https://github.com/mikro-orm/mikro-orm/issues/3891)) ([11956c8](https://github.com/mikro-orm/mikro-orm/commit/11956c8bc31e140ba73353eb1057d91e001986c5)), closes [#3885](https://github.com/mikro-orm/mikro-orm/issues/3885) ## [5.6.3](https://github.com/mikro-orm/mikro-orm/compare/v5.6.2...v5.6.3) (2022-12-28)[​](#563-2022-12-28 "Direct link to 563-2022-12-28") ### Bug Fixes[​](#bug-fixes-123 "Direct link to Bug Fixes") * **core:** delay snapshotting of entity state to fix differences with joined strategy ([cbf62fa](https://github.com/mikro-orm/mikro-orm/commit/cbf62faa61c376c9065ff30005ada442c90fb158)), closes [#3876](https://github.com/mikro-orm/mikro-orm/issues/3876) * **core:** do not convert custom mapped type twice in `Reference.createFromPK` ([7dfff45](https://github.com/mikro-orm/mikro-orm/commit/7dfff45cb09cedee994070fe432f1b4821b73494)), closes [#3878](https://github.com/mikro-orm/mikro-orm/issues/3878) ## [5.6.2](https://github.com/mikro-orm/mikro-orm/compare/v5.6.1...v5.6.2) (2022-12-25)[​](#562-2022-12-25 "Direct link to 562-2022-12-25") ### Bug Fixes[​](#bug-fixes-124 "Direct link to Bug Fixes") * **core:** fix assignability of `Loaded` type to naked entity ([e574924](https://github.com/mikro-orm/mikro-orm/commit/e574924fa6a1559d1dd5a7331c29e5205b77921f)), closes [#3865](https://github.com/mikro-orm/mikro-orm/issues/3865) * **core:** respect `*` in partial loading with joined strategy ([7781f84](https://github.com/mikro-orm/mikro-orm/commit/7781f84537eac9a53d16ff2514bcaa051ece23c5)), closes [#3868](https://github.com/mikro-orm/mikro-orm/issues/3868) ### Features[​](#features-62 "Direct link to Features") * **core:** validate bidirectional M :N with `pivotEntity` ([5e793a2](https://github.com/mikro-orm/mikro-orm/commit/5e793a2ef956ea9bf324c950c5e975f5d75ceb99)), closes [#3860](https://github.com/mikro-orm/mikro-orm/issues/3860) * **core:** validate FK as PK is always an owning side ([330c4e2](https://github.com/mikro-orm/mikro-orm/commit/330c4e28b14df245d189d0e558cc5d68cfa348f2)), closes [#3869](https://github.com/mikro-orm/mikro-orm/issues/3869) ## [5.6.1](https://github.com/mikro-orm/mikro-orm/compare/v5.6.0...v5.6.1) (2022-12-20)[​](#561-2022-12-20 "Direct link to 561-2022-12-20") ### Bug Fixes[​](#bug-fixes-125 "Direct link to Bug Fixes") * **core:** allow adding array of refs to collection ([#3859](https://github.com/mikro-orm/mikro-orm/issues/3859)) ([0ce85e9](https://github.com/mikro-orm/mikro-orm/commit/0ce85e92caa9d115956237281f7bfaf43dd54139)) * **core:** clone event manager when forking in `em.transactional` ([0e523b3](https://github.com/mikro-orm/mikro-orm/commit/0e523b3fa59a7e26faad9393465c6b2b609f9643)), closes [#3857](https://github.com/mikro-orm/mikro-orm/issues/3857) * **core:** do not unset non-null relations when propagating remove operation ([69a7f94](https://github.com/mikro-orm/mikro-orm/commit/69a7f9469250f2951e8e19b66bb92b444f2dd7fe)), closes [#3854](https://github.com/mikro-orm/mikro-orm/issues/3854) * **core:** fix compiled functions when relation property uses hyphens ([22350bd](https://github.com/mikro-orm/mikro-orm/commit/22350bdb1ce70163de8fe6dbd6a34cb3e372a2cc)), closes [#3813](https://github.com/mikro-orm/mikro-orm/issues/3813) * **core:** fix populating relation with composite FK as primary key ([b27578f](https://github.com/mikro-orm/mikro-orm/commit/b27578ffd1f6185022f249a69e33b86791809aaf)), closes [#3844](https://github.com/mikro-orm/mikro-orm/issues/3844) * **core:** improve inference in `em.findX()` methods ([fcb1739](https://github.com/mikro-orm/mikro-orm/commit/fcb17392ca8270926b6f725010c0f181243fb018)) * **core:** propagation with nullable 1:1 relation ([#3851](https://github.com/mikro-orm/mikro-orm/issues/3851)) ([d77c370](https://github.com/mikro-orm/mikro-orm/commit/d77c3704561ee0e2a4cb01f40e1cb36f2e1f89e4)), closes [#3850](https://github.com/mikro-orm/mikro-orm/issues/3850) * **core:** remove `readonly` modifier from `Populate` type ([7b2dfb9](https://github.com/mikro-orm/mikro-orm/commit/7b2dfb91cd791fe3f3bcfc1d18520804dafe2907)) * **mariadb:** do not force date strings ([8861354](https://github.com/mikro-orm/mikro-orm/commit/8861354ca378a70ec6ff2f1bf926c5fb110a7643)), closes [#3853](https://github.com/mikro-orm/mikro-orm/issues/3853) * **postgres:** compare only simplified versions of check constraints ([0fd8530](https://github.com/mikro-orm/mikro-orm/commit/0fd853001334032b71a0ff42fbdb585655717216)), closes [#3827](https://github.com/mikro-orm/mikro-orm/issues/3827) * **postgres:** ignore internal timescale schemas automatically ([85d9083](https://github.com/mikro-orm/mikro-orm/commit/85d9083766ccff50680517289c2a28e0512e02e5)) ## [5.6.0](https://github.com/mikro-orm/mikro-orm/compare/v5.5.3...v5.6.0) (2022-12-09)[​](#560-2022-12-09 "Direct link to 560-2022-12-09") ### Bug Fixes[​](#bug-fixes-126 "Direct link to Bug Fixes") * **core:** deprecate `type` option in favour of driver exports ([7180f23](https://github.com/mikro-orm/mikro-orm/commit/7180f23e2d97a0f1d9d208a91e5b0230d1712acd)), closes [#3743](https://github.com/mikro-orm/mikro-orm/issues/3743) * **core:** do not mark entities as populated via `em.merge()` ([bfa4962](https://github.com/mikro-orm/mikro-orm/commit/bfa4962764b2e65cb9ee559e98e38035063c1e43)), closes [#3812](https://github.com/mikro-orm/mikro-orm/issues/3812) * **core:** do not process mapped types twice in `em.upsert()` ([434d417](https://github.com/mikro-orm/mikro-orm/commit/434d417b6a38a4cd8293882061067cf6d89ba003)), closes [#3787](https://github.com/mikro-orm/mikro-orm/issues/3787) * **core:** ensure correct result in `ChangeSet.getPrimaryKey(true)` ([2e74a34](https://github.com/mikro-orm/mikro-orm/commit/2e74a3445e5e42d4fb1a11bc1b1212b5099f58c3)), closes [#3737](https://github.com/mikro-orm/mikro-orm/issues/3737) * **core:** fix query execution inside hooks sometimes hanging ([d68b9bd](https://github.com/mikro-orm/mikro-orm/commit/d68b9bd6721b7e2a715cea65b20c7db03b51ff93)) * **core:** make `ChangeSet.getPrimaryKey()` response stable ([d32c956](https://github.com/mikro-orm/mikro-orm/commit/d32c956aa3ff66796e4b48b060242195b223c162)) * **core:** remove `readonly` from properties of `FilterQuery` ([2a2a13d](https://github.com/mikro-orm/mikro-orm/commit/2a2a13d96a443f1b3165d6c43a61fba9e3b019e7)), closes [#3836](https://github.com/mikro-orm/mikro-orm/issues/3836) * **core:** return `Ref & LoadedReference` from `ref()` ([c85e507](https://github.com/mikro-orm/mikro-orm/commit/c85e5070e6aeabea457c22d3cc95e0cb5270f062)), closes [#3840](https://github.com/mikro-orm/mikro-orm/issues/3840) * **core:** serialize not managed relations as populated ([89b4dab](https://github.com/mikro-orm/mikro-orm/commit/89b4dab31bdac52e1a6a4a281dd3bbd50b3745ec)), closes [#3788](https://github.com/mikro-orm/mikro-orm/issues/3788) * **core:** support `hidden` flag on primary keys ([4935505](https://github.com/mikro-orm/mikro-orm/commit/49355058b1032f217292a88c3109cd746b52e9e2)) * **embeddables:** respect explicit `null` only for object embeddables ([6e0bedf](https://github.com/mikro-orm/mikro-orm/commit/6e0bedf5610b6e423605d250ed2ac1a15a63381e)), closes [#3772](https://github.com/mikro-orm/mikro-orm/issues/3772) * **mysql:** ensure bigint columns are mapped to string ([d3d50ba](https://github.com/mikro-orm/mikro-orm/commit/d3d50ba6da8d4c244bc45387f56a97b7706ef6b1)), closes [#3739](https://github.com/mikro-orm/mikro-orm/issues/3739) * **mysql:** respect `auto_increment_increment` when batch inserting ([516db6d](https://github.com/mikro-orm/mikro-orm/commit/516db6d3e97b6309d55e8a73a73bb85144af1196)), closes [#3828](https://github.com/mikro-orm/mikro-orm/issues/3828) * **postgres:** quote array literal items containing a comma ([5ffa81c](https://github.com/mikro-orm/mikro-orm/commit/5ffa81c02ac01cc3420ca345b05835e331c879e9)), closes [#3810](https://github.com/mikro-orm/mikro-orm/issues/3810) * **postgres:** use `postgres` as the management db name + allow override ([eab1668](https://github.com/mikro-orm/mikro-orm/commit/eab16681681b13b40f183dc8ec6b26e3171edc11)), closes [#3769](https://github.com/mikro-orm/mikro-orm/issues/3769) * **query-builder:** fix cloning QB in some cases ([c3b4c20](https://github.com/mikro-orm/mikro-orm/commit/c3b4c2089d80a2d1431cc663e767b01be6fe891b)), closes [#3720](https://github.com/mikro-orm/mikro-orm/issues/3720) * **query-builder:** fix querying for a composite FK when target is joined ([dec4c9c](https://github.com/mikro-orm/mikro-orm/commit/dec4c9c46b1ecf3105f78b77a698c30ef8670c14)), closes [#3738](https://github.com/mikro-orm/mikro-orm/issues/3738) * **query-builder:** respect case-insensitive regexp flag ([1a1d381](https://github.com/mikro-orm/mikro-orm/commit/1a1d381cfe30bd97a038109e7d2e5ea9ce660062)), closes [#3801](https://github.com/mikro-orm/mikro-orm/issues/3801) * **query-build:** fix query execution inside hooks sometimes hanging ([dba6ce2](https://github.com/mikro-orm/mikro-orm/commit/dba6ce299341d4345243083313f129e8a3da43ac)) * **schema:** do not cache knex instance ([dc00374](https://github.com/mikro-orm/mikro-orm/commit/dc00374585a0ff3f7686a422143c5c128ddbb87f)), closes [#3713](https://github.com/mikro-orm/mikro-orm/issues/3713) * **schema:** ensure database exists before dropping schema ([fd4c416](https://github.com/mikro-orm/mikro-orm/commit/fd4c416472ca5b25dd353f324e86fd9ce59521db)), closes [#3713](https://github.com/mikro-orm/mikro-orm/issues/3713) * **ts:** allow string dates in `em.create()` ([d0607d5](https://github.com/mikro-orm/mikro-orm/commit/d0607d50899fc90c899f28941f5b41c0b3bc8ace)) ### Features[​](#features-63 "Direct link to Features") * **cli:** added option to generate cache via ts-node ([#3796](https://github.com/mikro-orm/mikro-orm/issues/3796)) ([268bd68](https://github.com/mikro-orm/mikro-orm/commit/268bd681993edd5a8fd754658a96c26d5c970350)), closes [#3795](https://github.com/mikro-orm/mikro-orm/discussions/3795) * **core:** add `em.upsertMany` ([#3825](https://github.com/mikro-orm/mikro-orm/issues/3825)) ([83ac12a](https://github.com/mikro-orm/mikro-orm/commit/83ac12a4d517b199a2efd364f61356cc6b08407a)) * **core:** add `serialize()` helper for explicit serialization ([#3728](https://github.com/mikro-orm/mikro-orm/issues/3728)) ([f22cd6f](https://github.com/mikro-orm/mikro-orm/commit/f22cd6f77c20c044b1ece0b988ea6055a917eece)) * **core:** allow creating entity from PK via `rel()` and `ref()` ([#3837](https://github.com/mikro-orm/mikro-orm/issues/3837)) ([72ca8e7](https://github.com/mikro-orm/mikro-orm/commit/72ca8e77cb3239e561d7ab187be0c149792a8c80)), closes [#3835](https://github.com/mikro-orm/mikro-orm/issues/3835) * **core:** ensure database exists automatically ([#3830](https://github.com/mikro-orm/mikro-orm/issues/3830)) ([f92da01](https://github.com/mikro-orm/mikro-orm/commit/f92da01101fbb212dec5d8648a51068da7122ea8)) * **core:** introduce ORM extensions ([#3773](https://github.com/mikro-orm/mikro-orm/issues/3773)) ([0f36967](https://github.com/mikro-orm/mikro-orm/commit/0f36967d3c227465ea9c23aa8f290cd8fe383bad)) ### Performance Improvements[​](#performance-improvements-23 "Direct link to Performance Improvements") * **core:** never clone Platform and EntityMetadata instances ([9e05104](https://github.com/mikro-orm/mikro-orm/commit/9e051043fafdbc415d7f6f1306261b351397a086)), closes [#3720](https://github.com/mikro-orm/mikro-orm/issues/3720) ## [5.5.3](https://github.com/mikro-orm/mikro-orm/compare/v5.5.2...v5.5.3) (2022-11-10)[​](#553-2022-11-10 "Direct link to 553-2022-11-10") ### Bug Fixes[​](#bug-fixes-127 "Direct link to Bug Fixes") * **core:** respect filters when loading m :n relations ([#3716](https://github.com/mikro-orm/mikro-orm/issues/3716)) ([86a65a7](https://github.com/mikro-orm/mikro-orm/commit/86a65a77cbfb8909511cb3bf269517feb2921e06)) * **postgres:** fix ensuring database exists ([d23dde0](https://github.com/mikro-orm/mikro-orm/commit/d23dde098b691741f76b17176d97a057d22c4c8a)), closes [#3713](https://github.com/mikro-orm/mikro-orm/issues/3713) ### Features[​](#features-64 "Direct link to Features") * **mongo:** allow passing transaction options to the mongo client ([d52c747](https://github.com/mikro-orm/mikro-orm/commit/d52c747156b59f14f0b2883ac9615c5b1a85bea0)), closes [#3703](https://github.com/mikro-orm/mikro-orm/issues/3703) ### Performance Improvements[​](#performance-improvements-24 "Direct link to Performance Improvements") * **core:** redefine the internal `__helper` getter with a static value ([77d0549](https://github.com/mikro-orm/mikro-orm/commit/77d05495478705b8b5b15bbc6fbb9080361899ab)) ## [5.5.2](https://github.com/mikro-orm/mikro-orm/compare/v5.5.1...v5.5.2) (2022-11-07)[​](#552-2022-11-07 "Direct link to 552-2022-11-07") ### Bug Fixes[​](#bug-fixes-128 "Direct link to Bug Fixes") * **core:** prefer custom pivot entity for inference of FK names ([08a7dc2](https://github.com/mikro-orm/mikro-orm/commit/08a7dc2ed8f64ede8217b6f46ff22c166c488d92)), closes [#3626](https://github.com/mikro-orm/mikro-orm/issues/3626) * **knex:** always skip virtual properties in returning clause ([#3699](https://github.com/mikro-orm/mikro-orm/issues/3699)) ([c084dde](https://github.com/mikro-orm/mikro-orm/commit/c084dde32860485f6d63872effcaa76b2d35aed1)) ## [5.5.1](https://github.com/mikro-orm/mikro-orm/compare/v5.5.0...v5.5.1) (2022-11-05)[​](#551-2022-11-05 "Direct link to 551-2022-11-05") ### Bug Fixes[​](#bug-fixes-129 "Direct link to Bug Fixes") * **core:** compare original entity data when checking for unique props ([53ff984](https://github.com/mikro-orm/mikro-orm/commit/53ff984723c905a0f7dc5d27b2941b663d9d41cc)), closes [#3644](https://github.com/mikro-orm/mikro-orm/issues/3644) * **core:** fix `em.upsert()` when entity is already in context ([f590b79](https://github.com/mikro-orm/mikro-orm/commit/f590b796684cca88c055c8fd3234f3cb9ca85a10)), closes [#3667](https://github.com/mikro-orm/mikro-orm/issues/3667) * **core:** fix comparing empty arrays ([be4cdf3](https://github.com/mikro-orm/mikro-orm/commit/be4cdf312f25a01df686f5137340726e92924a0e)), closes [#3694](https://github.com/mikro-orm/mikro-orm/issues/3694) * **core:** fix orphan removal for collections of complex/nested composite keys ([925c1d2](https://github.com/mikro-orm/mikro-orm/commit/925c1d23ada128a8429223c14811d5357f43f2dc)), closes [#3666](https://github.com/mikro-orm/mikro-orm/issues/3666) * **core:** fix querying for a complex composite key via inverse side ([b99e7bb](https://github.com/mikro-orm/mikro-orm/commit/b99e7bb4d6dd1c0657ea0ddf28fb0c3a1986e5b7)), closes [#3669](https://github.com/mikro-orm/mikro-orm/issues/3669) * **core:** handle `$fulltext` search correctly in nested queries ([9a2f535](https://github.com/mikro-orm/mikro-orm/commit/9a2f5350df3101f67c5609aaf4bde0cc6cd17a61)), closes [#3696](https://github.com/mikro-orm/mikro-orm/issues/3696) * **core:** improve detection of entity file path via stack trace ([d329d32](https://github.com/mikro-orm/mikro-orm/commit/d329d322f4264f5e97ddc658fdc4ce240f8c7526)), closes [#3668](https://github.com/mikro-orm/mikro-orm/issues/3668) * **core:** improve propagation of changes to 1:1 relations ([389b4a2](https://github.com/mikro-orm/mikro-orm/commit/389b4a2a750a45ecb9806640613de016132d2dfa)), closes [#3614](https://github.com/mikro-orm/mikro-orm/issues/3614) * **embeddables:** support partial loading hints ([0c33e00](https://github.com/mikro-orm/mikro-orm/commit/0c33e000082dc9f6c585648da3156825c38790cc)), closes [#3673](https://github.com/mikro-orm/mikro-orm/issues/3673) * **knex:** ensure virtual properties are never part of `returning` clause ([35d51fe](https://github.com/mikro-orm/mikro-orm/commit/35d51fecff9479f3d704bfcffa90d4fd5dcaf21a)), closes [#3664](https://github.com/mikro-orm/mikro-orm/issues/3664) * **postgres:** fix ensuring database exists when `postgres` database does not exist ([b1a867d](https://github.com/mikro-orm/mikro-orm/commit/b1a867d27697f0f2cf4d1a747c15d1773b8a0f86)), closes [#3671](https://github.com/mikro-orm/mikro-orm/issues/3671) * **reflection:** fix reflection of embedded array types ([786ba42](https://github.com/mikro-orm/mikro-orm/commit/786ba4281b12ebe089394ec64b32653bfaae5013)), closes [#3690](https://github.com/mikro-orm/mikro-orm/issues/3690) * **reflection:** improve detection of array properties ([8f8f820](https://github.com/mikro-orm/mikro-orm/commit/8f8f820ca6e60937e4da82825f9afba9087459ee)), closes [#3690](https://github.com/mikro-orm/mikro-orm/issues/3690) ### Features[​](#features-65 "Direct link to Features") * **core:** add `em.repo()` shortcut ([feebd7c](https://github.com/mikro-orm/mikro-orm/commit/feebd7c80096a0b497f025f4f909eccd0ae05e4c)) * **core:** add `EntityOptions.repository` shortcut ([2cbb129](https://github.com/mikro-orm/mikro-orm/commit/2cbb129f5efab59d607908c891b55cc5e03f8020)) * **core:** add `EntityRepository.upsert()` shortcut ([31d6d77](https://github.com/mikro-orm/mikro-orm/commit/31d6d77c65dcf9ad3bb782af59f3a919845e531c)) * **core:** add `ref` alias for `wrappedReference` relation property option ([249a407](https://github.com/mikro-orm/mikro-orm/commit/249a4074e3367213898ed8c6fd26cc874ae1d7cf)) * **core:** add `Rel` and `Ref` relation types ([44acefb](https://github.com/mikro-orm/mikro-orm/commit/44acefb6ca538788f2c8d89e43755571ad747cfd)) * **core:** add context param to `Type.convertToDatabaseValue()` ([a933e98](https://github.com/mikro-orm/mikro-orm/commit/a933e98e98f366014e1a5af2c1444aaf330a09a0)), closes [#3567](https://github.com/mikro-orm/mikro-orm/issues/3567) * **core:** allow using second argument of `@OneToOne` as options ([115462d](https://github.com/mikro-orm/mikro-orm/commit/115462db343276fa3ae4ddcd68f8e27c2647b737)) * **core:** propagate parent entity to collection item payload in `assign` ([6045511](https://github.com/mikro-orm/mikro-orm/commit/6045511700321d953035ddab21ac98b96640358f)), closes [#3654](https://github.com/mikro-orm/mikro-orm/issues/3654) * **core:** propagate parent entity to collection item payload in `create` ([bb9f8d9](https://github.com/mikro-orm/mikro-orm/commit/bb9f8d90ec695a941cc12382e43b3d5510be5fe0)), closes [#3654](https://github.com/mikro-orm/mikro-orm/issues/3654) * **core:** support composite unique keys in `em.upsert()` ([3cf79d6](https://github.com/mikro-orm/mikro-orm/commit/3cf79d6e583fc8c10549af0237d4d77e3eaa404d)), closes [#3656](https://github.com/mikro-orm/mikro-orm/issues/3656) ## [5.5.0](https://github.com/mikro-orm/mikro-orm/compare/v5.4.2...v5.5.0) (2022-10-23)[​](#550-2022-10-23 "Direct link to 550-2022-10-23") ### Bug Fixes[​](#bug-fixes-130 "Direct link to Bug Fixes") * **cli:** fix using `npx --workspace` with `mikro-orm-esm` ([#3560](https://github.com/mikro-orm/mikro-orm/issues/3560)) ([64777af](https://github.com/mikro-orm/mikro-orm/commit/64777af47619435808dfe3aeb492cb97701d1b74)) * **cli:** improve success message of `schema:update/drop` commands ([11d0fd9](https://github.com/mikro-orm/mikro-orm/commit/11d0fd961b98db14517aae53d8d82756b0b54312)) * **core:** always compare boolean properties as booleans ([c30c680](https://github.com/mikro-orm/mikro-orm/commit/c30c68054268bce87a8ec55e39d392d1c153edfd)), closes [#3576](https://github.com/mikro-orm/mikro-orm/issues/3576) * **core:** do not ignore `default` option in version properties ([1572008](https://github.com/mikro-orm/mikro-orm/commit/1572008ed78e645d303583a0b0820f913a711f52)) * **core:** do not ignore falsy version values like `0` ([754d672](https://github.com/mikro-orm/mikro-orm/commit/754d67271f2333e2dd9912c3c9f3aac53b4ed3d6)) * **core:** fix assigning objects to collections ([#3628](https://github.com/mikro-orm/mikro-orm/issues/3628)) ([82a9708](https://github.com/mikro-orm/mikro-orm/commit/82a9708090df7b9c9b07fa663b2e75e9b4ac2afe)) * **core:** fix changing 1:1 relations value ([7b6e6f7](https://github.com/mikro-orm/mikro-orm/commit/7b6e6f799fbf6a4915ffc5fbf873382f6d9baf8b)), closes [#3614](https://github.com/mikro-orm/mikro-orm/issues/3614) * **core:** fix removing entities with complex composite keys ([6d6e9f4](https://github.com/mikro-orm/mikro-orm/commit/6d6e9f43d0f7ba6ef0e507ce08151d905e8470c4)), closes [#3543](https://github.com/mikro-orm/mikro-orm/issues/3543) * **core:** fix validation of EM param in `assign` ([6572a59](https://github.com/mikro-orm/mikro-orm/commit/6572a5946dd2c85124d934b8bd4de33751fdd680)), closes [#3571](https://github.com/mikro-orm/mikro-orm/issues/3571) * **core:** hydrate `mapToPk` properties with the PK value ([559ae28](https://github.com/mikro-orm/mikro-orm/commit/559ae2840ea023853a04ca507274d1cea68c1b5c)) * **core:** improve entity path detection with SWC 1.3.4+ ([#3568](https://github.com/mikro-orm/mikro-orm/issues/3568)) ([9a2cb8c](https://github.com/mikro-orm/mikro-orm/commit/9a2cb8c8446937e78c822c8c42f02dee726b775f)) * **core:** merge entity automatically via `em.create(E, {}, { managed: true })` ([24d206f](https://github.com/mikro-orm/mikro-orm/commit/24d206fab5d9c226273bb155e55bbfec83130f2d)), closes [#3571](https://github.com/mikro-orm/mikro-orm/issues/3571) * **core:** propagate entity removal to collection properties ([25c1c06](https://github.com/mikro-orm/mikro-orm/commit/25c1c06c13c66cb5743c45a9f554d8977057c935)) * **core:** rework handling of orphan removal for 1 :m collections ([925c798](https://github.com/mikro-orm/mikro-orm/commit/925c7989bbc2adf4b7fb2c0f41dff580046e86eb)), closes [#3564](https://github.com/mikro-orm/mikro-orm/issues/3564) * **core:** serialize embedded JSON properties correctly when used in inline embeddable ([feef8b3](https://github.com/mikro-orm/mikro-orm/commit/feef8b3a0ef3aafb140becfb68bfa73f20b326e8)), closes [#3519](https://github.com/mikro-orm/mikro-orm/issues/3519) * **mongo:** fix populating 1:1 owners from inverse side ([25ee03a](https://github.com/mikro-orm/mikro-orm/commit/25ee03a4da35949db5b6e63288133aac6411342c)) * **query-builder:** support top level `$not` operator in join condition ([#3609](https://github.com/mikro-orm/mikro-orm/issues/3609)) ([047504f](https://github.com/mikro-orm/mikro-orm/commit/047504f2404194ea969cca4f600005103c855e58)) ### Features[​](#features-66 "Direct link to Features") * **core:** add `defineConfig` helper ([#3500](https://github.com/mikro-orm/mikro-orm/issues/3500)) ([67d3c68](https://github.com/mikro-orm/mikro-orm/commit/67d3c682bf11d8e9369e351da6e4ee20958b9581)) * **core:** add `em.refresh(entity)` method ([#3522](https://github.com/mikro-orm/mikro-orm/issues/3522)) ([dbe8aa4](https://github.com/mikro-orm/mikro-orm/commit/dbe8aa417abd1849fa9fe4ece72ca0760d3bbd4d)) * **core:** add `em.upsert()` method ([#3525](https://github.com/mikro-orm/mikro-orm/issues/3525)) ([3285cdb](https://github.com/mikro-orm/mikro-orm/commit/3285cdb6a615420bb7e079e17f945007e0b07a46)), closes [#3515](https://github.com/mikro-orm/mikro-orm/issues/3515) * **core:** add `MikroORM` and `Options` exports to each driver package ([#3499](https://github.com/mikro-orm/mikro-orm/issues/3499)) ([b68ed47](https://github.com/mikro-orm/mikro-orm/commit/b68ed47acac2da8b845ec33d6f30692b88c04acd)) * **core:** add the `offset` into `FindOneOptions` ([#3574](https://github.com/mikro-orm/mikro-orm/issues/3574)) ([9d5d457](https://github.com/mikro-orm/mikro-orm/commit/9d5d457e4bcf67b03c4c0982b838163b382bf3b8)) * **core:** automatically detect `src/dist/build` folders and adjust configuration ([#3497](https://github.com/mikro-orm/mikro-orm/issues/3497)) ([a8c8baf](https://github.com/mikro-orm/mikro-orm/commit/a8c8baf558267a1c2440adad4ec756fb19559241)) * **core:** enable `persistOnCreate` by default ([8424976](https://github.com/mikro-orm/mikro-orm/commit/8424976b512b1e9aee010ce623545947fbdc229a)) * **core:** maintain identity for the `Reference` wrapper ([da1a0ef](https://github.com/mikro-orm/mikro-orm/commit/da1a0effcc35d0a6613f9ca4455717b22927e192)), closes [#3582](https://github.com/mikro-orm/mikro-orm/issues/3582) * **core:** provide `meta` and `prop` on custom mapped type instance ([c1251d0](https://github.com/mikro-orm/mikro-orm/commit/c1251d0e64fad974cfb9c83c01c5d288faf2cbd5)), closes [#3538](https://github.com/mikro-orm/mikro-orm/issues/3538) * **core:** track changes on entity references ([#3521](https://github.com/mikro-orm/mikro-orm/issues/3521)) ([0fb17bb](https://github.com/mikro-orm/mikro-orm/commit/0fb17bbb4ff3af3eac3edd89e549fe1673b20448)) * **core:** validate missing items in enum definition ([659c2de](https://github.com/mikro-orm/mikro-orm/commit/659c2dec3209f6ed4eaef05ccf244bbc87a4a54e)) * **core:** validate missing types in `EntitySchema` definition ([0716566](https://github.com/mikro-orm/mikro-orm/commit/0716566788eb231c78b5ed5bd04f8e007d860e88)), closes [#3603](https://github.com/mikro-orm/mikro-orm/issues/3603) * **migrations:** allow configuring snapshot name ([4bbe355](https://github.com/mikro-orm/mikro-orm/commit/4bbe355a56a53eba285470eab178087b8ba9487d)), closes [#3562](https://github.com/mikro-orm/mikro-orm/issues/3562) * **mongo:** do not expand array queries to `$in` operator when nested inside `$eq` ([e25d28e](https://github.com/mikro-orm/mikro-orm/commit/e25d28e7c12a655d2373e14fd74e9cc68c2b1c5d)) * **postgres:** add `qb.distinctOn()` support ([307d3a1](https://github.com/mikro-orm/mikro-orm/commit/307d3a1dae1ababbb47595fe70b0888de3b9a557)) * **query-builder:** validate modification of finalized QB ([b23f015](https://github.com/mikro-orm/mikro-orm/commit/b23f01526a9287dd07f9eb42e1b68e41cf568f40)), closes [#3534](https://github.com/mikro-orm/mikro-orm/issues/3534) * **schema:** add ability to ignore specific column changes ([#3503](https://github.com/mikro-orm/mikro-orm/issues/3503)) ([05fb1ce](https://github.com/mikro-orm/mikro-orm/commit/05fb1ce56fd53a5263967d600027f077ae2e10ea)), closes [#1904](https://github.com/mikro-orm/mikro-orm/issues/1904) [#1904](https://github.com/mikro-orm/mikro-orm/issues/1904) * **schema:** try to infer runtime default values automatically ([#3529](https://github.com/mikro-orm/mikro-orm/issues/3529)) ([d035781](https://github.com/mikro-orm/mikro-orm/commit/d035781bc64f935d09b82660f67604e986df1c53)) * **sqlite:** enable returning statements in both SQLite drivers ([eaf83c8](https://github.com/mikro-orm/mikro-orm/commit/eaf83c83d8f102f3da62e134959fac2afc3671f1)) ### Performance Improvements[​](#performance-improvements-25 "Direct link to Performance Improvements") * **core:** don't propagate serialization context to hidden relations ([#3592](https://github.com/mikro-orm/mikro-orm/issues/3592)) ([e706ba2](https://github.com/mikro-orm/mikro-orm/commit/e706ba276159a547dcfa855801ea7e46abf13212)) * **core:** improve support for large collections ([#3573](https://github.com/mikro-orm/mikro-orm/issues/3573)) ([ea3f6fd](https://github.com/mikro-orm/mikro-orm/commit/ea3f6fd5db55d9959d70afde77c1873f0a453323)) * **schema:** improve schema inspection speed in SQL drivers ([#3549](https://github.com/mikro-orm/mikro-orm/issues/3549)) ([74dc3b1](https://github.com/mikro-orm/mikro-orm/commit/74dc3b1aba07666911fb6fc74b55f6547b2c5b4b)) ## [5.4.2](https://github.com/mikro-orm/mikro-orm/compare/v5.4.1...v5.4.2) (2022-09-12)[​](#542-2022-09-12 "Direct link to 542-2022-09-12") ### Bug Fixes[​](#bug-fixes-131 "Direct link to Bug Fixes") * **core:** do not double serialize nested JSON properties in embedded arrays ([11112c6](https://github.com/mikro-orm/mikro-orm/commit/11112c6662925fc88e88699273bf0653aa6b627a)), closes [#3327](https://github.com/mikro-orm/mikro-orm/issues/3327) * **core:** fix dynamic loading of entities with default export ([14f88cc](https://github.com/mikro-orm/mikro-orm/commit/14f88ccbe1da7666c203ff26d54818fce0689dc9)), closes [#3491](https://github.com/mikro-orm/mikro-orm/issues/3491) * **core:** fix extracting entity reference for constructor params in `em.create()` ([797cc3a](https://github.com/mikro-orm/mikro-orm/commit/797cc3add4aec590a5ff03b7e042af008a0788ba)) * **core:** fix populating of self referencing relationships ([e3c835a](https://github.com/mikro-orm/mikro-orm/commit/e3c835a67a39f5bc085733b131be0729bc73903c)), closes [#3490](https://github.com/mikro-orm/mikro-orm/issues/3490) * **core:** fix serialization of virtual entities ([a15fc13](https://github.com/mikro-orm/mikro-orm/commit/a15fc1355bc2dbb131fc12f4eec01db544d323a4)), closes [#3493](https://github.com/mikro-orm/mikro-orm/issues/3493) * **core:** ignore `*` populate hints inferred from `fields` ([c11bda6](https://github.com/mikro-orm/mikro-orm/commit/c11bda61e1ac7114fa351b5e711aa24558f3c136)) * **core:** omit internal symbols from logged entities ([29c430c](https://github.com/mikro-orm/mikro-orm/commit/29c430c3f158af22d897caa32ae3e12bf1426edd)) * **core:** respect serialization flags on embedded properties ([8e9f6d9](https://github.com/mikro-orm/mikro-orm/commit/8e9f6d9820bb5d48b715862b920d9735659839c4)), closes [#3429](https://github.com/mikro-orm/mikro-orm/issues/3429) ### Features[​](#features-67 "Direct link to Features") * **cli:** add `mikro-orm-esm` CLI script with registered ts-node/esm loader ([443f0c8](https://github.com/mikro-orm/mikro-orm/commit/443f0c81f1a882cbba944522eb77d10c946f5e4b)), closes [#3485](https://github.com/mikro-orm/mikro-orm/issues/3485) * **entity-generator:** generate `OptionalProps` symbols ([#3482](https://github.com/mikro-orm/mikro-orm/issues/3482)) ([6ba3d40](https://github.com/mikro-orm/mikro-orm/commit/6ba3d4004deef00b754a4ca2011cf64e44a4a3a3)) * **knex:** allow changing `FROM` clause using `QueryBuilder` ([#3378](https://github.com/mikro-orm/mikro-orm/issues/3378)) ([df7d939](https://github.com/mikro-orm/mikro-orm/commit/df7d939f5cc28716dc556074563c8b56d32fb371)) ## [5.4.1](https://github.com/mikro-orm/mikro-orm/compare/v5.4.0...v5.4.1) (2022-09-08)[​](#541-2022-09-08 "Direct link to 541-2022-09-08") ### Bug Fixes[​](#bug-fixes-132 "Direct link to Bug Fixes") * **cli:** only use dynamic imports for ESM projects ([b3e43d0](https://github.com/mikro-orm/mikro-orm/commit/b3e43d0fd98c090a47059597b719924260573e3b)), closes [#3442](https://github.com/mikro-orm/mikro-orm/issues/3442) * **core:** add missing `MIKRO_ORM_SCHEMA` env var ([#3464](https://github.com/mikro-orm/mikro-orm/issues/3464)) ([47fccac](https://github.com/mikro-orm/mikro-orm/commit/47fccacfbeab319d60d0ef7b53b9d7694d1e7d0f)) * **core:** allow symbol as propertyKey in `@UseRequestContext` decorator ([#3444](https://github.com/mikro-orm/mikro-orm/issues/3444)) ([6a60295](https://github.com/mikro-orm/mikro-orm/commit/6a60295235dfcf417d1b3381c1570ae4d47c7d97)) * **core:** change internal dependencies to use `~` instead of `^` ([fdbf67c](https://github.com/mikro-orm/mikro-orm/commit/fdbf67c53055a6a4b455208dec3b815736a55e3b)), closes [#3468](https://github.com/mikro-orm/mikro-orm/issues/3468) * **core:** support partial loading of inlined embeddables ([9654e6e](https://github.com/mikro-orm/mikro-orm/commit/9654e6e9685afb686eacda9ea84916e9ca0962c5)), closes [#3365](https://github.com/mikro-orm/mikro-orm/issues/3365) * **migrations:** replace backslash in the `glob` to fix windows support ([9e2b549](https://github.com/mikro-orm/mikro-orm/commit/9e2b549f071b112df0fb473ac194ef5118e99496)), closes [#2243](https://github.com/mikro-orm/mikro-orm/issues/2243) * **postgres:** fix inserting values with `?` into `FullTextType` properties ([5095ddb](https://github.com/mikro-orm/mikro-orm/commit/5095ddb2a95cf4183e08a6a9f509ca442783136e)), closes [#3457](https://github.com/mikro-orm/mikro-orm/issues/3457) * **postgres:** fix parsing enum definition when one of the items has comma ([c8062cb](https://github.com/mikro-orm/mikro-orm/commit/c8062cb11d80161d8a2db4a3dfec09e199a99f5f)), closes [#3460](https://github.com/mikro-orm/mikro-orm/issues/3460) * **reflection:** fix inference of nullability ([5f57ee1](https://github.com/mikro-orm/mikro-orm/commit/5f57ee1c8b15940d208c0d3b84955561b38f9889)), closes [#3447](https://github.com/mikro-orm/mikro-orm/issues/3447) ### Features[​](#features-68 "Direct link to Features") * **core:** allow custom ORM prop name in `@UseRequestContext()` ([#3475](https://github.com/mikro-orm/mikro-orm/issues/3475)) ([d87219e](https://github.com/mikro-orm/mikro-orm/commit/d87219e04a359cafa2223e8e1f6bdb2ee2cfff72)) ## [5.4.0](https://github.com/mikro-orm/mikro-orm/compare/v5.3.1...v5.4.0) (2022-09-01)[​](#540-2022-09-01 "Direct link to 540-2022-09-01") ### Bug Fixes[​](#bug-fixes-133 "Direct link to Bug Fixes") * **cli:** allow working with mongo migrations via CLI ([14a07df](https://github.com/mikro-orm/mikro-orm/commit/14a07df05a3431ca8a81d8ddca30214533af6a25)) * **core:** allow embedded properties inside virtual entities ([541d62d](https://github.com/mikro-orm/mikro-orm/commit/541d62d45f297790cbbf911e7b9d6a18a3950ef5)) * **core:** allow using `$ne` operator on embedded properties ([89706b6](https://github.com/mikro-orm/mikro-orm/commit/89706b66ea6c8fb96768814a50987fc46bb5681d)), closes [#3430](https://github.com/mikro-orm/mikro-orm/issues/3430) * **core:** always use dynamic import, don't depend on `MIKRO_ORM_DYNAMIC_IMPORTS` ([ba7eac6](https://github.com/mikro-orm/mikro-orm/commit/ba7eac6c7a60c2b70a02e7dedeaa0e0b76c6fe78)) * **core:** compile with `module: 'Node16'` to have real dynamic imports ([#3439](https://github.com/mikro-orm/mikro-orm/issues/3439)) ([50347ef](https://github.com/mikro-orm/mikro-orm/commit/50347efd909dafd0bceae09dc35019010cab8329)) * **core:** fix optimistic locking for entities with custom type on PK ([e36bac5](https://github.com/mikro-orm/mikro-orm/commit/e36bac52969b6ee329c8c0c46e43be1132235848)), closes [#3440](https://github.com/mikro-orm/mikro-orm/issues/3440) * **core:** lock entities in `flush()` to get around race conditions with `Promise.all` ([b62799a](https://github.com/mikro-orm/mikro-orm/commit/b62799a2ee4e0b1dc57207c4fe2700a70e3eb0dc)), closes [#2934](https://github.com/mikro-orm/mikro-orm/issues/2934) [#3383](https://github.com/mikro-orm/mikro-orm/issues/3383) * **core:** respect serialization options like `hidden` on embeddables ([d198e44](https://github.com/mikro-orm/mikro-orm/commit/d198e44a243bda8dec3d58e9f21d8194570a67d6)), closes [#3429](https://github.com/mikro-orm/mikro-orm/issues/3429) * **core:** support result caching on virtual entities ([ce2b051](https://github.com/mikro-orm/mikro-orm/commit/ce2b05123ee7b27a6f9d3a3ee7706b0df36cf06a)) * **core:** update to TypeScript 4.8 and improve `EntityDTO` type ([#3389](https://github.com/mikro-orm/mikro-orm/issues/3389)) ([f2957fb](https://github.com/mikro-orm/mikro-orm/commit/f2957fb14141294cfdffebf6cce6eaa937538cfb)) * **core:** use acorn instead of escaya for extraction of method params ([c5c09c5](https://github.com/mikro-orm/mikro-orm/commit/c5c09c57016158d6e7f09410d2ab67adbadbd0ce)) * **knex:** support `em.count()` on virtual entities ([5bb4ebe](https://github.com/mikro-orm/mikro-orm/commit/5bb4ebedfcb5df4d2e27dce66bcdc644e6d7d611)) * **postgres:** fix escaping of special chars in string arrays ([#3405](https://github.com/mikro-orm/mikro-orm/issues/3405)) ([cd7c42f](https://github.com/mikro-orm/mikro-orm/commit/cd7c42f242c5c957e5e81e406881ddcc0a17e5d0)) * **query-builder:** allow using alias for delete queries ([aa19a85](https://github.com/mikro-orm/mikro-orm/commit/aa19a8561cff5e4765c060e86d860635458b2ed5)), closes [#3366](https://github.com/mikro-orm/mikro-orm/issues/3366) * **query-builder:** support more operators in join conditions ([#3399](https://github.com/mikro-orm/mikro-orm/issues/3399)) ([af885c8](https://github.com/mikro-orm/mikro-orm/commit/af885c8884dc10dcc1ee61bc3eeb0a9922708e52)) * **reflection:** do not override user defined `nullable` attribute ([75a6487](https://github.com/mikro-orm/mikro-orm/commit/75a6487cc45eefd5ca7e4bd530b0522222e632ee)) * **reflection:** fix array property type inference ([4a69871](https://github.com/mikro-orm/mikro-orm/commit/4a6987127c3fd487d9b4c4b1db597fac17a41fd8)) ### Features[​](#features-69 "Direct link to Features") * **core:** add `MikroORM.reconnect()` method ([53b836e](https://github.com/mikro-orm/mikro-orm/commit/53b836e75b21b42935f0ced9dfa30d350b1a5b71)) * **core:** add `schema/migrator/seeder` shortcuts to `MikroORM` class ([95c8dd5](https://github.com/mikro-orm/mikro-orm/commit/95c8dd5ca4f795c7be5950c4ce02b0cf725a49ff)) * **entity-generator:** add import extension for referenced entities ([#3420](https://github.com/mikro-orm/mikro-orm/issues/3420)) ([f80809a](https://github.com/mikro-orm/mikro-orm/commit/f80809a7bade25f30c8ae1aff3aa85d04249d853)) * **knex:** add options params to `create` + `assign` methods within EntityRepository ([#3431](https://github.com/mikro-orm/mikro-orm/issues/3431)) ([cf7e9e1](https://github.com/mikro-orm/mikro-orm/commit/cf7e9e15bb29c762844b6167c54cb1200f9e4f9e)) ## [5.3.1](https://github.com/mikro-orm/mikro-orm/compare/v5.3.0...v5.3.1) (2022-08-04)[​](#531-2022-08-04 "Direct link to 531-2022-08-04") ### Bug Fixes[​](#bug-fixes-134 "Direct link to Bug Fixes") * **core:** copy orphan removal stack to forks when `clear: false` ([ab72144](https://github.com/mikro-orm/mikro-orm/commit/ab721442ad089bafd518bc442d04269a0717c44c)), closes [#3360](https://github.com/mikro-orm/mikro-orm/issues/3360) * **core:** improve check for global context usage ([6c906bf](https://github.com/mikro-orm/mikro-orm/commit/6c906bf3e66efdbb849c860ca31f0523c5cd61b8)), closes [#3361](https://github.com/mikro-orm/mikro-orm/issues/3361) * **core:** improve cycle detection when serializing (mainly via `toPOJO`) ([aa10802](https://github.com/mikro-orm/mikro-orm/commit/aa10802e53e0d6500a02230b01292de08f9fb9bc)), closes [#3354](https://github.com/mikro-orm/mikro-orm/issues/3354) * **core:** respect `contextName` in `TransactionContext` ([b2b6a7d](https://github.com/mikro-orm/mikro-orm/commit/b2b6a7d468431ff0a661fb081086f64cb70eac31)), closes [#3362](https://github.com/mikro-orm/mikro-orm/issues/3362) ## [5.3.0](https://github.com/mikro-orm/mikro-orm/compare/v5.2.4...v5.3.0) (2022-08-01)[​](#530-2022-08-01 "Direct link to 530-2022-08-01") ### Bug Fixes[​](#bug-fixes-135 "Direct link to Bug Fixes") * **core:** do not trigger auto flush from inside flush hooks ([e3f34aa](https://github.com/mikro-orm/mikro-orm/commit/e3f34aa52f7d76f12e51065f589f03454fba48f4)), closes [#3345](https://github.com/mikro-orm/mikro-orm/issues/3345) * **entity-generator:** ensure stable order of generated entities ([06e0e05](https://github.com/mikro-orm/mikro-orm/commit/06e0e05bf91d111a231a5d135add496928468498)) * **postgres:** fix having non-PK serial column next to a non-serial PK ([6c589b0](https://github.com/mikro-orm/mikro-orm/commit/6c589b0c534b8fa5994363f5ed718b9be8840e8d)), closes [#3350](https://github.com/mikro-orm/mikro-orm/issues/3350) * **query-builder:** fix `qb.insert()/update()` on embeddables in inline mode ([#3340](https://github.com/mikro-orm/mikro-orm/issues/3340)) ([e611fa0](https://github.com/mikro-orm/mikro-orm/commit/e611fa060f392f60f239d53788d24b1ca7c36d7c)) * **schema:** ensure stable order queries ([e56a259](https://github.com/mikro-orm/mikro-orm/commit/e56a259e5d7e2c29858a2c1568d7b901a923867a)), closes [#3330](https://github.com/mikro-orm/mikro-orm/issues/3330) * **schema:** respect explicit `columnType` when comparing columns ([f0a20fa](https://github.com/mikro-orm/mikro-orm/commit/f0a20fafa1425ca20f4f6fb2977eae7773d6ac6a)), closes [#3317](https://github.com/mikro-orm/mikro-orm/issues/3317) * **schema:** respect schema when renaming columns in postgres ([#3344](https://github.com/mikro-orm/mikro-orm/issues/3344)) ([f905336](https://github.com/mikro-orm/mikro-orm/commit/f9053368c0c3b2c771f1a3a273a19a4b8d374556)) * **sqlite:** throw `ForeignKeyConstraintViolationException` where appropriate ([#3343](https://github.com/mikro-orm/mikro-orm/issues/3343)) ([508e262](https://github.com/mikro-orm/mikro-orm/commit/508e262abcb5302cb6831d3fab6920798a4f5477)) ### Features[​](#features-70 "Direct link to Features") * add support for full text searches ([#3317](https://github.com/mikro-orm/mikro-orm/issues/3317)) ([8b8f140](https://github.com/mikro-orm/mikro-orm/commit/8b8f14071b92e91161a32aa272315a0ecce1bc0b)) * **core:** add `$exists` mongodb operator with SQL fallback to `is not null` ([112f2be](https://github.com/mikro-orm/mikro-orm/commit/112f2be85fabefc8e9562962945d3bd13b64025e)), closes [#3295](https://github.com/mikro-orm/mikro-orm/issues/3295) * **core:** add `disableContextResolution` option to `em.fork()` ([94442f9](https://github.com/mikro-orm/mikro-orm/commit/94442f9a96d8a71f68d447f9e2018dd4bb84da4b)), closes [#3338](https://github.com/mikro-orm/mikro-orm/issues/3338) * **core:** add support for virtual entities ([#3351](https://github.com/mikro-orm/mikro-orm/issues/3351)) ([dcd62ac](https://github.com/mikro-orm/mikro-orm/commit/dcd62ac1155e20e7e58d7de4c5fe1a22a422e201)) * **core:** add validation when using non-discovered entities in `em.populate()` ([ab93106](https://github.com/mikro-orm/mikro-orm/commit/ab93106fd104be3ae12efb7c2fa680ad6f348d27)) * **core:** improve autocomplete for `columnType` ([6bf616d](https://github.com/mikro-orm/mikro-orm/commit/6bf616dd824bbd61831e74a901af29ff91eae61d)) * **core:** improve autocomplete for `type`, `onUpdateIntegrity` and `onDelete` ([7ee2dcb](https://github.com/mikro-orm/mikro-orm/commit/7ee2dcb500db3fa22dac83e38831920056fa6ff4)) * **entity-generator:** allow defining entities with `EntitySchema` instead of decorators ([b423c10](https://github.com/mikro-orm/mikro-orm/commit/b423c104d942bfdb4a875a64c52f98ec85899c6c)) * **mongo:** add support for migrations in mongo driver ([#3347](https://github.com/mikro-orm/mikro-orm/issues/3347)) ([c5c6115](https://github.com/mikro-orm/mikro-orm/commit/c5c61152e0ad1b98fe9b00875ce0da9039b34d4a)) * **mongo:** allow reusing mongo client via `driverOptions` ([df59ebf](https://github.com/mikro-orm/mikro-orm/commit/df59ebf6cc46121a81c008a0d174b1dff7256997)), closes [#3352](https://github.com/mikro-orm/mikro-orm/issues/3352) ## [5.2.4](https://github.com/mikro-orm/mikro-orm/compare/v5.2.3...v5.2.4) (2022-07-25)[​](#524-2022-07-25 "Direct link to 524-2022-07-25") ### Bug Fixes[​](#bug-fixes-136 "Direct link to Bug Fixes") * **core:** do not allow passing `null` to required properties in `em.create()` ([e7843fb](https://github.com/mikro-orm/mikro-orm/commit/e7843fbe2f02ee8922d99a2f0209e4e261898a66)), closes [#3289](https://github.com/mikro-orm/mikro-orm/issues/3289) * **core:** do not run `onUpdate` before we know something changed ([6faa367](https://github.com/mikro-orm/mikro-orm/commit/6faa3673266abd2f6fec5620e4e3e9e32e223ffc)), closes [#3328](https://github.com/mikro-orm/mikro-orm/issues/3328) * **core:** ensure m :n collection is not dirty after hydration ([66e0a21](https://github.com/mikro-orm/mikro-orm/commit/66e0a21bb12a716afd2b0ba700ff7df14a5f0dc0)), closes [#3323](https://github.com/mikro-orm/mikro-orm/issues/3323) [#3287](https://github.com/mikro-orm/mikro-orm/issues/3287) * **core:** hidden properties are included in cache ([#3300](https://github.com/mikro-orm/mikro-orm/issues/3300)) ([f0bc261](https://github.com/mikro-orm/mikro-orm/commit/f0bc2610ee5b041fee9fc85e6cc5101169629298)) * **core:** respect schema when lazy loading reference via `init` ([c876c9f](https://github.com/mikro-orm/mikro-orm/commit/c876c9f6b2c970530a8890fa14397c423d602c81)), closes [#3318](https://github.com/mikro-orm/mikro-orm/issues/3318) * **knex:** fix $or over 1 :m and m:1 auto-joined relations ([#3307](https://github.com/mikro-orm/mikro-orm/issues/3307)) ([b6f12b2](https://github.com/mikro-orm/mikro-orm/commit/b6f12b21d04d5974e6fd082b4d9984c80129b9cc)) ### Features[​](#features-71 "Direct link to Features") * **knex:** allow partial loading of 1:1 owner property from inverse side ([d642018](https://github.com/mikro-orm/mikro-orm/commit/d64201835362a42768562891663c3dda1745bda0)), closes [#3324](https://github.com/mikro-orm/mikro-orm/issues/3324) ## [5.2.3](https://github.com/mikro-orm/mikro-orm/compare/v5.2.2...v5.2.3) (2022-07-08)[​](#523-2022-07-08 "Direct link to 523-2022-07-08") ### Bug Fixes[​](#bug-fixes-137 "Direct link to Bug Fixes") * **core:** ensure M :N collections are not dirty after populating of inverse side ([21ba9b2](https://github.com/mikro-orm/mikro-orm/commit/21ba9b212473a9347b2bd38a048710a9628c05ee)), closes [#3287](https://github.com/mikro-orm/mikro-orm/issues/3287) * **mariadb:** backport some fixes from the mysql driver ([9a57386](https://github.com/mikro-orm/mikro-orm/commit/9a57386af03a268302b88aa70b20038911bd0cc3)) * **mariadb:** fix inference of nullable columns when generating entities ([4bd606a](https://github.com/mikro-orm/mikro-orm/commit/4bd606ace99cfa5c2216aac5880128bb736dd199)), closes [#3285](https://github.com/mikro-orm/mikro-orm/issues/3285) * **mongo:** fix wrog filter of entity name ([#3276](https://github.com/mikro-orm/mikro-orm/issues/3276)) ([da20e1f](https://github.com/mikro-orm/mikro-orm/commit/da20e1f74329f6fe6913e4a483bde7e71bfec17b)) ## [5.2.2](https://github.com/mikro-orm/mikro-orm/compare/v5.2.1...v5.2.2) (2022-07-03)[​](#522-2022-07-03 "Direct link to 522-2022-07-03") ### Bug Fixes[​](#bug-fixes-138 "Direct link to Bug Fixes") * **core:** consider two `NaN` as equal when computing changesets ([#3250](https://github.com/mikro-orm/mikro-orm/issues/3250)) ([95116a0](https://github.com/mikro-orm/mikro-orm/commit/95116a05bb142ed90f5b572e109d6740900c5cf1)) * **core:** ensure correct context usage in all `EntityManager` public methods ([cc6d59b](https://github.com/mikro-orm/mikro-orm/commit/cc6d59b9a96fbfd4106e37c21814ded84b56588a)), closes [#3271](https://github.com/mikro-orm/mikro-orm/issues/3271) * **core:** ensure FK as PK is not marked as initialized too early ([f12f92f](https://github.com/mikro-orm/mikro-orm/commit/f12f92f185eb78fc1471c5ec1411cd2bf5d11308)), closes [#3269](https://github.com/mikro-orm/mikro-orm/issues/3269) * **core:** fix populating of 1 :m collections between wildcard schema entities ([69c06aa](https://github.com/mikro-orm/mikro-orm/commit/69c06aa5b3ac553bb6c1438a7143d56d18fcf894)), closes [#3270](https://github.com/mikro-orm/mikro-orm/issues/3270) * **core:** fix populating of relations in `afterFlush` hook ([26ab686](https://github.com/mikro-orm/mikro-orm/commit/26ab6861ba0c0b64563c69d91f85e17776a58e71)), closes [#3005](https://github.com/mikro-orm/mikro-orm/issues/3005) * **core:** fix querying JSON properties with operators directly ([077ca62](https://github.com/mikro-orm/mikro-orm/commit/077ca623e6d8f0faff8e6af9ea468cf9b525d61a)), closes [#3246](https://github.com/mikro-orm/mikro-orm/issues/3246) * **mongo:** persist explicit `null` value on object embeddable as `null` ([1c56e7a](https://github.com/mikro-orm/mikro-orm/commit/1c56e7ab1b2d5325588b444998ffa53adce6f699)), closes [#3258](https://github.com/mikro-orm/mikro-orm/issues/3258) * **mongo:** retry only 3 times if ensuring indexes fails ([#3272](https://github.com/mikro-orm/mikro-orm/issues/3272)) ([299a028](https://github.com/mikro-orm/mikro-orm/commit/299a028739879d87e5b16a497d3333780502a112)) * **seeder:** fs-extra dep ([#3268](https://github.com/mikro-orm/mikro-orm/issues/3268)) ([972e5ba](https://github.com/mikro-orm/mikro-orm/commit/972e5bac8d679303422a07a19b07a352529c4ff6)) * **sql:** fix prefixing of JSON queries nested on relations ([847ff46](https://github.com/mikro-orm/mikro-orm/commit/847ff468f48dbb99e06ffe713e5d66a461e524b2)), closes [#3242](https://github.com/mikro-orm/mikro-orm/issues/3242) ### Features[​](#features-72 "Direct link to Features") * **core:** propagate add operation to m :n owner even if not initialized ([#3273](https://github.com/mikro-orm/mikro-orm/issues/3273)) ([dc9255c](https://github.com/mikro-orm/mikro-orm/commit/dc9255cb4c26291c7e33a7c38da0475fb20f3832)) ## [5.2.1](https://github.com/mikro-orm/mikro-orm/compare/v5.2.0...v5.2.1) (2022-06-21)[​](#521-2022-06-21 "Direct link to 521-2022-06-21") ### Bug Fixes[​](#bug-fixes-139 "Direct link to Bug Fixes") * **core:** fix reloading version values with custom types on PKs ([ebd7888](https://github.com/mikro-orm/mikro-orm/commit/ebd78882cc910f3cd965ec2299a8b67958d36747)), closes [#3209](https://github.com/mikro-orm/mikro-orm/issues/3209) * **core:** fix serialization of entities wrapped in POJOs ([af4fadf](https://github.com/mikro-orm/mikro-orm/commit/af4fadffe9fb78341e45c016836be0824aaaac8d)), closes [#3221](https://github.com/mikro-orm/mikro-orm/issues/3221) * **core:** ignore `undefined` values during options merge ([9e0f559](https://github.com/mikro-orm/mikro-orm/commit/9e0f559c3c265540e89ca6eeafe5a3b836c01fba)), closes [#3234](https://github.com/mikro-orm/mikro-orm/issues/3234) * **core:** prefer current schema for loading wild card pivot table entities ([f40cafa](https://github.com/mikro-orm/mikro-orm/commit/f40cafa6ec81263ccbd94b9367bff7662333e67c)), closes [#3177](https://github.com/mikro-orm/mikro-orm/issues/3177) * **mongo:** recreate indexes when they differ ([60fc7f6](https://github.com/mikro-orm/mikro-orm/commit/60fc7f65b52a503abb3ccf7d99766ca4d4ba820c)), closes [#3118](https://github.com/mikro-orm/mikro-orm/issues/3118) * **mongo:** use `$unset` when property value is `undefined` ([f059811](https://github.com/mikro-orm/mikro-orm/commit/f05981135d984b73b5f8144758ab7055c533d3cc)), closes [#3233](https://github.com/mikro-orm/mikro-orm/issues/3233) * **mysql:** handle mediumint PKs correctly ([0bbbe5c](https://github.com/mikro-orm/mikro-orm/commit/0bbbe5c7827875a88a199b94add9ae81776dce42)), closes [#3230](https://github.com/mikro-orm/mikro-orm/issues/3230) * **types:** fix inference of optional PKs ([424e0bb](https://github.com/mikro-orm/mikro-orm/commit/424e0bb5c50248ac2d45da55dd1a451663944d31)), closes [#3230](https://github.com/mikro-orm/mikro-orm/issues/3230) ### Features[​](#features-73 "Direct link to Features") * **core:** allow to adjust default type mapping ([ca8ce57](https://github.com/mikro-orm/mikro-orm/commit/ca8ce5721f0d547ceec1cf645443b6ae00deaf09)), closes [#3066](https://github.com/mikro-orm/mikro-orm/issues/3066) ### Performance Improvements[​](#performance-improvements-26 "Direct link to Performance Improvements") * **core:** allow disabling change tracking on property level ([7d5e32d](https://github.com/mikro-orm/mikro-orm/commit/7d5e32d8eb7ec25ace2336e1bd4da5d97d015c08)), closes [#3019](https://github.com/mikro-orm/mikro-orm/issues/3019) * **core:** make `Collection.add` on not managed entities much faster ([75adda9](https://github.com/mikro-orm/mikro-orm/commit/75adda9b9a714b7918ec76fb7d5cd50f084cd6ba)), closes [#3211](https://github.com/mikro-orm/mikro-orm/issues/3211) ## [5.2.0](https://github.com/mikro-orm/mikro-orm/compare/v5.1.5...v5.2.0) (2022-06-10)[​](#520-2022-06-10 "Direct link to 520-2022-06-10") ### Bug Fixes[​](#bug-fixes-140 "Direct link to Bug Fixes") * **core:** allow changing PK via UoW ([32ab215](https://github.com/mikro-orm/mikro-orm/commit/32ab21583d2718ab874ff71b3f13c9e6a9e5faf0)), closes [#3184](https://github.com/mikro-orm/mikro-orm/issues/3184) * **core:** ensure correct cached value in `loadCount` ([4471bb8](https://github.com/mikro-orm/mikro-orm/commit/4471bb8b59151e8e450ab8f557a5337862aa88fc)) * **query-builder:** fix calling `qb.count('id', true).getCount()` ([a97324a](https://github.com/mikro-orm/mikro-orm/commit/a97324a2b85dd8463f300004bee82b906a68251d)), closes [#3182](https://github.com/mikro-orm/mikro-orm/issues/3182) * **query-builder:** fix processing of custom types in explicitly aliased queries ([db137a6](https://github.com/mikro-orm/mikro-orm/commit/db137a6cdbe182363d0e4a743b8b8f915e324b09)), closes [#3172](https://github.com/mikro-orm/mikro-orm/issues/3172) * **schema:** do not consider autoincrement columns as primary automatically ([088afdb](https://github.com/mikro-orm/mikro-orm/commit/088afdb96ef8fd20a3868c050bb749a4e825fd19)), closes [#3187](https://github.com/mikro-orm/mikro-orm/issues/3187) * **ts-morph:** use module: 'node16' for reflection ([024d9d9](https://github.com/mikro-orm/mikro-orm/commit/024d9d997728b91c7530280ccf4f49bf154a4330)), closes [#3168](https://github.com/mikro-orm/mikro-orm/issues/3168) * typing detection with typescript 4.7 node16 ([#3163](https://github.com/mikro-orm/mikro-orm/issues/3163)) ([08322fa](https://github.com/mikro-orm/mikro-orm/commit/08322fa90112534629e4d2327991519e0b3e01c4)) ### Features[​](#features-74 "Direct link to Features") * **core:** automatically discover target embeddables and relationships ([#3190](https://github.com/mikro-orm/mikro-orm/issues/3190)) ([8624dc5](https://github.com/mikro-orm/mikro-orm/commit/8624dc5228e63cdadf38a13ee29a554d844ef4ac)) * **entity-generator:** allow generating bidirectional relations ([8b93400](https://github.com/mikro-orm/mikro-orm/commit/8b93400f2bc3569375d7316cf5b995fc1c6821c6)), closes [#3181](https://github.com/mikro-orm/mikro-orm/issues/3181) * **entity-generator:** allow generating identified references ([1fbf5ac](https://github.com/mikro-orm/mikro-orm/commit/1fbf5ac1ab2334c7e7ccbe190ded411a9490431c)) * **knex:** allow reusing existing knex client via `driverOptions` ([c169eda](https://github.com/mikro-orm/mikro-orm/commit/c169eda1907f3af217ed77fecce8df1f20c45872)), closes [#3167](https://github.com/mikro-orm/mikro-orm/issues/3167) * **schema:** add logging to schema comparator ([f96eaaf](https://github.com/mikro-orm/mikro-orm/commit/f96eaaf52a02c14e5413cbd25267a272bfeee92f)) ## [5.1.5](https://github.com/mikro-orm/mikro-orm/compare/v5.1.4...v5.1.5) (2022-05-29)[​](#515-2022-05-29 "Direct link to 515-2022-05-29") ### Bug Fixes[​](#bug-fixes-141 "Direct link to Bug Fixes") * **cli:** disable TS mode when we fail to register ts-node ([457d9d3](https://github.com/mikro-orm/mikro-orm/commit/457d9d32d78ed34b254aae3b2b2f29b382e7175e)), closes [#3152](https://github.com/mikro-orm/mikro-orm/issues/3152) * **core:** assign new embeddable entity only when it is null or undefined ([#3135](https://github.com/mikro-orm/mikro-orm/issues/3135)) ([4f870fb](https://github.com/mikro-orm/mikro-orm/commit/4f870fb4a650ad7a00524424494ea31cd484af60)) * **core:** support TypeScript 4.7 ([06b6e4e](https://github.com/mikro-orm/mikro-orm/commit/06b6e4ead56ce8a8429e707492a1e190291d7f2c)) * **query-builder:** fix aliasing of relations with composite PK ([095e241](https://github.com/mikro-orm/mikro-orm/commit/095e2416026b926edd07da2eb694b31101e873c3)), closes [#3053](https://github.com/mikro-orm/mikro-orm/issues/3053) ### Performance Improvements[​](#performance-improvements-27 "Direct link to Performance Improvements") * **query-builder:** use distinct counts only when joining to-many relations ([eebe34d](https://github.com/mikro-orm/mikro-orm/commit/eebe34d8a11725c35b9e857f1ff4a1967cc6c1f8)), closes [#3044](https://github.com/mikro-orm/mikro-orm/issues/3044) ## [5.1.4](https://github.com/mikro-orm/mikro-orm/compare/v5.1.3...v5.1.4) (2022-05-19)[​](#514-2022-05-19 "Direct link to 514-2022-05-19") ### Bug Fixes[​](#bug-fixes-142 "Direct link to Bug Fixes") * **core:** allow asterisk in `FindOptions.fields` on TS level ([43e1d0b](https://github.com/mikro-orm/mikro-orm/commit/43e1d0b765e3c6346340e6c734af7826d3ab3486)), closes [#3127](https://github.com/mikro-orm/mikro-orm/issues/3127) * **core:** fix aliasing of formula properties in complex conditions ([#3130](https://github.com/mikro-orm/mikro-orm/issues/3130)) ([071846e](https://github.com/mikro-orm/mikro-orm/commit/071846ee77ae453a3e26a244ea8c2f0966ab6942)) * **core:** improve type of `em.getContext()` ([158f077](https://github.com/mikro-orm/mikro-orm/commit/158f077d1d0fbe4fd0edcf736a2f6a49a336fb14)), closes [#3120](https://github.com/mikro-orm/mikro-orm/issues/3120) * **core:** improve validation of wrong entity references ([#3085](https://github.com/mikro-orm/mikro-orm/issues/3085)) ([f5de135](https://github.com/mikro-orm/mikro-orm/commit/f5de135b5eff3d0ad1b26de7a2af5925c3ef7f37)) * **core:** wrap relations in `Reference` wrapper when assigning entity instance ([97f1f59](https://github.com/mikro-orm/mikro-orm/commit/97f1f59f29522074b5cd5f86579dc1dd6a1b4c9d)), closes [#3092](https://github.com/mikro-orm/mikro-orm/issues/3092) * **mongo:** support queries with mongo specific operators on embeddables ([2fb9002](https://github.com/mikro-orm/mikro-orm/commit/2fb900294acef87bc939e0417ec3fd720f806ffd)) * **postgres:** do not try to create schema for migrations when it exists ([d6af811](https://github.com/mikro-orm/mikro-orm/commit/d6af81160b4099436237dc312f7dbb4bbffc4378)), closes [#3106](https://github.com/mikro-orm/mikro-orm/issues/3106) * **postgres:** fix resolving knex when other version is explicitly installed ([41f5665](https://github.com/mikro-orm/mikro-orm/commit/41f5665bcf234cdccf5a466173b7937acd3c9a1a)), closes [#3129](https://github.com/mikro-orm/mikro-orm/issues/3129) * **postgres:** ignore schemas prefixed with `crdb_` too ([049fea3](https://github.com/mikro-orm/mikro-orm/commit/049fea3f77063f504a617e32cb9a4e303fbbf0be)), closes [#3021](https://github.com/mikro-orm/mikro-orm/issues/3021) * **schema:** always ignore PostGIS schemas when diffing ([#3096](https://github.com/mikro-orm/mikro-orm/issues/3096)) ([626e3db](https://github.com/mikro-orm/mikro-orm/commit/626e3dbe1edeb2b43bbe08aa2a025524da65a790)) * **ts-morph:** do not mark properties as enums automatically based on type ([c3923df](https://github.com/mikro-orm/mikro-orm/commit/c3923dffd98d651abef4008d1078b512540b80f0)), closes [#3099](https://github.com/mikro-orm/mikro-orm/issues/3099) ### Features[​](#features-75 "Direct link to Features") * **core:** add `strict` option to `em.findOneOrFail()` ([#3088](https://github.com/mikro-orm/mikro-orm/issues/3088)) ([d38242a](https://github.com/mikro-orm/mikro-orm/commit/d38242aba2d669355522fff57e30c10f64427173)) * **postgres:** allow ignoring specified schemas ([3f1d2da](https://github.com/mikro-orm/mikro-orm/commit/3f1d2da742bc1301d4ab89d42be37a694a69edcd)) ## [5.1.3](https://github.com/mikro-orm/mikro-orm/compare/v5.1.2...v5.1.3) (2022-04-27)[​](#513-2022-04-27 "Direct link to 513-2022-04-27") ### Bug Fixes[​](#bug-fixes-143 "Direct link to Bug Fixes") * **core:** allow replacing target entity in relations with `assign` ([90ec83f](https://github.com/mikro-orm/mikro-orm/commit/90ec83fc01296dc6f3560df00e637b050852b7f2)), closes [#3026](https://github.com/mikro-orm/mikro-orm/issues/3026) * **core:** do not inline query for JSON properties that match PK names ([e6005d8](https://github.com/mikro-orm/mikro-orm/commit/e6005d838f6faccb56f2082ecf93c23f74cbc08a)), closes [#3054](https://github.com/mikro-orm/mikro-orm/issues/3054) * **core:** fix serialization when using partial loading for nested relations ([00be9f1](https://github.com/mikro-orm/mikro-orm/commit/00be9f1e0cefad70e70a66859c0466c3fd60fade)), closes [#3011](https://github.com/mikro-orm/mikro-orm/issues/3011) * **core:** hydrate nullable embedded properties as `null` ([e8490f6](https://github.com/mikro-orm/mikro-orm/commit/e8490f68dae699de99b93616c9a10ba2bf0417f4)), closes [#3063](https://github.com/mikro-orm/mikro-orm/issues/3063) * **core:** respect mapToPk when expanding properties ([#3031](https://github.com/mikro-orm/mikro-orm/issues/3031)) ([757801e](https://github.com/mikro-orm/mikro-orm/commit/757801e9260b4cc89577b89ddbeec7a428fdb9a0)) * **mongo:** fix ensuring indexes with polymorphic embeddables ([aa5e4d2](https://github.com/mikro-orm/mikro-orm/commit/aa5e4d230f1cf9541d14f1c5a7c5a8b69d1a0dfd)), closes [#3013](https://github.com/mikro-orm/mikro-orm/issues/3013) * **postgres:** allow using special characters in string arrays ([366da5f](https://github.com/mikro-orm/mikro-orm/commit/366da5f420f2487fbc7d79fb662ec7db0931afc0)), closes [#3037](https://github.com/mikro-orm/mikro-orm/issues/3037) * **postgres:** ensure schema exists before creating migrations table ([f211813](https://github.com/mikro-orm/mikro-orm/commit/f21181377fd9ff9885e3b0610394d0c7002614bf)), closes [#3039](https://github.com/mikro-orm/mikro-orm/issues/3039) * **schema:** fix diffing of indexes with too long inferred name ([01ba9ed](https://github.com/mikro-orm/mikro-orm/commit/01ba9edef9b202f324f6e580b0f55161ca927801)), closes [#2932](https://github.com/mikro-orm/mikro-orm/issues/2932) * **schema:** remove FKs first when trying to `dropSchema` without disabled FKs ([b1b5f55](https://github.com/mikro-orm/mikro-orm/commit/b1b5f553d3710893cdfdcc842e6e367f0b34a621)), closes [#3004](https://github.com/mikro-orm/mikro-orm/issues/3004) * **seeder:** explicitly flush forks when calling `Seeder.call()` ([c8ece7c](https://github.com/mikro-orm/mikro-orm/commit/c8ece7cd2b1c5b3972e0375d7c941196e6b57031)), closes [#2998](https://github.com/mikro-orm/mikro-orm/issues/2998) * **seeder:** fix type of Factory methods ([#3064](https://github.com/mikro-orm/mikro-orm/issues/3064)) ([06e88e7](https://github.com/mikro-orm/mikro-orm/commit/06e88e72d3a4393190fe46c8de9578c7f3ff2812)) * **sqlite:** fix reflection of tables with FKs ([389bc0d](https://github.com/mikro-orm/mikro-orm/commit/389bc0ddc69cf9d58c9fecc1440a6bcdfe62af7f)), closes [#2959](https://github.com/mikro-orm/mikro-orm/issues/2959) * **sqlite:** upgrade knex to v2 + switch back to sqlite3 ([f3e4b9d](https://github.com/mikro-orm/mikro-orm/commit/f3e4b9dd8a29e44510e5549b773205d52475cb72)), closes [#3046](https://github.com/mikro-orm/mikro-orm/issues/3046) ### Features[​](#features-76 "Direct link to Features") * **core:** try to fix FK order automatically for custom pivot entities ([cc9e427](https://github.com/mikro-orm/mikro-orm/commit/cc9e4277ac348b16de72eddbf339d2494e1533fb)), closes [#3040](https://github.com/mikro-orm/mikro-orm/issues/3040) * **core:** validate decorator parameters are used properly ([cb3e1dd](https://github.com/mikro-orm/mikro-orm/commit/cb3e1ddf45b8d8196ca1f61afef223eca06ac0b7)), closes [#3040](https://github.com/mikro-orm/mikro-orm/issues/3040) * **seeder:** created shared context when calling other seeders ([6fa04ae](https://github.com/mikro-orm/mikro-orm/commit/6fa04ae4d98756544d9215cd62863707158193ba)), closes [#3022](https://github.com/mikro-orm/mikro-orm/issues/3022) ### Performance Improvements[​](#performance-improvements-28 "Direct link to Performance Improvements") * **core:** do not use contextual EM where we know we are in a fork already ([ba16532](https://github.com/mikro-orm/mikro-orm/commit/ba165328055454ae971fe5c6016e83883566cbc0)) ## [5.1.2](https://github.com/mikro-orm/mikro-orm/compare/v5.1.1...v5.1.2) (2022-04-10)[​](#512-2022-04-10 "Direct link to 512-2022-04-10") ### Bug Fixes[​](#bug-fixes-144 "Direct link to Bug Fixes") * **core:** allow converting custom types via `em.nativeInsert()` ([#2979](https://github.com/mikro-orm/mikro-orm/issues/2979)) ([8d76852](https://github.com/mikro-orm/mikro-orm/commit/8d7685224eaf6f111807a61e4a1ba3ce39453717)) * **core:** do not clean up UoW before each "flush step" ([3ae732d](https://github.com/mikro-orm/mikro-orm/commit/3ae732d3d27ef842bfa16470fbf2b04860259af2)), closes [#2934](https://github.com/mikro-orm/mikro-orm/issues/2934) * **core:** do not quote knex.raw() instances returned from custom types ([8a4c836](https://github.com/mikro-orm/mikro-orm/commit/8a4c8367a8af032ff3e4ab00825f5fc5aa605ae8)), closes [#1841](https://github.com/mikro-orm/mikro-orm/issues/1841) * **core:** fix eager loading of nested embeddable m:1 properties ([4867db9](https://github.com/mikro-orm/mikro-orm/commit/4867db9f60ff25b35503b229845fb06eb02621ee)), closes [#2975](https://github.com/mikro-orm/mikro-orm/issues/2975) * **core:** fix eager loading when multiple relations target same entity ([21922ce](https://github.com/mikro-orm/mikro-orm/commit/21922ce175cbe0ceb73b9765087976dac159294b)), closes [#2990](https://github.com/mikro-orm/mikro-orm/issues/2990) * **core:** fix mapping of inserted PKs with custom field names from batch insert ([080d8e0](https://github.com/mikro-orm/mikro-orm/commit/080d8e0249391e437abc371a375ce62e5de0ba93)), closes [#2977](https://github.com/mikro-orm/mikro-orm/issues/2977) * **core:** never reassign the same entity via `em.assign()` ([cdfbabd](https://github.com/mikro-orm/mikro-orm/commit/cdfbabd5d30d40df061a75b79cc1fc52a6cf6b39)), closes [#2974](https://github.com/mikro-orm/mikro-orm/issues/2974) * **core:** propagate entity removal in `em.transactional()` to upper context ([6e5166b](https://github.com/mikro-orm/mikro-orm/commit/6e5166b5eb8b89d6c0448c32b7deb46e310d0c58)), closes [#2973](https://github.com/mikro-orm/mikro-orm/issues/2973) * **core:** respect `connectionType` in populate queries ([fe40a9f](https://github.com/mikro-orm/mikro-orm/commit/fe40a9f5663d5a886e975ca049f41a67da60f569)), closes [#2994](https://github.com/mikro-orm/mikro-orm/issues/2994) * **core:** support `PopulateHint.INFER` with pagination and joined strategy ([56f8737](https://github.com/mikro-orm/mikro-orm/commit/56f873706132678c0129148a114fa94503f734a8)), closes [#2985](https://github.com/mikro-orm/mikro-orm/issues/2985) * **core:** use correct path for relations inside embeddables with populate: true ([4735dba](https://github.com/mikro-orm/mikro-orm/commit/4735dba93f2b7f89a6232aa2b27297fa3aa9418a)), closes [#2948](https://github.com/mikro-orm/mikro-orm/issues/2948) * **postgres:** do not ignore custom PK constraint names ([#2931](https://github.com/mikro-orm/mikro-orm/issues/2931)) ([24bf10e](https://github.com/mikro-orm/mikro-orm/commit/24bf10e668dd2d3b4b6cc4c52ed215fbffcc9d45)) * **postgres:** drop enum constraints only when the column was an enum ([76fef39](https://github.com/mikro-orm/mikro-orm/commit/76fef399ac01ffd22f5b652701e0769ae5161838)) * **postgres:** ensure correct column order in compound index/uniques ([321be79](https://github.com/mikro-orm/mikro-orm/commit/321be7992dd7007425fcf5277f09171639db0e28)), closes [#2932](https://github.com/mikro-orm/mikro-orm/issues/2932) * **postgres:** fix pagination with order by bool column ([d5476cd](https://github.com/mikro-orm/mikro-orm/commit/d5476cd04b0eca4fb7c98d790013e6532fdd57fc)), closes [#2910](https://github.com/mikro-orm/mikro-orm/issues/2910) * **postgres:** fix schema diffing on enums with case-sensitive names ([050875b](https://github.com/mikro-orm/mikro-orm/commit/050875b2f3582499440b14cda1cb04dd2883c6b8)), closes [#2938](https://github.com/mikro-orm/mikro-orm/issues/2938) [#2932](https://github.com/mikro-orm/mikro-orm/issues/2932) * **schema:** do not create FK index for 1:1 properties (they are unique already) ([473795c](https://github.com/mikro-orm/mikro-orm/commit/473795c26f0b54b3997ce4c839a2834ff43290d8)), closes [#2942](https://github.com/mikro-orm/mikro-orm/issues/2942) ### Features[​](#features-77 "Direct link to Features") * **mariadb:** implement check constraint support + fix json column diffing ([b513b16](https://github.com/mikro-orm/mikro-orm/commit/b513b1636964a9185f5abfc19b5762a57c5c9006)), closes [#2151](https://github.com/mikro-orm/mikro-orm/issues/2151) * **schema:** support mysql 8 ([#2961](https://github.com/mikro-orm/mikro-orm/issues/2961)) ([acc960e](https://github.com/mikro-orm/mikro-orm/commit/acc960ebc694c61a959f48e89a9fee5513f6bdfa)) ## [5.1.1](https://github.com/mikro-orm/mikro-orm/compare/v5.1.0...v5.1.1) (2022-03-20)[​](#511-2022-03-20 "Direct link to 511-2022-03-20") ### Bug Fixes[​](#bug-fixes-145 "Direct link to Bug Fixes") * **core:** fix custom pivot table entities for unidirectional relations ([01bdbf6](https://github.com/mikro-orm/mikro-orm/commit/01bdbf65836b6db1c7353d4dd14032645df3a978)) * **knex:** `order by` with a formula field should not include `as` for sub-queries ([#2929](https://github.com/mikro-orm/mikro-orm/issues/2929)) ([74751fb](https://github.com/mikro-orm/mikro-orm/commit/74751fbb2a14f2b6029df5f07fac99310df75f31)) * **postgres:** allow explicit schema name in `prop.pivotTable` ([1860ff5](https://github.com/mikro-orm/mikro-orm/commit/1860ff5e335b4142e4d7917ac5c4d1c18ba4044d)), closes [#2919](https://github.com/mikro-orm/mikro-orm/issues/2919) * **postgres:** fix pagination with order by UUID PK ([042626c](https://github.com/mikro-orm/mikro-orm/commit/042626c6aa1c1538ce65fb12db435b088e11e518)), closes [#2910](https://github.com/mikro-orm/mikro-orm/issues/2910) * **postgres:** respect known schema when loading wild card entity relations ([61d1e85](https://github.com/mikro-orm/mikro-orm/commit/61d1e853db610d46c23d56b0bc9fe03383da005d)), closes [#2909](https://github.com/mikro-orm/mikro-orm/issues/2909) * **schema:** respect `disableForeignKeys` in schema generator ([f1b8e46](https://github.com/mikro-orm/mikro-orm/commit/f1b8e46af0f9b01c9c2fc1372c588dce98313656)), closes [#2912](https://github.com/mikro-orm/mikro-orm/issues/2912) ### Features[​](#features-78 "Direct link to Features") * **core:** validate `em.begin` was called when using `em.commit/rollback` ([67fa076](https://github.com/mikro-orm/mikro-orm/commit/67fa076df1753e9dc433dbc79657b4f240949d8d)), closes [#2918](https://github.com/mikro-orm/mikro-orm/issues/2918) ## [5.1.0](https://github.com/mikro-orm/mikro-orm/compare/v5.0.5...v5.1.0) (2022-03-13)[​](#510-2022-03-13 "Direct link to 510-2022-03-13") ### Bug Fixes[​](#bug-fixes-146 "Direct link to Bug Fixes") * **core:** do not alias JSON conditions on update/delete queries ([5c0674e](https://github.com/mikro-orm/mikro-orm/commit/5c0674e61d97f9b143b48ae5314e5e7d1eeb4529)), closes [#2839](https://github.com/mikro-orm/mikro-orm/issues/2839) * **core:** ensure all entities from inner context are merged to the upper one ([7b3a6b4](https://github.com/mikro-orm/mikro-orm/commit/7b3a6b4fb2ea2850959160cb9462c1992f1bd7bd)), closes [#2882](https://github.com/mikro-orm/mikro-orm/issues/2882) * **core:** fix object key utilities for null prototype objects ([#2847](https://github.com/mikro-orm/mikro-orm/issues/2847)) ([b2cf01e](https://github.com/mikro-orm/mikro-orm/commit/b2cf01ee8b3f00273a8a8af88f56e7af97f02cc8)), closes [#2846](https://github.com/mikro-orm/mikro-orm/issues/2846) * **core:** fix ordering by complex composite PKs ([dde11d3](https://github.com/mikro-orm/mikro-orm/commit/dde11d3b2fdd62df28f57c6410e47e14a087ecf3)), closes [#2886](https://github.com/mikro-orm/mikro-orm/issues/2886) * **core:** fix strict type for `orderBy` when entity has `length` property ([ef45871](https://github.com/mikro-orm/mikro-orm/commit/ef4587143d614d71c16f7576c04ed6d74b77fa80)), closes [#2829](https://github.com/mikro-orm/mikro-orm/issues/2829) * **core:** type global `entityRepository` option weakly ([3faf8bc](https://github.com/mikro-orm/mikro-orm/commit/3faf8bcea57a7e32886ce67cae94321e873b1f9a)) * **knex:** `order by` with a formula field should not include `as` ([#2848](https://github.com/mikro-orm/mikro-orm/issues/2848)) ([09e8bfa](https://github.com/mikro-orm/mikro-orm/commit/09e8bfa036962af13449d5e164ce6a983aa48094)) * **knex:** fully qualify sub-query order-by fields ([#2835](https://github.com/mikro-orm/mikro-orm/issues/2835)) ([f74dc73](https://github.com/mikro-orm/mikro-orm/commit/f74dc73ef8aa0c256b30811aeb3c2269a8a94aa1)) * **mysql:** mark FK columns as unsigned for mixed composite PKs ([67806cb](https://github.com/mikro-orm/mikro-orm/commit/67806cb8ff79ae312295e615533ebec399823579)), closes [#2844](https://github.com/mikro-orm/mikro-orm/issues/2844) * **postgres:** respect schema name in migration storage ([fbf9bfa](https://github.com/mikro-orm/mikro-orm/commit/fbf9bfa3aad21a4175dea91cd1a6c9742541cbc6)), closes [#2828](https://github.com/mikro-orm/mikro-orm/issues/2828) ### Features[​](#features-79 "Direct link to Features") * **core:** allow better control over connection type when using read-replicas ([#2896](https://github.com/mikro-orm/mikro-orm/issues/2896)) ([e40ae2d](https://github.com/mikro-orm/mikro-orm/commit/e40ae2d65abe3d49435356cf79068de5c3d73bd1)) * **core:** allow specifying custom pivot table entity ([#2901](https://github.com/mikro-orm/mikro-orm/issues/2901)) ([8237d16](https://github.com/mikro-orm/mikro-orm/commit/8237d168479c5a61af28cf1a51fcd52f23079179)) * **core:** allow using hooks for interface entities ([#2895](https://github.com/mikro-orm/mikro-orm/issues/2895)) ([aee99b1](https://github.com/mikro-orm/mikro-orm/commit/aee99b1a7ecf392ed4233c2ac5bbc365dfd278c1)) * **core:** enable `QueryFlag.PAGINATE` automatically for `em.find()` ([ccb4223](https://github.com/mikro-orm/mikro-orm/commit/ccb4223c2a6ea39103fa9b82ccee8f0b3a9e4f1e)), closes [#2867](https://github.com/mikro-orm/mikro-orm/issues/2867) * **core:** map check constraint failures to specific error type ([ebcbdff](https://github.com/mikro-orm/mikro-orm/commit/ebcbdfff43cdc4069fc1c70de516493782619123)), closes [#2836](https://github.com/mikro-orm/mikro-orm/issues/2836) ## [5.0.5](https://github.com/mikro-orm/mikro-orm/compare/v5.0.4...v5.0.5) (2022-02-27)[​](#505-2022-02-27 "Direct link to 505-2022-02-27") ### Bug Fixes[​](#bug-fixes-147 "Direct link to Bug Fixes") * **core:** fix auto-joining multiple 1:1 properties ([0566e74](https://github.com/mikro-orm/mikro-orm/commit/0566e74b9587f28318bfbef384cb7ead8203aed9)), closes [#2821](https://github.com/mikro-orm/mikro-orm/issues/2821) * **core:** respect `orphanRemoval` in 1:1 relations ([#2816](https://github.com/mikro-orm/mikro-orm/issues/2816)) ([55ff07b](https://github.com/mikro-orm/mikro-orm/commit/55ff07be3f781d2c6a788a463d26dec38570509c)) * **knex:** respect explicit transaction in `em.count()` ([#2818](https://github.com/mikro-orm/mikro-orm/issues/2818)) ([2d26a63](https://github.com/mikro-orm/mikro-orm/commit/2d26a631ebcc2bb1d1315f40f95594dca0abe9fc)) * **migrations:** ensure executedAt is a `Date` when listing executed migrations ([c8753ee](https://github.com/mikro-orm/mikro-orm/commit/c8753eec7b1130bf084d04ce32f9fe23aced7e21)), closes [#2817](https://github.com/mikro-orm/mikro-orm/issues/2817) * **query-builder:** use paginate flag automatically based on to-many joins ([db9963f](https://github.com/mikro-orm/mikro-orm/commit/db9963fff8ceb980354b328f2d59353b9177aef3)), closes [#2823](https://github.com/mikro-orm/mikro-orm/issues/2823) ## [5.0.4](https://github.com/mikro-orm/mikro-orm/compare/v5.0.3...v5.0.4) (2022-02-22)[​](#504-2022-02-22 "Direct link to 504-2022-02-22") ### Bug Fixes[​](#bug-fixes-148 "Direct link to Bug Fixes") * **core:** always create new entities as initialized ([bbb30c5](https://github.com/mikro-orm/mikro-orm/commit/bbb30c5bfb5fbda0b0d7464abd64b07d4166c58d)) * **core:** fix mapping default values of relation properties ([bc57ed0](https://github.com/mikro-orm/mikro-orm/commit/bc57ed0e2d0e5a2f92e4ddaa5cdd77ff88195a85)) * **core:** fix propagation of FK as PK with not flushed entity ([25be857](https://github.com/mikro-orm/mikro-orm/commit/25be857354999626abdf17c386a95559d37b3b56)), closes [#2810](https://github.com/mikro-orm/mikro-orm/issues/2810) * **core:** fix unsetting identity of orphans (1:1 with orphan removal) ([91e7315](https://github.com/mikro-orm/mikro-orm/commit/91e7315f86f6e31f7ff30589dac82882a9f09783)), closes [#2806](https://github.com/mikro-orm/mikro-orm/issues/2806) * **core:** respect schema from config when adding new entities to context ([7a6b6e2](https://github.com/mikro-orm/mikro-orm/commit/7a6b6e2f130527909887643765c0c051f57a052a)) * **core:** respect load strategy specified in property definition ([1a6b4b2](https://github.com/mikro-orm/mikro-orm/commit/1a6b4b2c7cc902c32aeff2d99a5dd666b221089e)), closes [#2803](https://github.com/mikro-orm/mikro-orm/issues/2803) * **entity-generator:** fix property names for columns with dashes ([#2813](https://github.com/mikro-orm/mikro-orm/issues/2813)) ([c920d5f](https://github.com/mikro-orm/mikro-orm/commit/c920d5f1e025d1602d04f6d339f2e3f697049035)) * **schema:** escape table/column comments ([fff1581](https://github.com/mikro-orm/mikro-orm/commit/fff1581d7ff8f2ab5014e57d14c3938e120eb272)), closes [#2805](https://github.com/mikro-orm/mikro-orm/issues/2805) ## [5.0.3](https://github.com/mikro-orm/mikro-orm/compare/v5.0.2...v5.0.3) (2022-02-20)[​](#503-2022-02-20 "Direct link to 503-2022-02-20") ### Bug Fixes[​](#bug-fixes-149 "Direct link to Bug Fixes") * **core:** do not trigger global context validation from repositories ([f651865](https://github.com/mikro-orm/mikro-orm/commit/f651865a3adab17a3025e76dc094b04b1f004181)), closes [#2778](https://github.com/mikro-orm/mikro-orm/issues/2778) * **core:** fix processing of `onUpdate` properties ([9cf454e](https://github.com/mikro-orm/mikro-orm/commit/9cf454ef8a91239e00fad27d41d00b18c8f18263)), closes [#2781](https://github.com/mikro-orm/mikro-orm/issues/2781) * **core:** fix processing of multiple `onUpdate` properties on one entity ([4f0e4cc](https://github.com/mikro-orm/mikro-orm/commit/4f0e4cc959269a8485684d18e156795372a9bd37)), closes [#2784](https://github.com/mikro-orm/mikro-orm/issues/2784) * **core:** hydrate not-null embeddable prop even with all null values ([09aee05](https://github.com/mikro-orm/mikro-orm/commit/09aee05105c2da231a18afaf639285e74da62a3a)), closes [#2774](https://github.com/mikro-orm/mikro-orm/issues/2774) * **core:** register entity to identity map as early as possible ([d8f3613](https://github.com/mikro-orm/mikro-orm/commit/d8f3613402ca51d02f74a3f8af4dae63ffdfcd60)), closes [#2777](https://github.com/mikro-orm/mikro-orm/issues/2777) * **core:** respect `onDelete: cascade` when propagating removal ([f1e8578](https://github.com/mikro-orm/mikro-orm/commit/f1e85787703a93d33ff47bdd155afc8f0b3f6777)), closes [#2703](https://github.com/mikro-orm/mikro-orm/issues/2703) * **core:** revert to `require()` when getting ORM version to fix webpack support ([6cfb526](https://github.com/mikro-orm/mikro-orm/commit/6cfb5269696a9c0991198b238667c40f0dae2250)), closes [#2799](https://github.com/mikro-orm/mikro-orm/issues/2799) * **migrations:** generate snapshot too when using `--initial` ([4857be7](https://github.com/mikro-orm/mikro-orm/commit/4857be73d5f21b7152dcf2e1acd31327d600d37f)), closes [#2800](https://github.com/mikro-orm/mikro-orm/issues/2800) * **postgres:** consider int8 as numeric when inferring autoincrement value ([64bc99d](https://github.com/mikro-orm/mikro-orm/commit/64bc99d3ddb2293dbf4a3cb70aa22e16ac813b2d)), closes [#2791](https://github.com/mikro-orm/mikro-orm/issues/2791) * **sqlite:** respect `autoincrement: false` in schema diffing ([b39b6ad](https://github.com/mikro-orm/mikro-orm/commit/b39b6ada0e276a21c3089558a996092174b546fc)), closes [#2800](https://github.com/mikro-orm/mikro-orm/issues/2800) * **typing:** fix populate hints on collections where both type args are provided ([e39ef5b](https://github.com/mikro-orm/mikro-orm/commit/e39ef5b9acdb5f052d9e4f0d3d6c04af5f43eefb)), closes [#2771](https://github.com/mikro-orm/mikro-orm/issues/2771) ### Features[​](#features-80 "Direct link to Features") * add better-sqlite driver ([#2792](https://github.com/mikro-orm/mikro-orm/issues/2792)) ([1b39d66](https://github.com/mikro-orm/mikro-orm/commit/1b39d6687fc2db64e85a45f6a964cf1776a374aa)) * **core:** add `connect` config option ([8aaad33](https://github.com/mikro-orm/mikro-orm/commit/8aaad33a6ea8008450ccb8847237510400e00b94)) * **core:** add `SchemaGenerator.clearDatabase()` ([ecad9c6](https://github.com/mikro-orm/mikro-orm/commit/ecad9c68e8013350bef75b402d6f3c526389765b)), closes [#2220](https://github.com/mikro-orm/mikro-orm/issues/2220) * **core:** add populate option to `Reference.load` and `Collection.loadItems` ([1527c1a](https://github.com/mikro-orm/mikro-orm/commit/1527c1a1c2ec7034f6deabf4f37134562aa59a3c)), closes [#2796](https://github.com/mikro-orm/mikro-orm/issues/2796) ## [5.0.2](https://github.com/mikro-orm/mikro-orm/compare/v5.0.1...v5.0.2) (2022-02-16)[​](#502-2022-02-16 "Direct link to 502-2022-02-16") ### Bug Fixes[​](#bug-fixes-150 "Direct link to Bug Fixes") * **core:** allow passing entity instance in `repo.nativeInsert()` ([791c009](https://github.com/mikro-orm/mikro-orm/commit/791c009e4dadc99137b6337c22d00a73d52087f9)) * **core:** do not ignore schema name from config in `em.getReference()` ([58680fc](https://github.com/mikro-orm/mikro-orm/commit/58680fc28a672abdfeff2636bfbecbfdef500e7d)) * **core:** do not ignore schema name in batch queries ([b47393e](https://github.com/mikro-orm/mikro-orm/commit/b47393e30eb495b81d124c523b00cb4620593ff0)) * **core:** do not ignore schema name in collection updates ([d688dc1](https://github.com/mikro-orm/mikro-orm/commit/d688dc19270277370f129f67e4347f2139a9313e)) * **core:** do not ignore value from database even if we only have a getter ([35103b3](https://github.com/mikro-orm/mikro-orm/commit/35103b335727a19bc12f95b3cc5918058917722f)), closes [#2760](https://github.com/mikro-orm/mikro-orm/issues/2760) * **core:** respect global schema ([b569686](https://github.com/mikro-orm/mikro-orm/commit/b569686af7746551bd8779d694fa11035b80a736)) * **postgres:** do not ignore custom PK constraint names ([3201ef7](https://github.com/mikro-orm/mikro-orm/commit/3201ef7b2b2f4ea745f946da0966da9f94fd2cc8)), closes [#2762](https://github.com/mikro-orm/mikro-orm/issues/2762) * **seeder:** declare missing dependency on globby ([0599032](https://github.com/mikro-orm/mikro-orm/commit/05990328ccad8b0e8a37b0eb323a89d1df876976)) * **typing:** remove overloads for `em.nativeInsert()` ([e21d470](https://github.com/mikro-orm/mikro-orm/commit/e21d47013b2ece6768caebc813c869e1cf2a35f2)) ## [5.0.1](https://github.com/mikro-orm/mikro-orm/compare/v5.0.0...v5.0.1) (2022-02-13)[​](#501-2022-02-13 "Direct link to 501-2022-02-13") ### Bug Fixes[​](#bug-fixes-151 "Direct link to Bug Fixes") * **core:** allow cloning QB with raw conditions ([04d9d88](https://github.com/mikro-orm/mikro-orm/commit/04d9d885492e845bb25c33a3c9ff3a2b9d448d38)), closes [#2748](https://github.com/mikro-orm/mikro-orm/issues/2748) * **core:** allow using 0 as PK ([a2e423c](https://github.com/mikro-orm/mikro-orm/commit/a2e423c5e7006f4869e87b842f646f502ab3846b)), closes [#2729](https://github.com/mikro-orm/mikro-orm/issues/2729) * **core:** do not propagate removal to FK as PK ([a0a19c2](https://github.com/mikro-orm/mikro-orm/commit/a0a19c22604586c1f3256aba7759c3204e1f02b0)), closes [#2723](https://github.com/mikro-orm/mikro-orm/issues/2723) * **core:** fix support for complex composite (nested) PKs ([a7fc7a1](https://github.com/mikro-orm/mikro-orm/commit/a7fc7a19125e43a8cc9edca8cb8e50e5d54b58b1)), closes [#2647](https://github.com/mikro-orm/mikro-orm/issues/2647) * **core:** ignore ORM packages where we failed to extract version ([b1627c5](https://github.com/mikro-orm/mikro-orm/commit/b1627c502949ef73530dd0c20a829f0bdc5de2fc)), closes [#2732](https://github.com/mikro-orm/mikro-orm/issues/2732) * **core:** respect `null` in `Loaded` type ([72385b3](https://github.com/mikro-orm/mikro-orm/commit/72385b3d752e07a7c17ba4f329018de2b16fbfbf)), closes [#2750](https://github.com/mikro-orm/mikro-orm/issues/2750) * **core:** return entity type from `em.create()` instead of `New` ([8ff277d](https://github.com/mikro-orm/mikro-orm/commit/8ff277dbf5ea5919445c318bbb74c2c823b53fc4)), closes [#2727](https://github.com/mikro-orm/mikro-orm/issues/2727) * **core:** support special characters in `clientUrl` ([43e28b8](https://github.com/mikro-orm/mikro-orm/commit/43e28b8739f4e60814328d99129943c8a3975082)), closes [#2730](https://github.com/mikro-orm/mikro-orm/issues/2730) * **core:** use `createRequire` instead of dynamic import for JSON files ([f567d2d](https://github.com/mikro-orm/mikro-orm/commit/f567d2d073854163e6de8bddbf8e1a256a6fcaed)), closes [#2738](https://github.com/mikro-orm/mikro-orm/issues/2738) * **embeddables:** fix loading inline embeddables with joined strategy ([adaa5c6](https://github.com/mikro-orm/mikro-orm/commit/adaa5c648f5f7466aa149a7cee02f0d83abe032e)), closes [#2717](https://github.com/mikro-orm/mikro-orm/issues/2717) * **esm:** fix getting ORM version on windows with ESM ([eb3a1be](https://github.com/mikro-orm/mikro-orm/commit/eb3a1be5d777252685e401c978a28c86a60c8bde)) * **mongo:** fix caching populated results in mongo ([42ea5be](https://github.com/mikro-orm/mikro-orm/commit/42ea5be05677c85315ea65ac2e47f82d9de03754)), closes [#2754](https://github.com/mikro-orm/mikro-orm/issues/2754) * **query-builder:** respect explicit entity schema ([717aa5e](https://github.com/mikro-orm/mikro-orm/commit/717aa5e823e02c4d0ee6d7ab7afc8afa28887433)), closes [#2740](https://github.com/mikro-orm/mikro-orm/issues/2740) * **schema:** fix explicit schema name support ([#2752](https://github.com/mikro-orm/mikro-orm/issues/2752)) ([68631ea](https://github.com/mikro-orm/mikro-orm/commit/68631ea786e40aecd8ffc31baead9a23699874b7)) * **seeder:** fix Factory type for entity with constructor params ([#2745](https://github.com/mikro-orm/mikro-orm/issues/2745)) ([8b7b977](https://github.com/mikro-orm/mikro-orm/commit/8b7b97729935d9fe35f8b57cd9e64dddc8fa86e6)) * **typing:** exclude symbols and functions from `FilterQuery` ([1d24eb8](https://github.com/mikro-orm/mikro-orm/commit/1d24eb87b2e833cd9ab86f2859fc7fee0db3e378)), closes [#2742](https://github.com/mikro-orm/mikro-orm/issues/2742) ### Features[​](#features-81 "Direct link to Features") * **core:** add `getContext` parameter to `@UseRequestContext()` ([9516b48](https://github.com/mikro-orm/mikro-orm/commit/9516b48525929d3bbef1794b25fa862048c589f7)), closes [#2721](https://github.com/mikro-orm/mikro-orm/issues/2721) * **query-builder:** allow autocomplete on `qb.orderBy()` ([fdf03c3](https://github.com/mikro-orm/mikro-orm/commit/fdf03c38322f79e0b41181b834db903d5138124d)), closes [#2747](https://github.com/mikro-orm/mikro-orm/issues/2747) * **schema:** ensure database when calling `refreshDatabase()` ([7ce12d6](https://github.com/mikro-orm/mikro-orm/commit/7ce12d6f54845d169c769084d90ec82a1ab15c35)) * **seeder:** refactor seeder to support running compiled files ([#2751](https://github.com/mikro-orm/mikro-orm/issues/2751)) ([8d9c4c0](https://github.com/mikro-orm/mikro-orm/commit/8d9c4c0454d06920cd59647f1f2ea4070ea2bd5a)), closes [#2728](https://github.com/mikro-orm/mikro-orm/issues/2728) ## [5.0.0](https://github.com/mikro-orm/mikro-orm/compare/v4.5.10...v5.0.0) (2022-02-06)[​](#500-2022-02-06 "Direct link to 500-2022-02-06") ### Bug Fixes[​](#bug-fixes-152 "Direct link to Bug Fixes") * **assign:** do not convert FK to entity when assigning to `mapToPK` property ([b14c8fb](https://github.com/mikro-orm/mikro-orm/commit/b14c8fbacfb3cf9e6b1991f268b73cd193890190)), closes [#2337](https://github.com/mikro-orm/mikro-orm/issues/2337) * **cli:** validate configuration in CLI cache commands ([#2146](https://github.com/mikro-orm/mikro-orm/issues/2146)) ([544583b](https://github.com/mikro-orm/mikro-orm/commit/544583b3158ff408eab3982b63585adc9a637b5a)), closes [#2145](https://github.com/mikro-orm/mikro-orm/issues/2145) * **core**: allow calling `em.create()` with reference wrapper ([c069960](https://github.com/mikro-orm/mikro-orm/commit/c069960)) * **core**: allow empty strings in postgres arrays ([#2680](https://github.com/mikro-orm/mikro-orm/issues/2680)) ([5a33722](https://github.com/mikro-orm/mikro-orm/commit/5a33722)) * **core**: allow using MongoNamingStrategy with SQL drivers ([c38c66c](https://github.com/mikro-orm/mikro-orm/commit/c38c66c)) * **core**: fix pivot tables for wild card schema entities ([623dc91](https://github.com/mikro-orm/mikro-orm/commit/623dc91)) * **core**: fix populating entities with wildcard schema ([98d0bfb](https://github.com/mikro-orm/mikro-orm/commit/98d0bfb)) * **core**: fix support for nested composite PKs ([14dcff8](https://github.com/mikro-orm/mikro-orm/commit/14dcff8)) * **core**: handle `file://` urls in normalizePath ([#2697](https://github.com/mikro-orm/mikro-orm/issues/2697)) ([127b0ae](https://github.com/mikro-orm/mikro-orm/commit/127b0ae)) * **core**: respect request context when creating QB ([a2b7b84](https://github.com/mikro-orm/mikro-orm/commit/a2b7b84)) * **core**: respect specified schema when populating (select-in) ([#2676](https://github.com/mikro-orm/mikro-orm/issues/2676)) ([21a1be0](https://github.com/mikro-orm/mikro-orm/commit/21a1be0)) * **core:** allow non-standard property names (hyphens, spaces, ...) ([cc68230](https://github.com/mikro-orm/mikro-orm/commit/cc682305b44bd4ef886e7a744f8f4b1d69d090ff)), closes [#1958](https://github.com/mikro-orm/mikro-orm/issues/1958) * **core:** allow propagation to multiple matching inverse sides ([cf7d538](https://github.com/mikro-orm/mikro-orm/commit/cf7d5387a26016b78c11a54d96686eea7ae7b73f)), closes [#2371](https://github.com/mikro-orm/mikro-orm/issues/2371) * **core:** consider objects without prototype as POJO ([b49807f](https://github.com/mikro-orm/mikro-orm/commit/b49807f181365367ecdb25c85bddabe8e2ca3c5a)), closes [#2274](https://github.com/mikro-orm/mikro-orm/issues/2274) * **core:** declare peer dependencies on driver packages ([1873e8c](https://github.com/mikro-orm/mikro-orm/commit/1873e8c4b9b5b9cb5979604f529ddd0cc6717042)), closes [#2110](https://github.com/mikro-orm/mikro-orm/issues/2110) * **core:** detect ts-jest usage ([94acc18](https://github.com/mikro-orm/mikro-orm/commit/94acc187b01950124ce8a54eadd3e8cee144e35a)) * **core:** do not check stack trace when detecting ts-node ([06cca85](https://github.com/mikro-orm/mikro-orm/commit/06cca8542677691eaf35f8b037151050c93d2bbc)) * **core:** do not override existing values via `prop.onCreate` ([fb67ea6](https://github.com/mikro-orm/mikro-orm/commit/fb67ea6c984302273df9915811aff7dcba795ff7)) * **core:** do not propagate `mapToPk` properties ([b93c59e](https://github.com/mikro-orm/mikro-orm/commit/b93c59ec8224ceb9f5070e3fa722a1b32fb39577)) * **core:** fix conversion of custom type PKs in some cases ([28e83ef](https://github.com/mikro-orm/mikro-orm/commit/28e83ef9364293fa450877b79401aac18ade6ed7)), closes [#1263](https://github.com/mikro-orm/mikro-orm/issues/1263) * **core:** fix nested query with fk as pk ([#2650](https://github.com/mikro-orm/mikro-orm/issues/2650)) ([cc54ff9](https://github.com/mikro-orm/mikro-orm/commit/cc54ff94e6c3bc79fd6fb67b169df7489cd1405c)), closes [#2648](https://github.com/mikro-orm/mikro-orm/issues/2648) * **core:** fix ordering by pivot table with explicit schema name ([eb1f9bb](https://github.com/mikro-orm/mikro-orm/commit/eb1f9bb1b10beedfbd5bf4b27aabe485e68e1dc9)), closes [#2621](https://github.com/mikro-orm/mikro-orm/issues/2621) * **core:** fix propagation of locking option with select-in population ([f3990d0](https://github.com/mikro-orm/mikro-orm/commit/f3990d0e6eabd40434bbf8d5259519a99423e514)), closes [#1670](https://github.com/mikro-orm/mikro-orm/issues/1670) * **core:** improve partial loading of 1 :m relations ([3ddde1e](https://github.com/mikro-orm/mikro-orm/commit/3ddde1e9a5e31c245da44ebaa96332ee61ef0c61)), closes [#2651](https://github.com/mikro-orm/mikro-orm/issues/2651) * **core:** issue early delete queries for recreating unique properties ([decfd10](https://github.com/mikro-orm/mikro-orm/commit/decfd10721958db51752e59c1827c6ad2e29ab55)), closes [#2273](https://github.com/mikro-orm/mikro-orm/issues/2273) * **core:** propagate `em.remove()` to 1 :m collections ([c23c39c](https://github.com/mikro-orm/mikro-orm/commit/c23c39cf70a3f417a6537a2941db87b89b6d78db)), closes [#2395](https://github.com/mikro-orm/mikro-orm/issues/2395) * **core:** propagate `em.remove()` to m:1 properties of 1 :m relations ([e6fa2f7](https://github.com/mikro-orm/mikro-orm/commit/e6fa2f7841b4508406d3a36caec31f63b2aaa4bf)), closes [#2636](https://github.com/mikro-orm/mikro-orm/issues/2636) * **core:** reload default values after flush in mysql/sqlite ([d57a6a9](https://github.com/mikro-orm/mikro-orm/commit/d57a6a9a4583c4771777bd60ad914647cad8cdb0)), closes [#2581](https://github.com/mikro-orm/mikro-orm/issues/2581) * **core:** respect read replica options ([#2152](https://github.com/mikro-orm/mikro-orm/issues/2152)) ([9ec668d](https://github.com/mikro-orm/mikro-orm/commit/9ec668d201d9017359812d8bebcfc063aac60f55)), closes [#1963](https://github.com/mikro-orm/mikro-orm/issues/1963) * **core:** rework orphan removal and cascading ([#2532](https://github.com/mikro-orm/mikro-orm/issues/2532)) ([eb3ea4a](https://github.com/mikro-orm/mikro-orm/commit/eb3ea4a5c187706ea745cb160d2078d57a975e53)) * **core:** save collection snapshots recursively after flush ([3f5ba2f](https://github.com/mikro-orm/mikro-orm/commit/3f5ba2fb27695da6731d6f79937c849aa0137b8d)), closes [#2410](https://github.com/mikro-orm/mikro-orm/issues/2410) [#2411](https://github.com/mikro-orm/mikro-orm/issues/2411) * **core:** schedule orphan removal on 1:1 inverse sides when relation nulled ([a904fe8](https://github.com/mikro-orm/mikro-orm/commit/a904fe841f15334ed79fdb41d63af0036c7e628d)), closes [#2273](https://github.com/mikro-orm/mikro-orm/issues/2273) * **core:** support loading lazy scalar properties via `em.populate()` ([c20fe88](https://github.com/mikro-orm/mikro-orm/commit/c20fe883268ecd844d31818dd59cf0cf24b16d2b)), closes [#1479](https://github.com/mikro-orm/mikro-orm/issues/1479) * **core:** sync `MigrateOptions` type in core with migrations package ([#2259](https://github.com/mikro-orm/mikro-orm/issues/2259)) ([d4b8c2c](https://github.com/mikro-orm/mikro-orm/commit/d4b8c2ca07fda96c0935b595fabd7c19ceed904f)) * **core:** truly load the whole entity graph when `populate: true` ([3c21663](https://github.com/mikro-orm/mikro-orm/commit/3c216638f2f472bffd90a41dea69e1db2ecfe23d)), closes [#1134](https://github.com/mikro-orm/mikro-orm/issues/1134) * **core:** use clean internal identity map with `disableIdentityMap` ([0677d74](https://github.com/mikro-orm/mikro-orm/commit/0677d74664e975c0b16afb1b90da260e9d7df1a3)), closes [#1307](https://github.com/mikro-orm/mikro-orm/issues/1307) * **embeddables:** order of discovery of embeddables should not matter ([d955b29](https://github.com/mikro-orm/mikro-orm/commit/d955b29913906a23ecc767c41c42292271fe7a8d)), closes [#2149](https://github.com/mikro-orm/mikro-orm/issues/2149) * **knex:** quote version column ([#2402](https://github.com/mikro-orm/mikro-orm/issues/2402)) ([5bbbd15](https://github.com/mikro-orm/mikro-orm/commit/5bbbd159375c273743e2e3d6bc5233d2eb8b8f1c)), closes [#2401](https://github.com/mikro-orm/mikro-orm/issues/2401) * **migrations**: clear the migrations table in `migration:fresh` ([63eb4e6](https://github.com/mikro-orm/mikro-orm/commit/63eb4e6)) * **migrations**: respect `baseDir` and allow absolute paths for sqlite `dbName` ([36a3ae5](https://github.com/mikro-orm/mikro-orm/commit/36a3ae5)) * **postgres:** allow type casting in nested conditions ([bbd0eb4](https://github.com/mikro-orm/mikro-orm/commit/bbd0eb42f530105d27752c7b713a1fdf7b505ae7)), closes [#2227](https://github.com/mikro-orm/mikro-orm/issues/2227) * **postgres:** fix runtime support for native pg enum arrays ([#2584](https://github.com/mikro-orm/mikro-orm/issues/2584)) ([fcdb9b0](https://github.com/mikro-orm/mikro-orm/commit/fcdb9b02b2d2f85f858ec64d8590e8d984a85f08)) * **postgres:** limit index names to 64 characters ([48c105a](https://github.com/mikro-orm/mikro-orm/commit/48c105a1d5705a0ec42b3a017790ab8537ec6114)), closes [#1915](https://github.com/mikro-orm/mikro-orm/issues/1915) * **postgres:** support comparing array columns via `$eq` ([6eb320e](https://github.com/mikro-orm/mikro-orm/commit/6eb320e233633af7c9b26219393e2caa816fd59f)), closes [#2462](https://github.com/mikro-orm/mikro-orm/issues/2462) * **query-builder**: fix mapping of formula properties ([2607266](https://github.com/mikro-orm/mikro-orm/commit/2607266)) * **query-builder**: respect `0` as limit ([#2700](https://github.com/mikro-orm/mikro-orm/issues/2700)) ([3f284ed](https://github.com/mikro-orm/mikro-orm/commit/3f284ed)) * **query-builder:** fix nested ordered pagination ([#2351](https://github.com/mikro-orm/mikro-orm/issues/2351)) ([c5a5c6b](https://github.com/mikro-orm/mikro-orm/commit/c5a5c6b1a49bae334d6e061ae06ffd8c5496b161)) * **query-builder:** support joining same property multiple times ([b62fb05](https://github.com/mikro-orm/mikro-orm/commit/b62fb0533d8e845d3b8db31bafde8ad44c51f2dc)), closes [#2602](https://github.com/mikro-orm/mikro-orm/issues/2602) * **query-builder:** translate field names in `qb.merge()` ([5aead23](https://github.com/mikro-orm/mikro-orm/commit/5aead23e547027bf97f91b2111f5345aa8590135)), closes [#2177](https://github.com/mikro-orm/mikro-orm/issues/2177) * **query-builder:** validate missing `onConflict` calls ([30392bc](https://github.com/mikro-orm/mikro-orm/commit/30392bcdce9d2d5b585fd7aa2d01f87a2d25d4a2)), closes [#1803](https://github.com/mikro-orm/mikro-orm/issues/1803) * **schema**: do not ignore entity level indexes with just expression ([0ee9c4d](https://github.com/mikro-orm/mikro-orm/commit/0ee9c4d)) * **schema:** improve diffing of default values for strings and dates ([d4ac638](https://github.com/mikro-orm/mikro-orm/commit/d4ac6385aa84208732f144e6bd9f68e8cf5c6697)), closes [#2385](https://github.com/mikro-orm/mikro-orm/issues/2385) * **seeder**: fork EM in the seeder manager so we don't use global context ([022a1cc](https://github.com/mikro-orm/mikro-orm/commit/022a1cc)) * **sql**: split `$and` branches when auto joining to-many relations ([70c795a](https://github.com/mikro-orm/mikro-orm/commit/70c795a)) * **sti:** allow m :n relations between two STI entities ([6c797e9](https://github.com/mikro-orm/mikro-orm/commit/6c797e9e8f578bbcd77bdd1220e7b07e3d4d46e8)), closes [#2246](https://github.com/mikro-orm/mikro-orm/issues/2246) * **ts-morph:** fix validation of embedded polymorphic arrays ([b6a068a](https://github.com/mikro-orm/mikro-orm/commit/b6a068ae16c5bb9355c7544b7480e89923fa6560)) * **types**: fix populate type hints for nullable properties ([bc1bf76](https://github.com/mikro-orm/mikro-orm/commit/bc1bf76)) * **validation:** throw when calling `qb.update/delete()` after `qb.where()` ([96893e0](https://github.com/mikro-orm/mikro-orm/commit/96893e01d0f7044f878e8dbe3d355ba11132eafe)), closes [#2390](https://github.com/mikro-orm/mikro-orm/issues/2390) ### Features[​](#features-82 "Direct link to Features") * **cli**: validate CLI package is installed locally ([8952149](https://github.com/mikro-orm/mikro-orm/commit/8952149)) * **cli:** add `database:create` command ([#1778](https://github.com/mikro-orm/mikro-orm/issues/1778)) ([7e9d97d](https://github.com/mikro-orm/mikro-orm/commit/7e9d97d06c7f07db93a3b033909bda21594e7ac6)), closes [#1757](https://github.com/mikro-orm/mikro-orm/issues/1757) * **cli:** allow exporting async functions from CLI config ([912728d](https://github.com/mikro-orm/mikro-orm/commit/912728d491be22aee7e893bbd854d0722b9e9f7b)) * **cli:** improve loading of CLI settings from package.json ([03f9ddd](https://github.com/mikro-orm/mikro-orm/commit/03f9dddcc748ee322adcf2886a05ef0605b36d95)), closes [#545](https://github.com/mikro-orm/mikro-orm/issues/545) * **cli:** only warn with `useTsNode: true` without ts-node available ([5aff134](https://github.com/mikro-orm/mikro-orm/commit/5aff134d6c2a2be7093a465de68a33b41829cc0a)), closes [#1957](https://github.com/mikro-orm/mikro-orm/issues/1957) * **core**: add `em.clearCache(key)` method ([1ccfad8](https://github.com/mikro-orm/mikro-orm/commit/1ccfad8)) * **core**: add `persistOnCreate` option and enable it for seeder ([f0fec1b](https://github.com/mikro-orm/mikro-orm/commit/f0fec1b)) * **core**: add custom table check constraint support for postgres ([#2688](https://github.com/mikro-orm/mikro-orm/issues/2688)) ([89aca5f](https://github.com/mikro-orm/mikro-orm/commit/89aca5f)) * **core**: allow defining check constraints via callback ([965f740](https://github.com/mikro-orm/mikro-orm/commit/965f740)) * **core**: expose `referencedColumnNames` on m:1/1:1 decorators ([2f5a5e1](https://github.com/mikro-orm/mikro-orm/commit/2f5a5e1)) * **core**: make `em.create()` respect required properties ([2385f1d](https://github.com/mikro-orm/mikro-orm/commit/2385f1d)) * **core**: validate required properties before flushing new entities ([9eec3a9](https://github.com/mikro-orm/mikro-orm/commit/9eec3a9)) * **core**: validate version mismatch in ORM packages ([cf70219](https://github.com/mikro-orm/mikro-orm/commit/cf70219)) * **core:** add `EventType.onLoad` that fires after entity is fully loaded ([14c2fa9](https://github.com/mikro-orm/mikro-orm/commit/14c2fa9763d9bbabc43e2b513d9285ed52df3de2)) * **core:** add `freshEventManager` to `em.fork()` options ([a0f3fd0](https://github.com/mikro-orm/mikro-orm/commit/a0f3fd09a7818ad9bebf6074b44c09ecced23858)), closes [#1741](https://github.com/mikro-orm/mikro-orm/issues/1741) * **core:** add `populateWhere` option ([#2660](https://github.com/mikro-orm/mikro-orm/pull/2660)) ([16c5e91](https://github.com/mikro-orm/mikro-orm/commit/16c5e91545b11057b9e78c3f6d910cc409f7f8c1)) * **core:** add `QueryFlag.AUTO_JOIN_ONE_TO_ONE_OWNER` ([be9d9e1](https://github.com/mikro-orm/mikro-orm/commit/be9d9e16d59991fe2ea7a20db56602557845d813)), closes [#1660](https://github.com/mikro-orm/mikro-orm/issues/1660) * **core:** add `Reference.createFromPK()` helper method ([2217154](https://github.com/mikro-orm/mikro-orm/commit/2217154f15f1f2263bbe7c8c81b789c95eb7f6bb)) * **core:** add callback parameter to `Collection.remove()` ([0b37654](https://github.com/mikro-orm/mikro-orm/commit/0b376544d4dd6ff551e4b65bede225b110e0e4b4)), closes [#2398](https://github.com/mikro-orm/mikro-orm/issues/2398) * **core:** add index/key name to naming strategy ([a842e3e](https://github.com/mikro-orm/mikro-orm/commit/a842e3eea80349777ccdf7b8840b3c1860e9607f)) * **core:** add PlainObject class that DTO's can extend to treat class as POJO ([#1837](https://github.com/mikro-orm/mikro-orm/issues/1837)) ([645b27a](https://github.com/mikro-orm/mikro-orm/commit/645b27a4d00a8d607e1d18303be8896a5c87a25b)) * **core:** add support for advanced locking ([0cbed9c](https://github.com/mikro-orm/mikro-orm/commit/0cbed9ccead86cda46cb5d1715fd0b2382d5da18)), closes [#1786](https://github.com/mikro-orm/mikro-orm/issues/1786) * **core:** add support for concurrency checks ([#2437](https://github.com/mikro-orm/mikro-orm/issues/2437)) ([acd43fe](https://github.com/mikro-orm/mikro-orm/commit/acd43feb0f391ec96f82916d94422c8d9b1341b0)) * **core:** add support for custom property ordering ([#2444](https://github.com/mikro-orm/mikro-orm/issues/2444)) ([40ae4d6](https://github.com/mikro-orm/mikro-orm/commit/40ae4d6b96fbc68ac8ff99edc3cd5209e0968527)) * **core:** add support for ESM via `gen-esm-wrapper` ([aa71065](https://github.com/mikro-orm/mikro-orm/commit/aa71065d0727920db7da9bfdecdb33e6b8165cb5)), closes [#1010](https://github.com/mikro-orm/mikro-orm/issues/1010) * **core:** add support for multiple schemas (including UoW) ([#2296](https://github.com/mikro-orm/mikro-orm/issues/2296)) ([d64d100](https://github.com/mikro-orm/mikro-orm/commit/d64d100b0ef6fd3335d234aeac1ffa9b34b8f7ea)), closes [#2074](https://github.com/mikro-orm/mikro-orm/issues/2074) * **core:** add support for polymorphic embeddables ([#2426](https://github.com/mikro-orm/mikro-orm/issues/2426)) ([7b7c3a2](https://github.com/mikro-orm/mikro-orm/commit/7b7c3a22fe517e13a1a610f142c59e758acd3c3f)), closes [#1165](https://github.com/mikro-orm/mikro-orm/issues/1165) * **core:** allow configuring aliasing naming strategy ([#2419](https://github.com/mikro-orm/mikro-orm/issues/2419)) ([89d63b3](https://github.com/mikro-orm/mikro-orm/commit/89d63b399e66cc61a7ba9294b39dacb9a9bf8cd1)) * **core:** allow passing arrays in `orderBy` parameter ([#2211](https://github.com/mikro-orm/mikro-orm/issues/2211)) ([0ec22ed](https://github.com/mikro-orm/mikro-orm/commit/0ec22ed3c88ea0e8c749dc164bb5c1d23ac7b9dc)), closes [#2010](https://github.com/mikro-orm/mikro-orm/issues/2010) * **core:** allow providing custom `Logger` instance ([#2443](https://github.com/mikro-orm/mikro-orm/issues/2443)) ([c7a75e0](https://github.com/mikro-orm/mikro-orm/commit/c7a75e00de01b85ece282cd64429a57a49e5842d)) * **core:** allow using short lived tokens in config ([4499838](https://github.com/mikro-orm/mikro-orm/commit/44998383b21a3aef943a922a3e75426369178f35)), closes [#1818](https://github.com/mikro-orm/mikro-orm/issues/1818) * **core:** automatically infer `populate` hint based on `fields` ([0097539](https://github.com/mikro-orm/mikro-orm/commit/0097539c762c7c79e703bf02cffb24321f11a2b0)), closes [#2468](https://github.com/mikro-orm/mikro-orm/issues/2468) * **core:** conditionally support folder based discovery of ESM ([8c8f0d0](https://github.com/mikro-orm/mikro-orm/commit/8c8f0d0a472c29ddd0696ccdd145ac138a9a8f69)), closes [#2631](https://github.com/mikro-orm/mikro-orm/issues/2631) * **core:** implement auto-flush mode ([#2491](https://github.com/mikro-orm/mikro-orm/issues/2491)) ([f1d8bf1](https://github.com/mikro-orm/mikro-orm/commit/f1d8bf1dcdc769d4db2d79c7fb022b8d11007ce5)), closes [#2359](https://github.com/mikro-orm/mikro-orm/issues/2359) * **core:** implement auto-refreshing of loaded entities ([#2263](https://github.com/mikro-orm/mikro-orm/issues/2263)) ([9dce38c](https://github.com/mikro-orm/mikro-orm/commit/9dce38cd69667907e1eba5cef609ac4ddf6a2945)), closes [#2292](https://github.com/mikro-orm/mikro-orm/issues/2292) * **core:** implement partial loading support for joined loading strategy ([2bebb5e](https://github.com/mikro-orm/mikro-orm/commit/2bebb5e75595ae3369887ee8bed7be48efc45173)), closes [#1707](https://github.com/mikro-orm/mikro-orm/issues/1707) * **core:** keep collection state of dirty collections after initializing ([49ed651](https://github.com/mikro-orm/mikro-orm/commit/49ed65149c6cf02ef6afb533c697a8e0ae281a3a)), closes [#2408](https://github.com/mikro-orm/mikro-orm/issues/2408) * **core:** make `FindOptions.fields` strictly typed (dot notation) ([fd43099](https://github.com/mikro-orm/mikro-orm/commit/fd43099a63cae31ba32f833bed1b75c13f2dd43c)) * **core:** make `populate` parameter strictly typed with dot notation ([3372f02](https://github.com/mikro-orm/mikro-orm/commit/3372f0243f1af34e22a16be2cecba6dc5c04dd0d)) * **core:** move `@UseRequestContext()` decorator to `core` package ([253216d](https://github.com/mikro-orm/mikro-orm/commit/253216d25ef49b32f14958e8892adb00b5d46482)) * **core:** rework deep assigning of entities and enable it by default ([#1978](https://github.com/mikro-orm/mikro-orm/issues/1978)) ([8f455ad](https://github.com/mikro-orm/mikro-orm/commit/8f455ad7dfe37d75f5abb3a83ac4610be74d43a7)) * **core:** support column names with spaces ([00b54b4](https://github.com/mikro-orm/mikro-orm/commit/00b54b46f627cf820d40e0f68eaadcea86236801)), closes [#1617](https://github.com/mikro-orm/mikro-orm/issues/1617) * **core:** use `AsyncLocalStorage` instead of `domain` API ([be27bf7](https://github.com/mikro-orm/mikro-orm/commit/be27bf7329675e0f4371f9d47800ea8fcbe6ca3f)) * **core:** validate populate hint on runtime for joined strategy too ([94877e3](https://github.com/mikro-orm/mikro-orm/commit/94877e3d7800c325cfe7e4b75380df8d8e224718)), closes [#2527](https://github.com/mikro-orm/mikro-orm/issues/2527) * **core:** validate usage of global context ([#2381](https://github.com/mikro-orm/mikro-orm/issues/2381)) ([f0cbcc2](https://github.com/mikro-orm/mikro-orm/commit/f0cbcc2d977ffb8b867a21ee2ac857ef26986d73)) * **embeddables:** allow using m:1 properties inside embeddables ([#1948](https://github.com/mikro-orm/mikro-orm/issues/1948)) ([ffca73e](https://github.com/mikro-orm/mikro-orm/commit/ffca73ecf3ecf405dee3042ad0ab60848721ab7b)) * **embeddables:** support `onCreate` and `onUpdate` ([288899d](https://github.com/mikro-orm/mikro-orm/commit/288899d34966775133321ef1f06d20a914955dfe)), closes [#2283](https://github.com/mikro-orm/mikro-orm/issues/2283) [#2391](https://github.com/mikro-orm/mikro-orm/issues/2391) * **entity-generator**: add support for generating M :N properties ([c0628c5](https://github.com/mikro-orm/mikro-orm/commit/c0628c5)) * **entity-generator:** add enum generation support ([#2608](https://github.com/mikro-orm/mikro-orm/issues/2608)) ([1e0b411](https://github.com/mikro-orm/mikro-orm/commit/1e0b411dad3cb0ebb456b34e1bcac9a71f059c48)) * **entity-generator:** allow specifying schema ([beb2993](https://github.com/mikro-orm/mikro-orm/commit/beb299383c647f9f2d7431e177659d299fb0f041)), closes [#1301](https://github.com/mikro-orm/mikro-orm/issues/1301) * **filters:** add `em` parameter to the filter callback parameters ([6858986](https://github.com/mikro-orm/mikro-orm/commit/6858986060e10e6170186094469df6e354a7413e)), closes [#2214](https://github.com/mikro-orm/mikro-orm/issues/2214) * **knex:** export also global `knex` function ([383bc24](https://github.com/mikro-orm/mikro-orm/commit/383bc24143d11f1034b6025bd73389f046ae172b)) * **migrations:** allow providing custom `MigrationGenerator` ([3cc366b](https://github.com/mikro-orm/mikro-orm/commit/3cc366b7a7e269a2c527edc324695620e8025163)), closes [#1913](https://github.com/mikro-orm/mikro-orm/issues/1913) * **migrations:** allow using migrations with ES modules ([072f23f](https://github.com/mikro-orm/mikro-orm/commit/072f23fe873c969f77a519ef5b997c30e3246093)), closes [#2631](https://github.com/mikro-orm/mikro-orm/issues/2631) * **migrations:** ensure the database exists when using migrator ([02dd67c](https://github.com/mikro-orm/mikro-orm/commit/02dd67cc0048aa0d9469e62ccb566b56db8e05a0)), closes [#1757](https://github.com/mikro-orm/mikro-orm/issues/1757) * **migrations:** store migrations without extensions ([4036716](https://github.com/mikro-orm/mikro-orm/commit/40367166f9e74a042e2f6314f31877f27a15a14d)), closes [#2239](https://github.com/mikro-orm/mikro-orm/issues/2239) * **migrations:** use snapshots for generating diffs in new migrations ([#1815](https://github.com/mikro-orm/mikro-orm/issues/1815)) ([9c37f61](https://github.com/mikro-orm/mikro-orm/commit/9c37f6141d8723d6c472dfd3557a1d749d344455)) * **mongo:** add `SchemaGenerator` support for mongo ([#2658](https://github.com/mikro-orm/mikro-orm/issues/2658)) ([cc11859](https://github.com/mikro-orm/mikro-orm/commit/cc1185971d1ee5780b183623a8afb455b3f79d3a)) * **mongo:** upgrade node-mongodb to v4 ([#2425](https://github.com/mikro-orm/mikro-orm/issues/2425)) ([2e4c135](https://github.com/mikro-orm/mikro-orm/commit/2e4c1350be693dbdde4ce99f720cf23202ae6f76)) * **query-builder:** add `qb.getCount()` method ([f773736](https://github.com/mikro-orm/mikro-orm/commit/f773736a8a1db7d2d441d8879b27c1bd8e1aa90a)), closes [#2066](https://github.com/mikro-orm/mikro-orm/issues/2066) * **query-builder:** allow awaiting the `QueryBuilder` instance ([#2446](https://github.com/mikro-orm/mikro-orm/issues/2446)) ([c1c4d51](https://github.com/mikro-orm/mikro-orm/commit/c1c4d51650950c7d9dcf1500cf26ccf8bfb16057)) * **query-builder:** improve typing of `qb.execute()` ([c4cfedb](https://github.com/mikro-orm/mikro-orm/commit/c4cfedbc71032de229d7d5a3c669a1edf306cadf)), closes [#2396](https://github.com/mikro-orm/mikro-orm/issues/2396) * **schema:** add support for timestamp columns in mysql ([a224ec9](https://github.com/mikro-orm/mikro-orm/commit/a224ec9137afe035bd0ed8d6e77376bc076a0f45)), closes [#2386](https://github.com/mikro-orm/mikro-orm/issues/2386) * **schema:** allow disabling foreign key constraints ([fcdb236](https://github.com/mikro-orm/mikro-orm/commit/fcdb236eb8112ebaed3450892f51fd469902ac62)), closes [#2548](https://github.com/mikro-orm/mikro-orm/issues/2548) * **schema:** rework schema diffing ([#1641](https://github.com/mikro-orm/mikro-orm/issues/1641)) ([05f15a3](https://github.com/mikro-orm/mikro-orm/commit/05f15a37db178271a88dfa743be8ac01cd97db8e)), closes [#1486](https://github.com/mikro-orm/mikro-orm/issues/1486) [#1518](https://github.com/mikro-orm/mikro-orm/issues/1518) [#579](https://github.com/mikro-orm/mikro-orm/issues/579) [#1559](https://github.com/mikro-orm/mikro-orm/issues/1559) [#1602](https://github.com/mikro-orm/mikro-orm/issues/1602) [#1480](https://github.com/mikro-orm/mikro-orm/issues/1480) [#1687](https://github.com/mikro-orm/mikro-orm/issues/1687) * **seeder**: use community driven faker fork and reexport it ([3c9f8e9](https://github.com/mikro-orm/mikro-orm/commit/3c9f8e9)) * **seeder:** add seeder package ([#929](https://github.com/mikro-orm/mikro-orm/issues/929)) ([2b86e22](https://github.com/mikro-orm/mikro-orm/commit/2b86e22eb061060ee2c67a85741b99c1ddcac9c0)), closes [#251](https://github.com/mikro-orm/mikro-orm/issues/251) * **sql:** add `qb.indexHint()` method that appends to the from clause ([ce89e1f](https://github.com/mikro-orm/mikro-orm/commit/ce89e1fdca7622ca8343568b14ac8687f947dc6a)), closes [#1663](https://github.com/mikro-orm/mikro-orm/issues/1663) * **sql:** add callback signature to `expr()` with alias parameter ([48702c7](https://github.com/mikro-orm/mikro-orm/commit/48702c7576f63f0a19dd81612ffae339b2988e62)), closes [#2405](https://github.com/mikro-orm/mikro-orm/issues/2405) * **sql:** allow setting transaction isolation level ([6ae5fbf](https://github.com/mikro-orm/mikro-orm/commit/6ae5fbf70dd87fe2380b74d83bc8a04bb8f447fe)), closes [#819](https://github.com/mikro-orm/mikro-orm/issues/819) * **sql:** allow tuple comparison via `expr` helper ([90777a7](https://github.com/mikro-orm/mikro-orm/commit/90777a7f5ac3619d2ef902eb9dc69ed6d762ca33)), closes [#2399](https://github.com/mikro-orm/mikro-orm/issues/2399) * **sql:** generate down migrations automatically ([#2139](https://github.com/mikro-orm/mikro-orm/issues/2139)) ([7d78d0c](https://github.com/mikro-orm/mikro-orm/commit/7d78d0cb853250b20a8d79bf5036885256f19848)) * **typings:** make `em.create()` and other methods strict ([#1718](https://github.com/mikro-orm/mikro-orm/issues/1718)) ([e8b7119](https://github.com/mikro-orm/mikro-orm/commit/e8b7119eca0df7d686a7d3d91bfc17b74baaeea1)), closes [#1456](https://github.com/mikro-orm/mikro-orm/issues/1456) * **typings:** make `toObject()` and similar strict ([#1719](https://github.com/mikro-orm/mikro-orm/issues/1719)) ([c202396](https://github.com/mikro-orm/mikro-orm/commit/c202396a205b710b8afcd68f6a7ccc5a0ab64769)) * support flushing via `Promise.all()` ([f788773](https://github.com/mikro-orm/mikro-orm/commit/f788773de2b6cbefbff6cc72600017eae1f4df22)), closes [#2412](https://github.com/mikro-orm/mikro-orm/issues/2412) ### Performance Improvements[​](#performance-improvements-29 "Direct link to Performance Improvements") * **core:** do not update entity state on forking EM ([de3191c](https://github.com/mikro-orm/mikro-orm/commit/de3191c55b58aeba33704c085755bec170db7f07)) ### BREAKING CHANGES[​](#breaking-changes-1 "Direct link to BREAKING CHANGES") Please see the [upgrading guide](https://mikro-orm.io/docs/upgrading-v4-to-v5). ## [4.5.10](https://github.com/mikro-orm/mikro-orm/compare/v4.5.9...v4.5.10) (2021-12-26)[​](#4510-2021-12-26 "Direct link to 4510-2021-12-26") ### Bug Fixes[​](#bug-fixes-153 "Direct link to Bug Fixes") * **core:** allow putting not managed entities to remove stack ([7a47151](https://github.com/mikro-orm/mikro-orm/commit/7a47151d363ba162a51edade0125dbe34aa44adb)), closes [#2395](https://github.com/mikro-orm/mikro-orm/issues/2395) * **core:** defer cascading of persist operation ([6abb3b0](https://github.com/mikro-orm/mikro-orm/commit/6abb3b07e4a2209f64cc9a16f6ba8bc322c184ac)), closes [#2161](https://github.com/mikro-orm/mikro-orm/issues/2161) * **core:** do not override internal EM instance when forking EM ([8139174](https://github.com/mikro-orm/mikro-orm/commit/813917404f65f74265d6b9f31d5ff060fa8b6ead)), closes [#2342](https://github.com/mikro-orm/mikro-orm/issues/2342) * **core:** do not save entity state in `merge` when it's not initialized ([4141539](https://github.com/mikro-orm/mikro-orm/commit/41415397a751c238e7b9746ff89b16ce865e224e)), closes [#1927](https://github.com/mikro-orm/mikro-orm/issues/1927) * **core:** fix assigning to object property without value ([90165ab](https://github.com/mikro-orm/mikro-orm/commit/90165ab589627e43199c66fc2373562872ec4ba5)), closes [#2492](https://github.com/mikro-orm/mikro-orm/issues/2492) * **core:** fix collection state when `forceEntityConstructor` is used ([674abbb](https://github.com/mikro-orm/mikro-orm/commit/674abbb28d9c5d5caf0cea441a447af7c987cdb0)), closes [#2406](https://github.com/mikro-orm/mikro-orm/issues/2406) [#2409](https://github.com/mikro-orm/mikro-orm/issues/2409) * **core:** fix reflection of enums in babel ([a5b8ee9](https://github.com/mikro-orm/mikro-orm/commit/a5b8ee9f20b6aceff6871765feff41b016fc6acc)), closes [#2198](https://github.com/mikro-orm/mikro-orm/issues/2198) * **core:** fix serialization of self referencing collections ([79c2a10](https://github.com/mikro-orm/mikro-orm/commit/79c2a10ba077c29c4d233abe22da8f8b389efdb1)), closes [#2059](https://github.com/mikro-orm/mikro-orm/issues/2059) * **core:** rehydrate custom types when using metadata cache ([3bcb9a5](https://github.com/mikro-orm/mikro-orm/commit/3bcb9a52d1bcfd2596826603f2e090b7c8baddf9)), closes [#2489](https://github.com/mikro-orm/mikro-orm/issues/2489) * **core:** remove entity from its bidirectional relations after delete ([7e40b5c](https://github.com/mikro-orm/mikro-orm/commit/7e40b5cb664cb8f3fef5623308f0a6849392f80e)), closes [#2238](https://github.com/mikro-orm/mikro-orm/issues/2238) * **embeddables:** add missing serialization options to `@Embedded()` ([9f91578](https://github.com/mikro-orm/mikro-orm/commit/9f91578ce55a5d80e908c8bef2c7cbac3d6eb73b)), closes [#2464](https://github.com/mikro-orm/mikro-orm/issues/2464) * **embeddables:** ensure order of discovery does not matter for embeddables ([b095d9e](https://github.com/mikro-orm/mikro-orm/commit/b095d9e70770e478b85d5ca644fa0f8e42365e2a)), closes [#2242](https://github.com/mikro-orm/mikro-orm/issues/2242) * **embeddables:** fix validating nullable object embeddables ([8ab2941](https://github.com/mikro-orm/mikro-orm/commit/8ab2941d819b839cf588a04630fa69c5a9072f83)), closes [#2233](https://github.com/mikro-orm/mikro-orm/issues/2233) * **mongo:** allow using `pool.min/max` options in mongo driver ([9223055](https://github.com/mikro-orm/mikro-orm/commit/9223055e4661400bd662fb989d55fcc75244f61b)), closes [#2228](https://github.com/mikro-orm/mikro-orm/issues/2228) * **mongo:** do not use separate update queries for M :N collections if not needed ([e57984d](https://github.com/mikro-orm/mikro-orm/commit/e57984d0d3048637c75b1f3f5ff46d0ed5528e92)), closes [#2483](https://github.com/mikro-orm/mikro-orm/issues/2483) * **postgres:** add extra array operators ([#2467](https://github.com/mikro-orm/mikro-orm/issues/2467)) ([576117e](https://github.com/mikro-orm/mikro-orm/commit/576117e23699c5ce5ab954c9fbec8b6297e6b359)) * **reflection:** relative paths not stripped completely ([#2164](https://github.com/mikro-orm/mikro-orm/issues/2164)) ([ab3f1c6](https://github.com/mikro-orm/mikro-orm/commit/ab3f1c648d8d1210230f1c0068673bc6563114fe)) * **sqlite:** patch dialect only once ([ea6a764](https://github.com/mikro-orm/mikro-orm/commit/ea6a764d74eebf070be8d24efc1664f5dace940f)), closes [#2422](https://github.com/mikro-orm/mikro-orm/issues/2422) * **sti:** fix prototype of child entity after it gets loaded ([a0827f5](https://github.com/mikro-orm/mikro-orm/commit/a0827f53c3dd28233406cc912ab772b97c3ad697)), closes [#2493](https://github.com/mikro-orm/mikro-orm/issues/2493) [#2364](https://github.com/mikro-orm/mikro-orm/issues/2364) * **sti:** respect custom table names ([42a9522](https://github.com/mikro-orm/mikro-orm/commit/42a952213f4a33cab3f1e49bd215ebac9693aadd)), closes [#2356](https://github.com/mikro-orm/mikro-orm/issues/2356) * **validation:** validate missing 1 :m mappedBy key in factory ([e75fcff](https://github.com/mikro-orm/mikro-orm/commit/e75fcff68e2e2f9f66a84887ecd8aa4166d8bb2c)), closes [#2393](https://github.com/mikro-orm/mikro-orm/issues/2393) ### Performance Improvements[​](#performance-improvements-30 "Direct link to Performance Improvements") * **core:** define `Reference` properties on prototype ([4ef2623](https://github.com/mikro-orm/mikro-orm/commit/4ef2623680734403453961559c13383a979c8ae6)) * **core:** do not redefine `Collection` properties as non-enumerable ([523addd](https://github.com/mikro-orm/mikro-orm/commit/523addd05b4e79021a4c63490ae3afb2a9789d66)), closes [#2543](https://github.com/mikro-orm/mikro-orm/issues/2543) * **core:** reuse EntityComparator on fork() ([#2496](https://github.com/mikro-orm/mikro-orm/issues/2496)) ([bd2ccfd](https://github.com/mikro-orm/mikro-orm/commit/bd2ccfda950d4fce6dc33b35c35b833d70837a2c)) * **core:** use shared memory for cycles when computing change sets ([c12ff4b](https://github.com/mikro-orm/mikro-orm/commit/c12ff4bb126185e08ea9f86c9b166fcc3fa67082)), closes [#2379](https://github.com/mikro-orm/mikro-orm/issues/2379) * **core:** various small performance improvements in UoW ([d8ea1c2](https://github.com/mikro-orm/mikro-orm/commit/d8ea1c2053f4cf201e4aa621c42fc33e0ac09012)) ## [4.5.9](https://github.com/mikro-orm/mikro-orm/compare/v4.5.8...v4.5.9) (2021-08-24)[​](#459-2021-08-24 "Direct link to 459-2021-08-24") **Note:** Version bump only for package @mikro-orm/core ## [4.5.8](https://github.com/mikro-orm/mikro-orm/compare/v4.5.7...v4.5.8) (2021-08-24)[​](#458-2021-08-24 "Direct link to 458-2021-08-24") ### Bug Fixes[​](#bug-fixes-154 "Direct link to Bug Fixes") * **core:** detect ts-jest usage ([d54ccc2](https://github.com/mikro-orm/mikro-orm/commit/d54ccc2406829e86aae04400c562e9b489c9eae6)) * **core:** do not apply limit/offset to populate pivot table queries ([1f2d430](https://github.com/mikro-orm/mikro-orm/commit/1f2d43059673f59de1b48230f32d54cd40374d10)), closes [#2121](https://github.com/mikro-orm/mikro-orm/issues/2121) * **core:** do not propagate mapToPk properties ([c37f42e](https://github.com/mikro-orm/mikro-orm/commit/c37f42ee6b6f96ea6d0eebb1ff99a36549492be5)) * **query-builder:** do not wipe previously defined conditions with `qb.delete()` ([380fe3d](https://github.com/mikro-orm/mikro-orm/commit/380fe3d561a11db29dc44410b984e90f1a6284ef)), closes [#2136](https://github.com/mikro-orm/mikro-orm/issues/2136) * **reflection:** support virtual method properties ([3a8c344](https://github.com/mikro-orm/mikro-orm/commit/3a8c3445c6ab14ed61e25d204e13bb69a2431b1b)) ## [4.5.7](https://github.com/mikro-orm/mikro-orm/compare/v4.5.6...v4.5.7) (2021-06-30)[​](#457-2021-06-30 "Direct link to 457-2021-06-30") ### Bug Fixes[​](#bug-fixes-155 "Direct link to Bug Fixes") * **core:** fix clearing 1 :m collections ([29cd17b](https://github.com/mikro-orm/mikro-orm/commit/29cd17b62cac23a9eea69219de27fd987f2f0ca6)), closes [#1914](https://github.com/mikro-orm/mikro-orm/issues/1914) * **core:** fix M :N relations with custom type PKs ([ed399b1](https://github.com/mikro-orm/mikro-orm/commit/ed399b19ad08ba8df8effbc632bdf7bd943cf972)), closes [#1930](https://github.com/mikro-orm/mikro-orm/issues/1930) * **core:** fix removing of m :n items when one is composite ([8084845](https://github.com/mikro-orm/mikro-orm/commit/808484559c2dc30aca729a9e5a5ab7256b48427a)), closes [#1961](https://github.com/mikro-orm/mikro-orm/issues/1961) * **core:** fix transaction context in nested transactions ([d88dd8b](https://github.com/mikro-orm/mikro-orm/commit/d88dd8bbc7dc3fad623a7ee37031cf534a955112)), closes [#1910](https://github.com/mikro-orm/mikro-orm/issues/1910) * **core:** make entity helper property non-enumerable ([ce99eb2](https://github.com/mikro-orm/mikro-orm/commit/ce99eb2707466db14c121b6b039119d3f2ff2dd6)) * **core:** respect filters defined on base entities ([4657d05](https://github.com/mikro-orm/mikro-orm/commit/4657d0553d44e8530bdab0000183e4f48456f026)), closes [#1979](https://github.com/mikro-orm/mikro-orm/issues/1979) * **embeddables:** allow using more than 10 embedded arrays ([ab8e706](https://github.com/mikro-orm/mikro-orm/commit/ab8e7063a42f45ed6c872913abafdce733d06edc)), closes [#1912](https://github.com/mikro-orm/mikro-orm/issues/1912) * **entity-generator:** fix boolean default values ([219fc0c](https://github.com/mikro-orm/mikro-orm/commit/219fc0c9376b32928bcc5a6d73053d2d2384eb44)), closes [#1917](https://github.com/mikro-orm/mikro-orm/issues/1917) * **mysql:** use current schema when reading enum definitions ([c769871](https://github.com/mikro-orm/mikro-orm/commit/c769871867a5307b74dce6746f14fb89af38e856)), closes [#1923](https://github.com/mikro-orm/mikro-orm/issues/1923) [#1866](https://github.com/mikro-orm/mikro-orm/issues/1866) * **postgres:** fix propagation of PKs with custom names ([9ce0c37](https://github.com/mikro-orm/mikro-orm/commit/9ce0c37223b75461bab040f0b98e4fd932b3a457)), closes [#1990](https://github.com/mikro-orm/mikro-orm/issues/1990) ### Features[​](#features-83 "Direct link to Features") * **cli:** only warn with `useTsNode: true` without ts-node available ([3aa3a6c](https://github.com/mikro-orm/mikro-orm/commit/3aa3a6ca5525abe1a5a122fbd3673cf2e39d2bee)), closes [#1957](https://github.com/mikro-orm/mikro-orm/issues/1957) ## [4.5.6](https://github.com/mikro-orm/mikro-orm/compare/v4.5.5...v4.5.6) (2021-06-06)[​](#456-2021-06-06 "Direct link to 456-2021-06-06") ### Bug Fixes[​](#bug-fixes-156 "Direct link to Bug Fixes") * **core:** fix extraction of child condition when populating 2 ([f22eec1](https://github.com/mikro-orm/mikro-orm/commit/f22eec18789bfa98f191b7162f0b89967a60fc94)), closes [#1882](https://github.com/mikro-orm/mikro-orm/issues/1882) * **core:** fix hydrating of inlined embeddables via `em.create()` ([34391cd](https://github.com/mikro-orm/mikro-orm/commit/34391cd4b092ee5d19376b79b1468c7667c7016b)), closes [#1840](https://github.com/mikro-orm/mikro-orm/issues/1840) * **core:** fix joined strategy with FK as PK ([adaa59b](https://github.com/mikro-orm/mikro-orm/commit/adaa59bbbc1e41a4194eb00f63a2d341bca2bfb3)), closes [#1902](https://github.com/mikro-orm/mikro-orm/issues/1902) * **core:** mark entity generator and migrations as peer deps of knex ([4ad80af](https://github.com/mikro-orm/mikro-orm/commit/4ad80afc89414ed64f44dbd954c121bd99e0cbf3)), closes [#1879](https://github.com/mikro-orm/mikro-orm/issues/1879) * **core:** propagate unsetting of 1:1 from inverse side ([903d484](https://github.com/mikro-orm/mikro-orm/commit/903d4847aa138388c95235c650b71601c5f2fe3c)), closes [#1872](https://github.com/mikro-orm/mikro-orm/issues/1872) * **core:** reset current transaction before running `afterFlush` event ([539311e](https://github.com/mikro-orm/mikro-orm/commit/539311efe4d450c48fb0be2aff372bd5b64dd483)), closes [#1824](https://github.com/mikro-orm/mikro-orm/issues/1824) * **core:** support getters in `EntitySchema` property types ([0b831d0](https://github.com/mikro-orm/mikro-orm/commit/0b831d09c03b36df8150235826c22a3a7d717a26)), closes [#1867](https://github.com/mikro-orm/mikro-orm/issues/1867) * **core:** use tsconfig-paths loadConfig function ([#1854](https://github.com/mikro-orm/mikro-orm/issues/1854)) ([fbfb148](https://github.com/mikro-orm/mikro-orm/commit/fbfb14873002ae14bcadf2a7aa2f7e1ffb4acbdf)), closes [#1849](https://github.com/mikro-orm/mikro-orm/issues/1849) * **entity-generator:** do not infer `cascade` value based on update/delete rules ([dca4f21](https://github.com/mikro-orm/mikro-orm/commit/dca4f21ca210ec34f60017860ddd1bb95b4dc333)), closes [#1857](https://github.com/mikro-orm/mikro-orm/issues/1857) * **mongo:** fix extraction of child condition when populating ([3cf30e1](https://github.com/mikro-orm/mikro-orm/commit/3cf30e1d93f2a225952c390daa7a2d05a5fcda7c)), closes [#1891](https://github.com/mikro-orm/mikro-orm/issues/1891) ### Features[​](#features-84 "Direct link to Features") * **core:** add PlainObject class that DTO's can extend to treat class as POJO ([#1837](https://github.com/mikro-orm/mikro-orm/issues/1837)) ([2e9c361](https://github.com/mikro-orm/mikro-orm/commit/2e9c36101f79b98898f43ba4f9149a78fafe37b6)) ## [4.5.5](https://github.com/mikro-orm/mikro-orm/compare/v4.5.4...v4.5.5) (2021-05-17)[​](#455-2021-05-17 "Direct link to 455-2021-05-17") ### Bug Fixes[​](#bug-fixes-157 "Direct link to Bug Fixes") * **core:** allow using `updateNestedEntities` flag with collections ([db77e8b](https://github.com/mikro-orm/mikro-orm/commit/db77e8b9b9e7b3c29120333142f517b98b915755)), closes [#1717](https://github.com/mikro-orm/mikro-orm/issues/1717) * **core:** convert custom types for `onCreate` & `onUpdate` ([34c1aa5](https://github.com/mikro-orm/mikro-orm/commit/34c1aa54bd8a79e1cf2c962fc1382c345aef6561)), closes [#1751](https://github.com/mikro-orm/mikro-orm/issues/1751) * **core:** convert custom types for collection items in joined strategy ([bea37e0](https://github.com/mikro-orm/mikro-orm/commit/bea37e0e96db151ab054be600b03cc5c1f73789b)), closes [#1754](https://github.com/mikro-orm/mikro-orm/issues/1754) * **core:** convert custom types on PKs in update and delete queries ([1b5270d](https://github.com/mikro-orm/mikro-orm/commit/1b5270d0328afc254e8fc908628e71719c3686fe)), closes [#1798](https://github.com/mikro-orm/mikro-orm/issues/1798) * **core:** do not ignore `qb.onConflict(...).merge()` without params ([68b570e](https://github.com/mikro-orm/mikro-orm/commit/68b570ecf79705ed661a2f9be2ea23fece2752ef)), closes [#1774](https://github.com/mikro-orm/mikro-orm/issues/1774) * **core:** ensure correct aliasing when auto-joining PKs in group conditions ([ec971b6](https://github.com/mikro-orm/mikro-orm/commit/ec971b68d8955df40dafcc81eb221fbd94b9cb1c)), closes [#1734](https://github.com/mikro-orm/mikro-orm/issues/1734) * **core:** ensure correct casting in deep JSON queries with operators ([0441967](https://github.com/mikro-orm/mikro-orm/commit/04419671dfc3088e8f70fc65f76a5edd8b798656)), closes [#1734](https://github.com/mikro-orm/mikro-orm/issues/1734) * **core:** fix `findAndCount` with populate ([61bc7cf](https://github.com/mikro-orm/mikro-orm/commit/61bc7cfd2621bd91fa4b3f21d7c6b78509903262)), closes [#1736](https://github.com/mikro-orm/mikro-orm/issues/1736) * **core:** fix ordering by json properties ([53bef71](https://github.com/mikro-orm/mikro-orm/commit/53bef7184f19c1a7598180e85369e2b2c6042e12)) * **core:** issue delete queries after extra/collection updates ([fc48890](https://github.com/mikro-orm/mikro-orm/commit/fc4889012808cb80e702d68d2c5bbc47e8e26ff9)) * **core:** support extending in `tsconfig.json` ([#1804](https://github.com/mikro-orm/mikro-orm/issues/1804)) ([6597552](https://github.com/mikro-orm/mikro-orm/commit/6597552db8cc8c8cf329fe5329bef719395f0293)), closes [#1792](https://github.com/mikro-orm/mikro-orm/issues/1792) * **core:** use `$and` for merging of multiple filter conditions ([19f3f1d](https://github.com/mikro-orm/mikro-orm/commit/19f3f1d89cee416566e0f1e44350edfbcd3f34eb)), closes [#1776](https://github.com/mikro-orm/mikro-orm/issues/1776) * **mongo:** validate usage of migrator and entity generator ([e41d1c5](https://github.com/mikro-orm/mikro-orm/commit/e41d1c5c77c4e80111cfd528ceab64e6cccf91cd)), closes [#1801](https://github.com/mikro-orm/mikro-orm/issues/1801) * **query-builder:** allow passing array of keys to `qb.onConflict().merge()` ([fc3cf01](https://github.com/mikro-orm/mikro-orm/commit/fc3cf013accc3fbe3b7b59595a1007cb5a74f022)), closes [#1774](https://github.com/mikro-orm/mikro-orm/issues/1774) * **query-builder:** validate missing `onConflict` calls ([d9ae997](https://github.com/mikro-orm/mikro-orm/commit/d9ae997a3963b96545b70fc8ea177a8231d0ee85)), closes [#1803](https://github.com/mikro-orm/mikro-orm/issues/1803) ## [4.5.4](https://github.com/mikro-orm/mikro-orm/compare/v4.5.3...v4.5.4) (2021-04-26)[​](#454-2021-04-26 "Direct link to 454-2021-04-26") ### Bug Fixes[​](#bug-fixes-158 "Direct link to Bug Fixes") * **core:** consider non-plain objects as PKs ([82387ad](https://github.com/mikro-orm/mikro-orm/commit/82387adb31b76b204cfa902058eeb71431fd56a8)), closes [#1721](https://github.com/mikro-orm/mikro-orm/issues/1721) * **core:** fix `QueryFlag.PAGINATE` with joined loading strategy ([11aa0a3](https://github.com/mikro-orm/mikro-orm/commit/11aa0a34b75844efb405b14bf098e79a64f5be00)) * **core:** fix assigning embedded arrays ([9ee8f5c](https://github.com/mikro-orm/mikro-orm/commit/9ee8f5c6fd5da41bab2b75d5ab0164e92f8edb54)), closes [#1699](https://github.com/mikro-orm/mikro-orm/issues/1699) * **core:** fix persisting complex composite keys in m:1 relations ([a932366](https://github.com/mikro-orm/mikro-orm/commit/a9323663f6cb52765e80c5933173c57758c2fc87)), closes [#1687](https://github.com/mikro-orm/mikro-orm/issues/1687) * **core:** fix querying by complex composite keys via entity instance ([b1b7894](https://github.com/mikro-orm/mikro-orm/commit/b1b78947283db4f863b897d34e4ee692f019e3ba)), closes [#1695](https://github.com/mikro-orm/mikro-orm/issues/1695) * **core:** fix querying by JSON properties ([bc5e1a9](https://github.com/mikro-orm/mikro-orm/commit/bc5e1a91e0c9da4c969f4a47e811ec19ef54fcf4)), closes [#1673](https://github.com/mikro-orm/mikro-orm/issues/1673) * **core:** fix state of entities from result cached ([8d0f076](https://github.com/mikro-orm/mikro-orm/commit/8d0f0762bd4521fdc960f0c7609265feb4f72d42)), closes [#1704](https://github.com/mikro-orm/mikro-orm/issues/1704) * **core:** initialize empty collections when fetch joining ([6fb9560](https://github.com/mikro-orm/mikro-orm/commit/6fb956049d3febdc5acb322416f086db66e6d9c5)) * **core:** update version values in batch updates ([f5c8ed8](https://github.com/mikro-orm/mikro-orm/commit/f5c8ed8cf3af6fff07c83367628ac2908e428b7d)), closes [#1703](https://github.com/mikro-orm/mikro-orm/issues/1703) ### Features[​](#features-85 "Direct link to Features") * **core:** add `QueryFlag.AUTO_JOIN_ONE_TO_ONE_OWNER` ([378e468](https://github.com/mikro-orm/mikro-orm/commit/378e4684441880977c565c1267f7c5aafd630ca8)), closes [#1660](https://github.com/mikro-orm/mikro-orm/issues/1660) ## [4.5.3](https://github.com/mikro-orm/mikro-orm/compare/v4.5.2...v4.5.3) (2021-04-09)[​](#453-2021-04-09 "Direct link to 453-2021-04-09") ### Bug Fixes[​](#bug-fixes-159 "Direct link to Bug Fixes") * **core:** do not auto-join composite relations when not needed ([b1420a6](https://github.com/mikro-orm/mikro-orm/commit/b1420a668ca410b3f65b94343fa1e5bb44f56fb0)), closes [#1658](https://github.com/mikro-orm/mikro-orm/issues/1658) * **core:** ensure eager loaded relations are actually loaded ([897c7bd](https://github.com/mikro-orm/mikro-orm/commit/897c7bdafe745dc3370f5abc1f41e7128d030572)), closes [#1657](https://github.com/mikro-orm/mikro-orm/issues/1657) * **core:** fix aliasing of embeddables in update query ([#1650](https://github.com/mikro-orm/mikro-orm/issues/1650)) ([6cb5f62](https://github.com/mikro-orm/mikro-orm/commit/6cb5f62db0b160bee70ff55093cec68658677a76)) * **discovery:** fix metadata validation of nested embeddables ([1d7c123](https://github.com/mikro-orm/mikro-orm/commit/1d7c123140709aa5fc1c870e62d57261924a72e0)), closes [#1616](https://github.com/mikro-orm/mikro-orm/issues/1616) * **knex:** find by custom types with object subconditions ([#1656](https://github.com/mikro-orm/mikro-orm/issues/1656)) ([d8c328a](https://github.com/mikro-orm/mikro-orm/commit/d8c328a1658dfce2a967148568002142607d5e75)) * **postgres:** improve extra updates logic for batch updates ([84b40bc](https://github.com/mikro-orm/mikro-orm/commit/84b40bcabae214274fd634065992ca8bd172272c)), closes [#1664](https://github.com/mikro-orm/mikro-orm/issues/1664) ### Features[​](#features-86 "Direct link to Features") * **postgres:** fix batch inserts with PKs with custom field name ([4500ca7](https://github.com/mikro-orm/mikro-orm/commit/4500ca79e884ddfb2ae53418a0c629343c66e17a)), closes [#1595](https://github.com/mikro-orm/mikro-orm/issues/1595) * **query-builder:** allow passing raw query bindings via `qb.raw()` ([aa423a5](https://github.com/mikro-orm/mikro-orm/commit/aa423a5876935c76e5e22d2c32bbe06071ec9e8a)), closes [#1654](https://github.com/mikro-orm/mikro-orm/issues/1654) ## [4.5.2](https://github.com/mikro-orm/mikro-orm/compare/v4.5.1...v4.5.2) (2021-04-06)[​](#452-2021-04-06 "Direct link to 452-2021-04-06") ### Bug Fixes[​](#bug-fixes-160 "Direct link to Bug Fixes") * **core:** fix mapping of complex composite keys ([c0c658e](https://github.com/mikro-orm/mikro-orm/commit/c0c658eb125695bd1aed760aa95f2eadc1da8d43)), closes [#1624](https://github.com/mikro-orm/mikro-orm/issues/1624) * **core:** fix querying embeddables over cast fields ([#1639](https://github.com/mikro-orm/mikro-orm/issues/1639)) ([cb5b25c](https://github.com/mikro-orm/mikro-orm/commit/cb5b25cdf84dfe237ce35871c87fa5028762286e)) * **core:** support advanced custom types in batch queries ([88cc71e](https://github.com/mikro-orm/mikro-orm/commit/88cc71e933d99416fa6a6e24759db281194e97c1)), closes [#1625](https://github.com/mikro-orm/mikro-orm/issues/1625) * **core:** support native bigint as primary key ([#1626](https://github.com/mikro-orm/mikro-orm/issues/1626)) ([bce7afe](https://github.com/mikro-orm/mikro-orm/commit/bce7afe539f9c866d6672bb8aeabd18425ea2a7a)) * **knex:** find entity by advanced custom types ([#1630](https://github.com/mikro-orm/mikro-orm/issues/1630)) ([ef945d5](https://github.com/mikro-orm/mikro-orm/commit/ef945d5c4730997cd6daaefe84fc0eb77ed4693f)) ## [4.5.1](https://github.com/mikro-orm/mikro-orm/compare/v4.5.0...v4.5.1) (2021-03-27)[​](#451-2021-03-27 "Direct link to 451-2021-03-27") ### Bug Fixes[​](#bug-fixes-161 "Direct link to Bug Fixes") * **core:** create child entities that use Reference wrapper as new ([b14cdcb](https://github.com/mikro-orm/mikro-orm/commit/b14cdcbf1a5e6459c00a43b1066b56a0f3fb96eb)), closes [#1592](https://github.com/mikro-orm/mikro-orm/issues/1592) * **core:** support `Collection.loadCount` for unidirectional M :N ([27e4dd2](https://github.com/mikro-orm/mikro-orm/commit/27e4dd2d93006f632e332e0e689a22ba61835acd)), closes [#1608](https://github.com/mikro-orm/mikro-orm/issues/1608) * **core:** support nested embeddables inside embedded arrays ([088c65d](https://github.com/mikro-orm/mikro-orm/commit/088c65d816e7b6d2f76b0fbba737db91b1830c21)), closes [#1585](https://github.com/mikro-orm/mikro-orm/issues/1585) * **core:** support sql fragments in custom types with joined strategy ([527579d](https://github.com/mikro-orm/mikro-orm/commit/527579d314dfafa880b2c3de465c085f74e92fb4)), closes [#1594](https://github.com/mikro-orm/mikro-orm/issues/1594) ## [4.5.0](https://github.com/mikro-orm/mikro-orm/compare/v4.4.4...v4.5.0) (2021-03-21)[​](#450-2021-03-21 "Direct link to 450-2021-03-21") ### Bug Fixes[​](#bug-fixes-162 "Direct link to Bug Fixes") * **core:** apply filters when populating M :N relations ([cd8330a](https://github.com/mikro-orm/mikro-orm/commit/cd8330a7a71caadf8fed1e97e7d1db28a1a17b27)), closes [#1232](https://github.com/mikro-orm/mikro-orm/issues/1232) * **core:** do not process knex.ref() via custom types ([ba2ee70](https://github.com/mikro-orm/mikro-orm/commit/ba2ee70bc7e1a74102fd5e1a00c3f48bb0dcee58)), closes [#1538](https://github.com/mikro-orm/mikro-orm/issues/1538) * **core:** do not update entity state when cascade merging ([6c74109](https://github.com/mikro-orm/mikro-orm/commit/6c741092ca33aea92fe8cdee4f948f3deaae5ef4)), closes [#1523](https://github.com/mikro-orm/mikro-orm/issues/1523) * **core:** expose filters in some repository methods ([a1e1553](https://github.com/mikro-orm/mikro-orm/commit/a1e1553fa96188c0ec7e2e841611cbdfa2f9b01c)), closes [#1236](https://github.com/mikro-orm/mikro-orm/issues/1236) * **core:** fix auto-joining with `$not` operator ([8071fd0](https://github.com/mikro-orm/mikro-orm/commit/8071fd07282685e20702cfcb1ec5e7c82fd47e34)), closes [#1537](https://github.com/mikro-orm/mikro-orm/issues/1537) * **core:** support operators in json property queries ([cb5e715](https://github.com/mikro-orm/mikro-orm/commit/cb5e7155b9b0cf52bc567ebce4dd501ea7273e47)), closes [#1487](https://github.com/mikro-orm/mikro-orm/issues/1487) * **sqlite:** ensure booleans are hydrated as booleans ([4e36df2](https://github.com/mikro-orm/mikro-orm/commit/4e36df284bca80ecade04dbc720939f1788102f0)), closes [#1553](https://github.com/mikro-orm/mikro-orm/issues/1553) * **sqlite:** fix calling `em.find()` from hooks ([fec3285](https://github.com/mikro-orm/mikro-orm/commit/fec3285ba7224847617da2249e53d85bd2035b22)), closes [#1503](https://github.com/mikro-orm/mikro-orm/issues/1503) ### Features[​](#features-87 "Direct link to Features") * **cli:** allow mikro-orm config to return Promise ([#1495](https://github.com/mikro-orm/mikro-orm/issues/1495)) ([629aae9](https://github.com/mikro-orm/mikro-orm/commit/629aae9e9036e3045e9d33a9ce42bef4c87a2aa6)) * **core:** add `Collection.matching()` method to allow pagination ([#1502](https://github.com/mikro-orm/mikro-orm/issues/1502)) ([1ad3448](https://github.com/mikro-orm/mikro-orm/commit/1ad34488b6ac0c51a75aea9ff505598ea776960e)), closes [#334](https://github.com/mikro-orm/mikro-orm/issues/334) * **core:** add close method to `CacheAdapter` interface ([2795b5a](https://github.com/mikro-orm/mikro-orm/commit/2795b5ab13fa16b5d865fe9dd4f20273cba4a110)), closes [#1509](https://github.com/mikro-orm/mikro-orm/issues/1509) * **core:** allow updating nested 1:1 and m:1 references with EntityAssigner ([#1535](https://github.com/mikro-orm/mikro-orm/issues/1535)) ([c1dd048](https://github.com/mikro-orm/mikro-orm/commit/c1dd048dea8fc4bec112092fb88bd10eddb52f55)) * **core:** infer configuration from environment variables ([#1498](https://github.com/mikro-orm/mikro-orm/issues/1498)) ([1ff07a7](https://github.com/mikro-orm/mikro-orm/commit/1ff07a76b2a5e6c9c958586e4bb7a6a2c270e1ab)), closes [#1472](https://github.com/mikro-orm/mikro-orm/issues/1472) * **core:** support custom types in embeddables ([53305d3](https://github.com/mikro-orm/mikro-orm/commit/53305d3d649f90dbd0d0338e10dfb8e7f8d9c89e)), closes [#1519](https://github.com/mikro-orm/mikro-orm/issues/1519) * **core:** support embeddable arrays ([#1496](https://github.com/mikro-orm/mikro-orm/issues/1496)) ([57b605c](https://github.com/mikro-orm/mikro-orm/commit/57b605ccef8c8104db73270effa62d85fd1ed223)), closes [#1369](https://github.com/mikro-orm/mikro-orm/issues/1369) * **reflection:** support enum arrays and custom types ([dc65527](https://github.com/mikro-orm/mikro-orm/commit/dc65527913acd16ce4588c05deffaf3782782d83)), closes [#1497](https://github.com/mikro-orm/mikro-orm/issues/1497) * **validation:** validate correct reference types ([381b5b9](https://github.com/mikro-orm/mikro-orm/commit/381b5b9617ef1a4320a7e122b1e5498a3d5af7ad)), closes [#1568](https://github.com/mikro-orm/mikro-orm/issues/1568) ## [4.4.4](https://github.com/mikro-orm/mikro-orm/compare/v4.4.3...v4.4.4) (2021-02-21)[​](#444-2021-02-21 "Direct link to 444-2021-02-21") ### Bug Fixes[​](#bug-fixes-163 "Direct link to Bug Fixes") * **cli:** fix debug command with file globs ([5ec60e2](https://github.com/mikro-orm/mikro-orm/commit/5ec60e20db8d13ed44d1b3f129fd48f3362cb893)), closes [#1465](https://github.com/mikro-orm/mikro-orm/issues/1465) * **core:** allow extending existing custom types ([cc34d7e](https://github.com/mikro-orm/mikro-orm/commit/cc34d7e1eef10902f82b913bb1a271b2281f25c7)), closes [#1442](https://github.com/mikro-orm/mikro-orm/issues/1442) * **core:** do not define dynamic id property if not needed ([e13188f](https://github.com/mikro-orm/mikro-orm/commit/e13188fc8aa62498e69dfa24fe3787f2ba9d2eab)), closes [#1444](https://github.com/mikro-orm/mikro-orm/issues/1444) * **core:** improve quoting of advanced custom types ([cda3638](https://github.com/mikro-orm/mikro-orm/commit/cda3638e4c07fa8247afa7f1f5c80bb28240c066)) ### Performance Improvements[​](#performance-improvements-31 "Direct link to Performance Improvements") * **core:** improve processing of 1 :m relations ([#1450](https://github.com/mikro-orm/mikro-orm/issues/1450)) ([f5c1818](https://github.com/mikro-orm/mikro-orm/commit/f5c18183ea03d7360d298a95e5848aa698c25e1b)) ## [4.4.3](https://github.com/mikro-orm/mikro-orm/compare/v4.4.2...v4.4.3) (2021-02-14)[​](#443-2021-02-14 "Direct link to 443-2021-02-14") ### Bug Fixes[​](#bug-fixes-164 "Direct link to Bug Fixes") * **core:** handle `convertToJSValueSQL` at QB level too ([fbb2825](https://github.com/mikro-orm/mikro-orm/commit/fbb28252d0d27256dd10c4f8ddcf37c942152a83)), closes [#1432](https://github.com/mikro-orm/mikro-orm/issues/1432) * **core:** ignore falsy values in `Collection.remove()` ([3447039](https://github.com/mikro-orm/mikro-orm/commit/3447039572956004472cf5ea31b695df28916dc1)), closes [#1408](https://github.com/mikro-orm/mikro-orm/issues/1408) * **core:** propagate custom join columns to inverse side (m :n ) ([3f0a7b2](https://github.com/mikro-orm/mikro-orm/commit/3f0a7b2ecbd00630d2bad0d8c3d1a734ed260d1c)), closes [#1429](https://github.com/mikro-orm/mikro-orm/issues/1429) * **core:** quote custom type aliases ([#1415](https://github.com/mikro-orm/mikro-orm/issues/1415)) ([6f6d1ec](https://github.com/mikro-orm/mikro-orm/commit/6f6d1ec886b7d2b9968d61d082777236e024b337)) * **core:** respect `mergeObjects` only for POJOs in assign helper ([c5bbcee](https://github.com/mikro-orm/mikro-orm/commit/c5bbcee3aaccd4a76763a23f86d9d9367aabc4bd)), closes [#1406](https://github.com/mikro-orm/mikro-orm/issues/1406) * **core:** use generic comparison for object properties ([e9073cf](https://github.com/mikro-orm/mikro-orm/commit/e9073cfed9c13fc362017f0913b46d7e461c9c4b)), closes [#1395](https://github.com/mikro-orm/mikro-orm/issues/1395) ## [4.4.2](https://github.com/mikro-orm/mikro-orm/compare/v4.4.1...v4.4.2) (2021-02-04)[​](#442-2021-02-04 "Direct link to 442-2021-02-04") ### Features[​](#features-88 "Direct link to Features") * **core:** allow querying by JSON properties ([#1384](https://github.com/mikro-orm/mikro-orm/issues/1384)) ([69c2493](https://github.com/mikro-orm/mikro-orm/commit/69c24934db478eb07d9c88541527b7be40a26483)), closes [#1359](https://github.com/mikro-orm/mikro-orm/issues/1359) [#1261](https://github.com/mikro-orm/mikro-orm/issues/1261) * **core:** allow using SQL expressions with custom types ([#1389](https://github.com/mikro-orm/mikro-orm/issues/1389)) ([83fe6ea](https://github.com/mikro-orm/mikro-orm/commit/83fe6ea11810e045f5f793ad0f084e3fdf64812a)), closes [#735](https://github.com/mikro-orm/mikro-orm/issues/735) ## [4.4.1](https://github.com/mikro-orm/mikro-orm/compare/v4.4.0...v4.4.1) (2021-02-01)[​](#441-2021-02-01 "Direct link to 441-2021-02-01") ### Bug Fixes[​](#bug-fixes-165 "Direct link to Bug Fixes") * **core:** alias pivot fields when loading m :n relations ([56682be](https://github.com/mikro-orm/mikro-orm/commit/56682bec4d3a3144ac26d592cd7c5d603ad9ad54)), closes [#1346](https://github.com/mikro-orm/mikro-orm/issues/1346) [#1349](https://github.com/mikro-orm/mikro-orm/issues/1349) * **core:** allow assigning null to embeddable property ([#1356](https://github.com/mikro-orm/mikro-orm/issues/1356)) ([f3a091e](https://github.com/mikro-orm/mikro-orm/commit/f3a091ec1afcd9e9f058f59839778171fac73169)) * **core:** fix `eager` relations with joined loading strategy ([ba94e28](https://github.com/mikro-orm/mikro-orm/commit/ba94e2884fa4d99882980db144d6fd4c07bd6754)), closes [#1352](https://github.com/mikro-orm/mikro-orm/issues/1352) * **migrations:** fix generation of empty migrations ([#1362](https://github.com/mikro-orm/mikro-orm/issues/1362)) ([7ec9f30](https://github.com/mikro-orm/mikro-orm/commit/7ec9f3068709be0664966d18bc6d3ba88ae48b33)) * **sti:** respect child types when querying for STI entity ([df298a1](https://github.com/mikro-orm/mikro-orm/commit/df298a12c52675d0b3a0a5040ae3e16cd2ceedd4)), closes [#1252](https://github.com/mikro-orm/mikro-orm/issues/1252) * **typing:** improve handling of array properties ([9d82ffb](https://github.com/mikro-orm/mikro-orm/commit/9d82ffb77f13163a80e9b87c552a5640837fdb92)), closes [#1077](https://github.com/mikro-orm/mikro-orm/issues/1077) ## [4.4.0](https://github.com/mikro-orm/mikro-orm/compare/v4.3.4...v4.4.0) (2021-01-24)[​](#440-2021-01-24 "Direct link to 440-2021-01-24") ### Bug Fixes[​](#bug-fixes-166 "Direct link to Bug Fixes") * **core:** `em.create()` should not mutate the input object ([b83b211](https://github.com/mikro-orm/mikro-orm/commit/b83b21132fe8c7188cb881e11c80b5ad966421ef)), closes [#1294](https://github.com/mikro-orm/mikro-orm/issues/1294) * **core:** allow using `lazy` flag with formulas ([4b2b5ce](https://github.com/mikro-orm/mikro-orm/commit/4b2b5ce9ea4587703fea04e6047e03814b3c65b4)), closes [#1229](https://github.com/mikro-orm/mikro-orm/issues/1229) * **core:** always make new entity snapshot ([1dacf1e](https://github.com/mikro-orm/mikro-orm/commit/1dacf1edecced98e20e97c2bef271537c6a3cebf)), closes [#1334](https://github.com/mikro-orm/mikro-orm/issues/1334) * **core:** apply discriminator condition when loading STI entities ([9c62370](https://github.com/mikro-orm/mikro-orm/commit/9c623706695c21ef035799c00edd2c1aa2b12170)), closes [#1252](https://github.com/mikro-orm/mikro-orm/issues/1252) * **core:** clear inverse references to removed entities ([3a1d927](https://github.com/mikro-orm/mikro-orm/commit/3a1d927b51185407e33ae78ca6026b70234ad1b4)), closes [#1278](https://github.com/mikro-orm/mikro-orm/issues/1278) * **core:** fix creating entity graph from deeply nested structures ([833d246](https://github.com/mikro-orm/mikro-orm/commit/833d2463132a52d6ebd60c72a8a941f1db552dcb)), closes [#1326](https://github.com/mikro-orm/mikro-orm/issues/1326) * **core:** fix custom types with joined loading strategy ([f64e657](https://github.com/mikro-orm/mikro-orm/commit/f64e6571b037e46487ed33f9b4e9326ebfaab998)), closes [#1237](https://github.com/mikro-orm/mikro-orm/issues/1237) * **core:** fix nullable embeddables in object mode ([bb8dbce](https://github.com/mikro-orm/mikro-orm/commit/bb8dbcee75428678ce363ae8f0d4ad4516f14c61)), closes [#1296](https://github.com/mikro-orm/mikro-orm/issues/1296) * **core:** fix pessimistic locking via `em.findOne()` ([a0419a4](https://github.com/mikro-orm/mikro-orm/commit/a0419a409fbebf0e1db88bfd7ed0c78fc970b4a5)), closes [#1291](https://github.com/mikro-orm/mikro-orm/issues/1291) * **core:** improve custom sql expression detection ([cf8c5cd](https://github.com/mikro-orm/mikro-orm/commit/cf8c5cd3653600e90034e82c8095828e78dd9270)), closes [#1261](https://github.com/mikro-orm/mikro-orm/issues/1261) * **core:** make PK property of `Reference` required ([5e1cf23](https://github.com/mikro-orm/mikro-orm/commit/5e1cf23c5d630359d48005e71719c1c013524bb5)) * **core:** respect context when working with filter params ([97ed314](https://github.com/mikro-orm/mikro-orm/commit/97ed3148c827d99c405b0a9500fd7dd696d1a493)), closes [#1312](https://github.com/mikro-orm/mikro-orm/issues/1312) * **core:** support FK as PK in `Collection.getIdentifiers()` ([#1225](https://github.com/mikro-orm/mikro-orm/issues/1225)) ([f8024c9](https://github.com/mikro-orm/mikro-orm/commit/f8024c9fc2315efddb398e34f3e358cdf0fd04a6)), closes [#1224](https://github.com/mikro-orm/mikro-orm/issues/1224) * **entity-generator:** emit collection name in decorator ([#1338](https://github.com/mikro-orm/mikro-orm/issues/1338)) ([33574e8](https://github.com/mikro-orm/mikro-orm/commit/33574e8b46235637128f516ce83d290c57e2a7ba)), closes [#1328](https://github.com/mikro-orm/mikro-orm/issues/1328) * **mongo:** fix using custom field name on relations ([44becca](https://github.com/mikro-orm/mikro-orm/commit/44becca5359bc8ff89c04c44a208b79f4fa2411a)), closes [#1279](https://github.com/mikro-orm/mikro-orm/issues/1279) * **mysql:** enforce 64 character limit for identifier names in SQL ([#1297](https://github.com/mikro-orm/mikro-orm/issues/1297)) ([9c83b6d](https://github.com/mikro-orm/mikro-orm/commit/9c83b6d4b64c7fd618f309919967249b33e4ea64)), closes [#1271](https://github.com/mikro-orm/mikro-orm/issues/1271) * **schema:** fix index name with explicit schema ([b62d9ec](https://github.com/mikro-orm/mikro-orm/commit/b62d9ec0f9121db5ad5e4b50010c4a3dc5255796)), closes [#1215](https://github.com/mikro-orm/mikro-orm/issues/1215) * **schema:** fix renaming of multiple columns at the same time ([677a2b7](https://github.com/mikro-orm/mikro-orm/commit/677a2b705a679dc972ade64a82399ef50d0b76cc)), closes [#1262](https://github.com/mikro-orm/mikro-orm/issues/1262) * **sql:** sort fetch-joined properties on their orderBy ([#1336](https://github.com/mikro-orm/mikro-orm/issues/1336)) ([f18cd88](https://github.com/mikro-orm/mikro-orm/commit/f18cd88cea50fda66261de5adaf2d267604e3170)), closes [#1331](https://github.com/mikro-orm/mikro-orm/issues/1331) ### Features[​](#features-89 "Direct link to Features") * **core:** add support for nested embedddables ([#1311](https://github.com/mikro-orm/mikro-orm/issues/1311)) ([aee2abd](https://github.com/mikro-orm/mikro-orm/commit/aee2abd4cdb9f8ded0920f2786fd80a32cef41f7)), closes [#1017](https://github.com/mikro-orm/mikro-orm/issues/1017) * **core:** add support for nested partial loading ([#1306](https://github.com/mikro-orm/mikro-orm/issues/1306)) ([3878e6b](https://github.com/mikro-orm/mikro-orm/commit/3878e6b672f02d533e15d0b576cac4ea45a4d74a)), closes [#221](https://github.com/mikro-orm/mikro-orm/issues/221) * **core:** allow disabling identity map and change set tracking ([#1307](https://github.com/mikro-orm/mikro-orm/issues/1307)) ([03da184](https://github.com/mikro-orm/mikro-orm/commit/03da1845aab53b07a3d2cc008945158163d3107a)), closes [#1267](https://github.com/mikro-orm/mikro-orm/issues/1267) * **core:** allow using native private properties ([fc35c22](https://github.com/mikro-orm/mikro-orm/commit/fc35c22094f4b6f5301beb72fe73feff25291905)), closes [#1226](https://github.com/mikro-orm/mikro-orm/issues/1226) * **core:** implement transaction lifecycle hooks ([#1213](https://github.com/mikro-orm/mikro-orm/issues/1213)) ([0f81ff1](https://github.com/mikro-orm/mikro-orm/commit/0f81ff12d316cec3fcd8e6de623232458799a4f6)), closes [#1175](https://github.com/mikro-orm/mikro-orm/issues/1175) * **core:** support handling `Set` as array-like input ([#1277](https://github.com/mikro-orm/mikro-orm/issues/1277)) ([2945b8c](https://github.com/mikro-orm/mikro-orm/commit/2945b8cc9345deb7af748cf61378e16a8483b973)) * **mysql:** allow specifying collation globally ([cd95572](https://github.com/mikro-orm/mikro-orm/commit/cd95572675997fba40e2141258528fc0b19cd1f5)), closes [#1012](https://github.com/mikro-orm/mikro-orm/issues/1012) * **query-builder:** add support for `onConflict()` ([b97ecb5](https://github.com/mikro-orm/mikro-orm/commit/b97ecb547282a5563b47e2c624ceb9d2833bbb38)), closes [#1240](https://github.com/mikro-orm/mikro-orm/issues/1240) ### Performance Improvements[​](#performance-improvements-32 "Direct link to Performance Improvements") * **core:** make `IdentityMap` iterable ([e13757a](https://github.com/mikro-orm/mikro-orm/commit/e13757a0510d576561b124f1072c314c864ae443)) ## [4.3.4](https://github.com/mikro-orm/mikro-orm/compare/v4.3.3...v4.3.4) (2020-12-11)[​](#434-2020-12-11 "Direct link to 434-2020-12-11") ### Bug Fixes[​](#bug-fixes-167 "Direct link to Bug Fixes") * **core:** hydrate embeddable scalar properties ([#1192](https://github.com/mikro-orm/mikro-orm/issues/1192)) ([eb73093](https://github.com/mikro-orm/mikro-orm/commit/eb73093fe2df2f2c3d9cd6c7d23b648d67de0683)) * **core:** validate overridden properties by embeddables ([#1172](https://github.com/mikro-orm/mikro-orm/issues/1172)) ([6629a08](https://github.com/mikro-orm/mikro-orm/commit/6629a0829a921efd249707766a47a472a8f8f4d7)), closes [#1169](https://github.com/mikro-orm/mikro-orm/issues/1169) * **knex:** reject in `commit()` method if commit statement fails ([#1177](https://github.com/mikro-orm/mikro-orm/issues/1177)) ([f3beb7f](https://github.com/mikro-orm/mikro-orm/commit/f3beb7f8ceb943309ed35075e1a021627cf7634e)), closes [#1176](https://github.com/mikro-orm/mikro-orm/issues/1176) * **mariadb:** fix transforming of raw results in `run` mode ([417a4c9](https://github.com/mikro-orm/mikro-orm/commit/417a4c9451cc6b0d4e7a0bf545e2db4996a35da3)) * **sql:** ensure correct order of results when fetch joining ([7453816](https://github.com/mikro-orm/mikro-orm/commit/74538166c4cd9ff9fcd77689f946a0e1cb2f1f04)), closes [#1171](https://github.com/mikro-orm/mikro-orm/issues/1171) * **sql:** use `__` when aliasing fetch-joined properties ([1479366](https://github.com/mikro-orm/mikro-orm/commit/1479366aab9754a3d3e168962c1143876fead43a)), closes [#1171](https://github.com/mikro-orm/mikro-orm/issues/1171) ### Features[​](#features-90 "Direct link to Features") * **core:** auto-discover base entities ([33bda07](https://github.com/mikro-orm/mikro-orm/commit/33bda07082787d996719535c08fa569d052e0158)) ## [4.3.3](https://github.com/mikro-orm/mikro-orm/compare/v4.3.2...v4.3.3) (2020-12-04)[​](#433-2020-12-04 "Direct link to 433-2020-12-04") ### Bug Fixes[​](#bug-fixes-168 "Direct link to Bug Fixes") * **cli:** print both `entities` and `entitiesTs` in debug command ([90b85e4](https://github.com/mikro-orm/mikro-orm/commit/90b85e4a540bf0a385ba34c4ca7ff0859039abcf)), closes [#1139](https://github.com/mikro-orm/mikro-orm/issues/1139) * **core:** fix em.create() with nested relations ([dde119f](https://github.com/mikro-orm/mikro-orm/commit/dde119f7483971d32a9def2bf10dce4e25806fd3)), closes [#1150](https://github.com/mikro-orm/mikro-orm/issues/1150) * **core:** fix populating 1 :m where the owner uses `mapToPk` ([85a7c9d](https://github.com/mikro-orm/mikro-orm/commit/85a7c9dbcfd17922efcececd7619ddcc58aed87f)), closes [#1128](https://github.com/mikro-orm/mikro-orm/issues/1128) * **core:** fix propagating of changes to 1 :m with `mapToPk` ([b38df3e](https://github.com/mikro-orm/mikro-orm/commit/b38df3e2a1fb2470365569557a0a9ac953dcf11d)), closes [#1128](https://github.com/mikro-orm/mikro-orm/issues/1128) * **core:** fix snapshotting of composite properties ([b5f19f2](https://github.com/mikro-orm/mikro-orm/commit/b5f19f2fff9d31138e23c12dc430249ca2854026)), closes [#1079](https://github.com/mikro-orm/mikro-orm/issues/1079) * **schema:** allow using const enums ([e02ffea](https://github.com/mikro-orm/mikro-orm/commit/e02ffea5669ac50245a6616b930e7d6532f28486)), closes [#1096](https://github.com/mikro-orm/mikro-orm/issues/1096) * **schema:** fix diffing tables in other than default schema ([429d832](https://github.com/mikro-orm/mikro-orm/commit/429d8321d4c9962082af7cf4b2284204342a285b)), closes [#1142](https://github.com/mikro-orm/mikro-orm/issues/1142) [#1143](https://github.com/mikro-orm/mikro-orm/issues/1143) * **sql:** allow no results in `em.count()` ([bc3cdf6](https://github.com/mikro-orm/mikro-orm/commit/bc3cdf6ae39a809b9507d888f2d190ccde1ece75)), closes [#1135](https://github.com/mikro-orm/mikro-orm/issues/1135) * **sqlite:** fix querying by 1:1 relation with composite PK ([0da6347](https://github.com/mikro-orm/mikro-orm/commit/0da63476f4d0226d0d4bcee793ef143f6ecf475b)), closes [#1157](https://github.com/mikro-orm/mikro-orm/issues/1157) ## [4.3.2](https://github.com/mikro-orm/mikro-orm/compare/v4.3.1...v4.3.2) (2020-11-24)[​](#432-2020-11-24 "Direct link to 432-2020-11-24") ### Bug Fixes[​](#bug-fixes-169 "Direct link to Bug Fixes") * **core:** disable propagation when `mapToPk` is used ([6f6a204](https://github.com/mikro-orm/mikro-orm/commit/6f6a204b6a73a6bbfea65f5511c5fe1f29a9a199)), closes [#1124](https://github.com/mikro-orm/mikro-orm/issues/1124) * **core:** do not use custom toJSON when storing result cache ([86ec3b3](https://github.com/mikro-orm/mikro-orm/commit/86ec3b3a543a1091d5ec500287e9ee870ddde186)) * **core:** fix comparison of object properties and bigints ([2119a65](https://github.com/mikro-orm/mikro-orm/commit/2119a65f29dcb583a3a28e8dadb3c68240634632)), closes [#1117](https://github.com/mikro-orm/mikro-orm/issues/1117) * **core:** fix computing changesets with reference as PK ([5504436](https://github.com/mikro-orm/mikro-orm/commit/55044366242f6592565f85ad035e059ec3081ee0)), closes [#1111](https://github.com/mikro-orm/mikro-orm/issues/1111) * **core:** fix serialization of properties with same name ([d4d9c48](https://github.com/mikro-orm/mikro-orm/commit/d4d9c48bd17ad2cca5b9c134c2ca433040bf32ee)), closes [#1115](https://github.com/mikro-orm/mikro-orm/issues/1115) * **sql:** allow using raw value for JSON prop with custom type ([2a17c59](https://github.com/mikro-orm/mikro-orm/commit/2a17c59cf2db4c6c211ca80ad9c82d64c94289df)), closes [#1112](https://github.com/mikro-orm/mikro-orm/issues/1112) ## [4.3.1](https://github.com/mikro-orm/mikro-orm/compare/v4.3.0...v4.3.1) (2020-11-20)[​](#431-2020-11-20 "Direct link to 431-2020-11-20") ### Bug Fixes[​](#bug-fixes-170 "Direct link to Bug Fixes") * **core:** assign embedded properties from class objects ([#1087](https://github.com/mikro-orm/mikro-orm/issues/1087)) ([c2b4972](https://github.com/mikro-orm/mikro-orm/commit/c2b49726ad601516c36e8c289c1ef6a358d54780)), closes [#1083](https://github.com/mikro-orm/mikro-orm/issues/1083) * **core:** do not interpolate escaped question marks ([c54c2a2](https://github.com/mikro-orm/mikro-orm/commit/c54c2a25314f7c086d590aa0574f713f44363463)) * **core:** rework unique property extra updates ([bd19d03](https://github.com/mikro-orm/mikro-orm/commit/bd19d038879e6c95768703e78ed9f4236deea48a)), closes [#1025](https://github.com/mikro-orm/mikro-orm/issues/1025) [#1084](https://github.com/mikro-orm/mikro-orm/issues/1084) * **postgres:** use `->>` to search in object embeddables ([78c9373](https://github.com/mikro-orm/mikro-orm/commit/78c93738ba875eb7195460fe6503da784db038a1)), closes [#1091](https://github.com/mikro-orm/mikro-orm/issues/1091) * **ts-morph:** fix discovery of `IdentifiedReference` with ts-morph ([d94bd91](https://github.com/mikro-orm/mikro-orm/commit/d94bd9106948d2ca583aaff9125486987ffc5243)), closes [#1088](https://github.com/mikro-orm/mikro-orm/issues/1088) ## [4.3.0](https://github.com/mikro-orm/mikro-orm/compare/v4.2.3...v4.3.0) (2020-11-13)[​](#430-2020-11-13 "Direct link to 430-2020-11-13") ### Bug Fixes[​](#bug-fixes-171 "Direct link to Bug Fixes") * **cli:** add missing peer dependencies ([#1057](https://github.com/mikro-orm/mikro-orm/issues/1057)) ([83bd6b3](https://github.com/mikro-orm/mikro-orm/commit/83bd6b3ce0fe47cb0d1052ec200ecc49fe3728b5)) * **core:** always check remove stack when cascade persisting ([a9a1bee](https://github.com/mikro-orm/mikro-orm/commit/a9a1bee55dcdaa3b0804a95643e44660b0a62a83)), closes [#1003](https://github.com/mikro-orm/mikro-orm/issues/1003) * **core:** do not override child class properties ([#1000](https://github.com/mikro-orm/mikro-orm/issues/1000)) ([6d91f1f](https://github.com/mikro-orm/mikro-orm/commit/6d91f1f4dfb61694511b1e65b8b0e8da8e70291d)) * **core:** ensure correct grouping and commit order for STI ([8b77525](https://github.com/mikro-orm/mikro-orm/commit/8b7752545654b5a60cbc6eaf4f12e0b91e4d5cea)), closes [#845](https://github.com/mikro-orm/mikro-orm/issues/845) * **core:** ensure correct handling of empty arrays ([c9afabb](https://github.com/mikro-orm/mikro-orm/commit/c9afabb5819a05006d0c13ed3de51b43d2052abc)) * **core:** ensure correct handling of empty arrays ([1c4ba75](https://github.com/mikro-orm/mikro-orm/commit/1c4ba75bd7167a71d986c3794eea12dd8c162fb3)) * **core:** ensure we store the right value for bigint PKs ([7d7a1c9](https://github.com/mikro-orm/mikro-orm/commit/7d7a1c9881125930e08c096601f2816db50fab6e)), closes [#1038](https://github.com/mikro-orm/mikro-orm/issues/1038) * **core:** fix cascading when assigning collections ([d40fcfa](https://github.com/mikro-orm/mikro-orm/commit/d40fcfa772efa9f84484293a3b24da1cbd085add)), closes [#1048](https://github.com/mikro-orm/mikro-orm/issues/1048) * **core:** pin dependencies ([0f3a8e5](https://github.com/mikro-orm/mikro-orm/commit/0f3a8e51e4bcd5386c517b95a437721fbdda7e66)), closes [#961](https://github.com/mikro-orm/mikro-orm/issues/961) * **deps:** update dependency @docusaurus/core to v2.0.0-alpha.66 ([#978](https://github.com/mikro-orm/mikro-orm/issues/978)) ([475d3b0](https://github.com/mikro-orm/mikro-orm/commit/475d3b0758c8e1e96f17bf8ca58b7e6c2379bf0d)) * **deps:** update dependency @types/mongodb to v3.5.33 ([#1045](https://github.com/mikro-orm/mikro-orm/issues/1045)) ([81514d8](https://github.com/mikro-orm/mikro-orm/commit/81514d8bf6a691bd015d198a44ea01f5b4b0eb66)) * **discovery:** allow using absolute paths in `entities` ([584854c](https://github.com/mikro-orm/mikro-orm/commit/584854cca4b0a0bf96902524f8c6d171317e7d98)), closes [#1073](https://github.com/mikro-orm/mikro-orm/issues/1073) * **mongo:** do not create collections for embeddables ([a0cc877](https://github.com/mikro-orm/mikro-orm/commit/a0cc87791f8a503ad13b3fd34e72d68e758b3d39)), closes [#1040](https://github.com/mikro-orm/mikro-orm/issues/1040) * **schema:** do not add unique constraint to PKs ([a7da03d](https://github.com/mikro-orm/mikro-orm/commit/a7da03d2a2a937a1a2642cb34f7583a333fd50da)), closes [#1064](https://github.com/mikro-orm/mikro-orm/issues/1064) * **schema:** ensure we do not ignore some columns ([5d7dfc1](https://github.com/mikro-orm/mikro-orm/commit/5d7dfc14212a4371611e058c377293e05d00c034)), closes [#1009](https://github.com/mikro-orm/mikro-orm/issues/1009) * **schema:** fix diffing FKs in MySQL 8 ([#1030](https://github.com/mikro-orm/mikro-orm/issues/1030)) ([b6f31a5](https://github.com/mikro-orm/mikro-orm/commit/b6f31a5db38d2b803a7efc1d0e476afd331d4a50)) * **schema:** pass entity name to `joinKeyColumnName()` ([fe4b7bd](https://github.com/mikro-orm/mikro-orm/commit/fe4b7bd30eebeb8b94be9648b4583b1047a62b55)), closes [#1026](https://github.com/mikro-orm/mikro-orm/issues/1026) * **sql:** allow using dot inside custom order by expression ([11e8c56](https://github.com/mikro-orm/mikro-orm/commit/11e8c56f5998eadcb5d81d31a4d30470ea8cf02e)), closes [#1067](https://github.com/mikro-orm/mikro-orm/issues/1067) * **sql:** convert custom types at query builder level ([83d3ab2](https://github.com/mikro-orm/mikro-orm/commit/83d3ab27f63216aab385500ab73639fa39dcfe90)) * **sql:** do not batch update unique properties ([87b722a](https://github.com/mikro-orm/mikro-orm/commit/87b722a792e8a49c4ffa52e5b21444748c48b224)), closes [#1025](https://github.com/mikro-orm/mikro-orm/issues/1025) * **sql:** fix populating M :N via joined strategy with conditions ([7113827](https://github.com/mikro-orm/mikro-orm/commit/7113827500079efb844df7bddf0b7443ab098185)), closes [#1043](https://github.com/mikro-orm/mikro-orm/issues/1043) * **sql:** implement diffing of simple scalar indexes ([dc81ef0](https://github.com/mikro-orm/mikro-orm/commit/dc81ef098bcbfbc0e7215b539dbe7d24fce03bf6)), closes [#957](https://github.com/mikro-orm/mikro-orm/issues/957) * **sql:** inline array parameters when formatting queries ([a21735f](https://github.com/mikro-orm/mikro-orm/commit/a21735f85f3a9de533212151bee8df55810b25b1)), closes [#1021](https://github.com/mikro-orm/mikro-orm/issues/1021) * **sql:** interpolate `??` as identifier ([a3d4c09](https://github.com/mikro-orm/mikro-orm/commit/a3d4c09b393e2ca7e2bc2ad7c98b9f403559f4bd)), closes [#983](https://github.com/mikro-orm/mikro-orm/issues/983) * **sql:** take snapshots of collections populated via joined strategy ([5f3288a](https://github.com/mikro-orm/mikro-orm/commit/5f3288af5761f1cba12098a26532ce602c241af1)), closes [#1041](https://github.com/mikro-orm/mikro-orm/issues/1041) * **validation:** don't validate inherited STI props ([#998](https://github.com/mikro-orm/mikro-orm/issues/998)) ([63d1f57](https://github.com/mikro-orm/mikro-orm/commit/63d1f57f467f9d5c6d12b1c0fa212a922d0f6907)), closes [#997](https://github.com/mikro-orm/mikro-orm/issues/997) ### Features[​](#features-91 "Direct link to Features") * **core:** allow calling `Collection.set()` on not initialized collections ([1d0bb85](https://github.com/mikro-orm/mikro-orm/commit/1d0bb85598536d3e11e39a9f6cc5c6c919c8aa22)), closes [#1048](https://github.com/mikro-orm/mikro-orm/issues/1048) * **core:** allow extending embeddables ([#1051](https://github.com/mikro-orm/mikro-orm/issues/1051)) ([89d3250](https://github.com/mikro-orm/mikro-orm/commit/89d325061aaa600e479009ac2bc59304ca46aa4b)), closes [#1049](https://github.com/mikro-orm/mikro-orm/issues/1049) * **core:** allow mapping `null` to `undefined` optionally ([55de84e](https://github.com/mikro-orm/mikro-orm/commit/55de84ecabc5e3916f8c8c178f56834f7ec75b2f)), closes [#1019](https://github.com/mikro-orm/mikro-orm/issues/1019) * **core:** allow using multiple ORM instances with RequestContext ([e11040d](https://github.com/mikro-orm/mikro-orm/commit/e11040d2b11ab97f2264f002908ea3dfcf514773)), closes [#872](https://github.com/mikro-orm/mikro-orm/issues/872) * **core:** maintain transaction context automatically ([#959](https://github.com/mikro-orm/mikro-orm/issues/959)) ([e0064e4](https://github.com/mikro-orm/mikro-orm/commit/e0064e44acb05eb559dcbd47ffff8dafb814149f)) * **count:** initial implementation of loadCount ([#955](https://github.com/mikro-orm/mikro-orm/issues/955)) ([3371415](https://github.com/mikro-orm/mikro-orm/commit/3371415f7af82ce2996954d623e0bd377c81b41b)), closes [#949](https://github.com/mikro-orm/mikro-orm/issues/949) * **query-builder:** allow mapping of complex joined results ([#988](https://github.com/mikro-orm/mikro-orm/issues/988)) ([60dd2d8](https://github.com/mikro-orm/mikro-orm/commit/60dd2d8e951dd94946888765a5e81f4f16c3e7c1)), closes [#932](https://github.com/mikro-orm/mikro-orm/issues/932) * **release:** add automatic nightly releases ([7f8a10c](https://github.com/mikro-orm/mikro-orm/commit/7f8a10cbb063ed93531b2276e426508ffaa9ad6a)), closes [#339](https://github.com/mikro-orm/mikro-orm/issues/339) ## [4.2.3](https://github.com/mikro-orm/mikro-orm/compare/v4.2.2...v4.2.3) (2020-10-24)[​](#423-2020-10-24 "Direct link to 423-2020-10-24") ### Bug Fixes[​](#bug-fixes-172 "Direct link to Bug Fixes") * **core:** ensure `qb.getFormattedQuery()` works with postgres ([63b2521](https://github.com/mikro-orm/mikro-orm/commit/63b2521b38ddba2ba5853ee56d28ea7300064f61)) * **core:** ensure global filters are enabled by default ([#952](https://github.com/mikro-orm/mikro-orm/issues/952)) ([28124fb](https://github.com/mikro-orm/mikro-orm/commit/28124fb43be9dc4c2f4d1d6b88406dbce33375a9)) * **core:** rework access to target entity metadata from collections ([10ca335](https://github.com/mikro-orm/mikro-orm/commit/10ca335fc220699e3aa7ced828cd7d6fb1bc821f)), closes [#956](https://github.com/mikro-orm/mikro-orm/issues/956) ## [4.2.2](https://github.com/mikro-orm/mikro-orm/compare/v4.2.1...v4.2.2) (2020-10-22)[​](#422-2020-10-22 "Direct link to 422-2020-10-22") ### Bug Fixes[​](#bug-fixes-173 "Direct link to Bug Fixes") * **core:** fix mapping of params with custom types ([e5049b1](https://github.com/mikro-orm/mikro-orm/commit/e5049b192d13ea41747e1340715e288084a0015d)), closes [#940](https://github.com/mikro-orm/mikro-orm/issues/940) * **schema:** make sure we do not create FK columns twice in sqlite ([1eb6374](https://github.com/mikro-orm/mikro-orm/commit/1eb6374092caaae35acde46197d506ddf68a9ed9)), closes [#942](https://github.com/mikro-orm/mikro-orm/issues/942) * only create migrations folder if migrationsList is not used ([#941](https://github.com/mikro-orm/mikro-orm/issues/941)) ([1e5c5e8](https://github.com/mikro-orm/mikro-orm/commit/1e5c5e83013894d9546c894e83c5965c5bafd4e5)), closes [#907](https://github.com/mikro-orm/mikro-orm/issues/907) * **core:** fix wrongly inferred 1 :m metadata ([82f7f0a](https://github.com/mikro-orm/mikro-orm/commit/82f7f0a7e003e81255ccb74e435e9ac920db8cca)), closes [#936](https://github.com/mikro-orm/mikro-orm/issues/936) ### Features[​](#features-92 "Direct link to Features") * **core:** add MetadataStorage.clear() to clear the global storage ([c6fa0f4](https://github.com/mikro-orm/mikro-orm/commit/c6fa0f49acebd452368700d2c9ff813f221da530)), closes [#936](https://github.com/mikro-orm/mikro-orm/issues/936) ## [4.2.1](https://github.com/mikro-orm/mikro-orm/compare/v4.2.0...v4.2.1) (2020-10-20)[​](#421-2020-10-20 "Direct link to 421-2020-10-20") ### Bug Fixes[​](#bug-fixes-174 "Direct link to Bug Fixes") * **core:** make sure refreshing of loaded entities works ([45f3f42](https://github.com/mikro-orm/mikro-orm/commit/45f3f42bfa010a9691cbc50b0a957e4b8ec3b0f2)) * **core:** validate object embeddable values on flush ([cd38e17](https://github.com/mikro-orm/mikro-orm/commit/cd38e17e993e763fba3fed68cdc4ecedd9960e1c)), closes [#466](https://github.com/mikro-orm/mikro-orm/issues/466) * **core:** validate the object passed to `em.persist()` ([90678c2](https://github.com/mikro-orm/mikro-orm/commit/90678c2a2a4896608e7bee727c262212f9c92693)) ## [4.2.0](https://github.com/mikro-orm/mikro-orm/compare/v4.1.1...v4.2.0) (2020-10-18)[​](#420-2020-10-18 "Direct link to 420-2020-10-18") ### Bug Fixes[​](#bug-fixes-175 "Direct link to Bug Fixes") * **core:** fix propagation of conditions with operators ([05acd34](https://github.com/mikro-orm/mikro-orm/commit/05acd34b89bdce50d4e759a21400c913f5e4c383)) * **core:** reset the working state of UoW after failures ([6423cf7](https://github.com/mikro-orm/mikro-orm/commit/6423cf7fc705ed4d6f3f00eca9c8f2e73602ae9a)) * **core:** update umzug types to 2.3 ([4668e78](https://github.com/mikro-orm/mikro-orm/commit/4668e78d1c900d1718625364b603dda1b707dd82)), closes [#926](https://github.com/mikro-orm/mikro-orm/issues/926) * **core:** use entity ctors also when all PKs are provided in `em.create()` ([b45b60b](https://github.com/mikro-orm/mikro-orm/commit/b45b60b328821950d4198fa12813bea26e0b6f2f)), closes [#924](https://github.com/mikro-orm/mikro-orm/issues/924) * **schema:** fix automatic discriminator map values in STI ([7cd3c6f](https://github.com/mikro-orm/mikro-orm/commit/7cd3c6f092afd11089ce72672dfb389dec345fec)), closes [#923](https://github.com/mikro-orm/mikro-orm/issues/923) * **schema:** improve column type equality check ([#925](https://github.com/mikro-orm/mikro-orm/issues/925)) ([152f399](https://github.com/mikro-orm/mikro-orm/commit/152f3991db57d771869a3f83b102d9bd14400fe9)) ### Features[​](#features-93 "Direct link to Features") * **core:** add basic (in-memory) result caching ([2f8253d](https://github.com/mikro-orm/mikro-orm/commit/2f8253d9db9ae0c469e2dcf976aa20546f3b9b8c)) * **core:** add native support for enum arrays ([9053450](https://github.com/mikro-orm/mikro-orm/commit/9053450634a606356b609ff64fc2a0da026ab730)), closes [#476](https://github.com/mikro-orm/mikro-orm/issues/476) * **core:** allow defining multiple entities in single file ([e3ab336](https://github.com/mikro-orm/mikro-orm/commit/e3ab33699b116e25e09a7449589db7955899c8ac)), closes [#922](https://github.com/mikro-orm/mikro-orm/issues/922) * **core:** allow mapping m:1/1:1 relations to PK ([#921](https://github.com/mikro-orm/mikro-orm/issues/921)) ([894f17e](https://github.com/mikro-orm/mikro-orm/commit/894f17e4fa24ac45d7872bd5e52ae9e9fbf014df)), closes [#750](https://github.com/mikro-orm/mikro-orm/issues/750) * **core:** allow storing embeddables as objects ([#927](https://github.com/mikro-orm/mikro-orm/issues/927)) ([ba881e6](https://github.com/mikro-orm/mikro-orm/commit/ba881e6257dd5d72bb10ca402b0322f7dbbda69c)), closes [#906](https://github.com/mikro-orm/mikro-orm/issues/906) * **serialization:** rework handling of cycles ([1a2d026](https://github.com/mikro-orm/mikro-orm/commit/1a2d026c13be8a62c77bbae4ec6e3519b1c7209f)) ## [4.1.1](https://github.com/mikro-orm/mikro-orm/compare/v4.1.0...v4.1.1) (2020-10-14)[​](#411-2020-10-14 "Direct link to 411-2020-10-14") ### Bug Fixes[​](#bug-fixes-176 "Direct link to Bug Fixes") * **postgres:** escape question marks in parameters ([813e3cd](https://github.com/mikro-orm/mikro-orm/commit/813e3cd3fad2f1975c0158bf7265e7f58d1437b5)), closes [#920](https://github.com/mikro-orm/mikro-orm/issues/920) ## [4.1.0](https://github.com/mikro-orm/mikro-orm/compare/v4.0.7...v4.1.0) (2020-10-12)[​](#410-2020-10-12 "Direct link to 410-2020-10-12") ### Bug Fixes[​](#bug-fixes-177 "Direct link to Bug Fixes") * **core:** allow defining PKs inside `@BeforeCreate()` ([0a2299f](https://github.com/mikro-orm/mikro-orm/commit/0a2299f78eea99c5a2af400f4e93938467925e3e)), closes [#893](https://github.com/mikro-orm/mikro-orm/issues/893) [#892](https://github.com/mikro-orm/mikro-orm/issues/892) * **core:** do not cascade remove FK primary keys ([37415ce](https://github.com/mikro-orm/mikro-orm/commit/37415ce7c0d519b3145122045acfb7d1c85a65f4)), closes [#915](https://github.com/mikro-orm/mikro-orm/issues/915) * **core:** do not fire onInit event twice ([9485f48](https://github.com/mikro-orm/mikro-orm/commit/9485f48978e630126125e411ebfb83dedae2963e)), closes [#900](https://github.com/mikro-orm/mikro-orm/issues/900) * **core:** ensure custom types are comparable ([3714a51](https://github.com/mikro-orm/mikro-orm/commit/3714a51cd3aac94726194255ec8dc9128c145cdb)), closes [#864](https://github.com/mikro-orm/mikro-orm/issues/864) * **core:** fix detection of custom type PKs with object value ([61095ce](https://github.com/mikro-orm/mikro-orm/commit/61095ce957f2d8b39ed83dbee14e4db289d0baac)), closes [#910](https://github.com/mikro-orm/mikro-orm/issues/910) * **core:** fix mapping of returning zero values in embeddables ([e42ae4a](https://github.com/mikro-orm/mikro-orm/commit/e42ae4ad5ae3ca7a6895a7debac6ac4ce7752a19)), closes [#905](https://github.com/mikro-orm/mikro-orm/issues/905) * **core:** skip index initialization for abstract entities ([#881](https://github.com/mikro-orm/mikro-orm/issues/881)) ([a2d381f](https://github.com/mikro-orm/mikro-orm/commit/a2d381fe03353dad40e8fe78bd443fc6e23de02c)) * **migrations:** always ensure the migrations folder exists ([a1e0703](https://github.com/mikro-orm/mikro-orm/commit/a1e0703dbf1572e95bf11b353f2872742fdecaef)), closes [#907](https://github.com/mikro-orm/mikro-orm/issues/907) * **migrations:** respect custom file names when running by name ([80e5b58](https://github.com/mikro-orm/mikro-orm/commit/80e5b584594da89a11b61d1ac2fecdb61dd4106a)), closes [#883](https://github.com/mikro-orm/mikro-orm/issues/883) * **mongo:** filter by serialized PK inside group condition ([a492a64](https://github.com/mikro-orm/mikro-orm/commit/a492a64e08fc4fac5b447d0928bbc6d7b453e29f)), closes [#908](https://github.com/mikro-orm/mikro-orm/issues/908) * **postgres:** do not convert date type columns to Date js objects ([2cfb145](https://github.com/mikro-orm/mikro-orm/commit/2cfb14594608f9de89a68464afc838d0925eb68d)), closes [#864](https://github.com/mikro-orm/mikro-orm/issues/864) * **schema:** allow using non-abstract root entity in STI ([9dd3aed](https://github.com/mikro-orm/mikro-orm/commit/9dd3aede0484b5e31e10e9ce0ce92f4e0f5d6f55)), closes [#874](https://github.com/mikro-orm/mikro-orm/issues/874) * **schema:** make STI metadata discovery order independent ([f477a48](https://github.com/mikro-orm/mikro-orm/commit/f477a48562d09373a2e78dea6bc72f21e2c6d64d)), closes [#909](https://github.com/mikro-orm/mikro-orm/issues/909) * **sqlite:** rework schema support for composite keys in sqlite ([82e2efd](https://github.com/mikro-orm/mikro-orm/commit/82e2efd2d285c507c9205bffced4a9afa920f259)), closes [#887](https://github.com/mikro-orm/mikro-orm/issues/887) * **typings:** improve inference of the entity type ([67f8015](https://github.com/mikro-orm/mikro-orm/commit/67f80157ae013479b6fc47ae1c08a5cd31a6c32d)), closes [#876](https://github.com/mikro-orm/mikro-orm/issues/876) ### Features[​](#features-94 "Direct link to Features") * **core:** add EntityRepository.merge() method ([f459334](https://github.com/mikro-orm/mikro-orm/commit/f45933476177fe0503f0679cf7e947db224a450f)), closes [#868](https://github.com/mikro-orm/mikro-orm/issues/868) ### Performance Improvements[​](#performance-improvements-33 "Direct link to Performance Improvements") * **core:** implement bulk updates in mongo driver ([5f347c1](https://github.com/mikro-orm/mikro-orm/commit/5f347c1de4e5dd6f30305275c86d333611edc27c)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** implement bulk updates in sql drivers ([b005353](https://github.com/mikro-orm/mikro-orm/commit/b00535349368ba18a5e0a5452ae7e2b567e12952)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** improve hydration performance ([3cafbf3](https://github.com/mikro-orm/mikro-orm/commit/3cafbf39c52e02d3bd2bfc3686d3ffdeb7614586)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** interpolate query parameters at ORM level ([742b813](https://github.com/mikro-orm/mikro-orm/commit/742b8131ba7d0acec2cca3f289237fd0e757baa5)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** optimize entity hydration ([6c56a05](https://github.com/mikro-orm/mikro-orm/commit/6c56a05a86b78fc9c3ebc6ddceb75072289e6b48)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use batching in uow deletes ([8cbb22a](https://github.com/mikro-orm/mikro-orm/commit/8cbb22a841035debda5bafa6100c1a4075954d3d)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use bulk inserts in all drivers ([10f2e55](https://github.com/mikro-orm/mikro-orm/commit/10f2e55f6710822c9fca272b01c278ff80065096)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use dedicated identity maps for each entity ([84667f9](https://github.com/mikro-orm/mikro-orm/commit/84667f9e97323e4b054db2c0c70939ab0ca86c86)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use faster way to check number of object keys ([82f3ee4](https://github.com/mikro-orm/mikro-orm/commit/82f3ee4d4169def8ce8fe31764171193e8b8b5dc)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use JIT compilation for diffing entities ([60f10a4](https://github.com/mikro-orm/mikro-orm/commit/60f10a4cf5fcdbe397c8d7410ece9ffc7a272d6c)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use JIT compilation for snapshotting entities ([5612759](https://github.com/mikro-orm/mikro-orm/commit/561275918c0da27e612084c1c0a7b8bd473ef081)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use JIT compilation in hydrator ([1f06a52](https://github.com/mikro-orm/mikro-orm/commit/1f06a52392114a9c478b83ff98a1616acb44400a)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use JIT compiled PK getters/serializers ([0ec99dc](https://github.com/mikro-orm/mikro-orm/commit/0ec99dc75690bf15df3897b4da0fc3b2ab709cdd)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use raw sql for batch updates ([1089c57](https://github.com/mikro-orm/mikro-orm/commit/1089c57b4cea71b1319b913026e8b198985258e7)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) ## [4.0.7](https://github.com/mikro-orm/mikro-orm/compare/v4.0.6...v4.0.7) (2020-09-24)[​](#407-2020-09-24 "Direct link to 407-2020-09-24") ### Bug Fixes[​](#bug-fixes-178 "Direct link to Bug Fixes") * **core:** do not store original data for references ([0a9ef65](https://github.com/mikro-orm/mikro-orm/commit/0a9ef6591befe593af2c707eea36398f866bc133)), closes [#864](https://github.com/mikro-orm/mikro-orm/issues/864) ### Features[​](#features-95 "Direct link to Features") * **core:** add groupBy, having and schema to `CountOptions` ([d3c3858](https://github.com/mikro-orm/mikro-orm/commit/d3c38584c38e11002460a6556405e136aabefa93)) ### Performance Improvements[​](#performance-improvements-34 "Direct link to Performance Improvements") * **core:** use batch inserts in UoW (postgres & mongodb) ([#865](https://github.com/mikro-orm/mikro-orm/issues/865)) ([54ad928](https://github.com/mikro-orm/mikro-orm/commit/54ad928aab44d0c42e3f7b306eef0c07ed65dfc1)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) ## [4.0.6](https://github.com/mikro-orm/mikro-orm/compare/v4.0.5...v4.0.6) (2020-09-22)[​](#406-2020-09-22 "Direct link to 406-2020-09-22") ### Bug Fixes[​](#bug-fixes-179 "Direct link to Bug Fixes") * **deps:** update dependency escaya to ^0.0.49 ([#854](https://github.com/mikro-orm/mikro-orm/issues/854)) ([d4737b6](https://github.com/mikro-orm/mikro-orm/commit/d4737b646fe52c5bf4797312835cc974f4fe7b7c)) * **migrations:** migrate only one version down with explicit tx ([50567dd](https://github.com/mikro-orm/mikro-orm/commit/50567ddd384ac2b53512925cade28e8debbb9f3b)), closes [#855](https://github.com/mikro-orm/mikro-orm/issues/855) * **query-builder:** do not select 1:1 owner when auto-joining ([86c3032](https://github.com/mikro-orm/mikro-orm/commit/86c303229c2ac7b77d245000f64562c0cc529320)), closes [#858](https://github.com/mikro-orm/mikro-orm/issues/858) * **query-builder:** fix auto-joining of 1 :m PKs ([920995f](https://github.com/mikro-orm/mikro-orm/commit/920995f94070ff242b297d2837d83c7d9a9cb776)), closes [#857](https://github.com/mikro-orm/mikro-orm/issues/857) * **query-builder:** fix count query with auto-joining of 1:1 ([9b8056c](https://github.com/mikro-orm/mikro-orm/commit/9b8056c7440b836d22c8175ba90adf70fc3b052e)), closes [#858](https://github.com/mikro-orm/mikro-orm/issues/858) * **query-builder:** wrap nested array conditions with `$in` operator ([939989a](https://github.com/mikro-orm/mikro-orm/commit/939989add4f670deefe44f5a7faedb9b64155ba5)), closes [#860](https://github.com/mikro-orm/mikro-orm/issues/860) ## [4.0.5](https://github.com/mikro-orm/mikro-orm/compare/v4.0.4...v4.0.5) (2020-09-21)[​](#405-2020-09-21 "Direct link to 405-2020-09-21") ### Bug Fixes[​](#bug-fixes-180 "Direct link to Bug Fixes") * **core:** fix merging results from QB to existing entity ([218098a](https://github.com/mikro-orm/mikro-orm/commit/218098ababb47dc3ad3e441d631cab5615251a0e)) * **schema:** defer creating of composite indexes + implement diffing ([f57b457](https://github.com/mikro-orm/mikro-orm/commit/f57b4571feb2aea7c955c5f7eb7470530133271e)), closes [#850](https://github.com/mikro-orm/mikro-orm/issues/850) ### Features[​](#features-96 "Direct link to Features") * **mapping:** make `@Unique` and `@Index` (optionally) typesafe ([afe6801](https://github.com/mikro-orm/mikro-orm/commit/afe68015765478d40fbab6701c11661d74e2cf77)), closes [#850](https://github.com/mikro-orm/mikro-orm/issues/850) ## [4.0.4](https://github.com/mikro-orm/mikro-orm/compare/v4.0.3...v4.0.4) (2020-09-19)[​](#404-2020-09-19 "Direct link to 404-2020-09-19") ### Bug Fixes[​](#bug-fixes-181 "Direct link to Bug Fixes") * **core:** allow filter condition callbacks without arguments ([5b3401f](https://github.com/mikro-orm/mikro-orm/commit/5b3401f28cbfcc4e78707fb8110be418a695932a)), closes [#847](https://github.com/mikro-orm/mikro-orm/issues/847) * **core:** allow filter condition callbacks without arguments ([da8fbfc](https://github.com/mikro-orm/mikro-orm/commit/da8fbfc5aa7c2a4a3b58325b4874125d2f67d2c1)), closes [#847](https://github.com/mikro-orm/mikro-orm/issues/847) * **core:** allow querying `ArrayType` with a value ([e505358](https://github.com/mikro-orm/mikro-orm/commit/e50535816f318ff0c0c5edf68270920ff2cef520)), closes [#844](https://github.com/mikro-orm/mikro-orm/issues/844) * **core:** improve metadata validation of STI relations ([0b97af8](https://github.com/mikro-orm/mikro-orm/commit/0b97af8404fd557836f8afae9cce255aca083873)), closes [#845](https://github.com/mikro-orm/mikro-orm/issues/845) * **core:** update filter typing to allow async condition ([#848](https://github.com/mikro-orm/mikro-orm/issues/848)) ([2188f62](https://github.com/mikro-orm/mikro-orm/commit/2188f621163bebe9bbb74d1b693871fe22017d38)) * **deps:** update dependency escaya to ^0.0.44 ([#839](https://github.com/mikro-orm/mikro-orm/issues/839)) ([fedb41c](https://github.com/mikro-orm/mikro-orm/commit/fedb41cc53eeafb3e3e1540c46acc5f8f58f43b2)) * **deps:** update dependency escaya to ^0.0.45 ([#842](https://github.com/mikro-orm/mikro-orm/issues/842)) ([d9f9f05](https://github.com/mikro-orm/mikro-orm/commit/d9f9f0572a1bb1d5a5567a46b835fa1877cb3806)) * **query-builder:** fix mapping of 1:1 inverse sides ([a46281e](https://github.com/mikro-orm/mikro-orm/commit/a46281e0d8de6385e2c49fd250d284293421f2dc)), closes [#849](https://github.com/mikro-orm/mikro-orm/issues/849) * **query-builder:** fix mapping of nested 1:1 properties ([9799e70](https://github.com/mikro-orm/mikro-orm/commit/9799e70bd7235695f4f1e55b25fe61bbc158eb38)) ### Features[​](#features-97 "Direct link to Features") * **core:** allow setting loading strategy globally ([e4378ee](https://github.com/mikro-orm/mikro-orm/commit/e4378ee6dca5607a82e2bff3450e18f0a6668354)), closes [#834](https://github.com/mikro-orm/mikro-orm/issues/834) * **migrations:** allow providing transaction context ([1089c86](https://github.com/mikro-orm/mikro-orm/commit/1089c861afcb31703a0dbdc82edf9674b2dd1576)), closes [#851](https://github.com/mikro-orm/mikro-orm/issues/851) ### Performance Improvements[​](#performance-improvements-35 "Direct link to Performance Improvements") * move reference to metadata to entity prototype + more improvements ([#843](https://github.com/mikro-orm/mikro-orm/issues/843)) ([f71e4c2](https://github.com/mikro-orm/mikro-orm/commit/f71e4c2b8dd0bbfb0658dc8a366444ec1a49c187)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) ### Reverts[​](#reverts "Direct link to Reverts") * Revert "refactor: return `target` from decorator definition" ([e021617](https://github.com/mikro-orm/mikro-orm/commit/e02161774a904748cfa13e683fb2ce93d66403ca)) ## [4.0.3](https://github.com/mikro-orm/mikro-orm/compare/v4.0.2...v4.0.3) (2020-09-15)[​](#403-2020-09-15 "Direct link to 403-2020-09-15") ### Bug Fixes[​](#bug-fixes-182 "Direct link to Bug Fixes") * **core:** make a copy of custom type values to allow array diffing ([6ae72ae](https://github.com/mikro-orm/mikro-orm/commit/6ae72ae03054df16717a52041d5574a6f4a0d66d)) ### Features[​](#features-98 "Direct link to Features") * **core:** allow using `AsyncLocalStorage` for request context ([47cd9a5](https://github.com/mikro-orm/mikro-orm/commit/47cd9a5798a70d57cfb9ac3ec7f2254a77aafdfb)), closes [#575](https://github.com/mikro-orm/mikro-orm/issues/575) ### Performance Improvements[​](#performance-improvements-36 "Direct link to Performance Improvements") * **core:** create the helper instance early ([f4f90eb](https://github.com/mikro-orm/mikro-orm/commit/f4f90ebe7d540164c2959c554a5245dda712b612)) * **core:** do not generate internal entity uuid ([9f46aa4](https://github.com/mikro-orm/mikro-orm/commit/9f46aa4a79c0ead726af3b2001f7edb257ecd676)) * **core:** do not use `em.merge()` internally ([6a1a6d6](https://github.com/mikro-orm/mikro-orm/commit/6a1a6d68b65a20b8f1a78bf644844427f3b2dd1a)) * **core:** remove WrappedEntity.\_\_internal map ([2228fcb](https://github.com/mikro-orm/mikro-orm/commit/2228fcbd2eb7e19b2067b78f7b8fd2d2a5ce0916)) * **core:** skip processing of hooks when there are no hooks ([425784b](https://github.com/mikro-orm/mikro-orm/commit/425784bda59bee84a3663e133f9c451e45587226)) * **core:** store entity identifier on entity helper ([403acca](https://github.com/mikro-orm/mikro-orm/commit/403acca1973279e7509f2707cfb0240b8c6f92ae)) * **core:** store original entity data on entity helper ([6a91b01](https://github.com/mikro-orm/mikro-orm/commit/6a91b0101553de397667c048f1f8deb0ff94370d)) ## [4.0.2](https://github.com/mikro-orm/mikro-orm/compare/v4.0.1...v4.0.2) (2020-09-11)[​](#402-2020-09-11 "Direct link to 402-2020-09-11") ### Bug Fixes[​](#bug-fixes-183 "Direct link to Bug Fixes") * **core:** simplify `Collection` type args ([1fb6cec](https://github.com/mikro-orm/mikro-orm/commit/1fb6cecb29c95de9307c89518a99bbb35620b867)) ### Features[​](#features-99 "Direct link to Features") * **entity-generator:** do not use ts-morph ([478a7bb](https://github.com/mikro-orm/mikro-orm/commit/478a7bb7f9ea80062caaef666b8308086842a44b)) * **migrations:** do not use ts-morph in migrations ([9800dc1](https://github.com/mikro-orm/mikro-orm/commit/9800dc114ae32d31bb3621fc771a8eb5324ae044)) ## [4.0.1](https://github.com/mikro-orm/mikro-orm/compare/v4.0.0...v4.0.1) (2020-09-10)[​](#401-2020-09-10 "Direct link to 401-2020-09-10") ### Bug Fixes[​](#bug-fixes-184 "Direct link to Bug Fixes") * **core:** hydrate user defined discriminator columns ([#831](https://github.com/mikro-orm/mikro-orm/issues/831)) ([8671440](https://github.com/mikro-orm/mikro-orm/commit/867144005f18ab7780b60803c40ed448e0b31a8c)), closes [#827](https://github.com/mikro-orm/mikro-orm/issues/827) * **core:** refactor internals to reduce number of cycles ([#830](https://github.com/mikro-orm/mikro-orm/issues/830)) ([3994767](https://github.com/mikro-orm/mikro-orm/commit/3994767d93ef119d229bedffa77eb2ea3af5c775)) ## [4.0.0](https://github.com/mikro-orm/mikro-orm/compare/v3.6.15...v4.0.0) (2020-09-08)[​](#400-2020-09-08 "Direct link to 400-2020-09-08") ### Bug Fixes[​](#bug-fixes-185 "Direct link to Bug Fixes") * **cli:** custom tsconfig gets wrong path ([#597](https://github.com/mikro-orm/mikro-orm/issues/597)) ([3cdb5dd](https://github.com/mikro-orm/mikro-orm/commit/3cdb5ddab076c0d33008023c1a987e701c3b164f)) * **core:** add `RequestContext.createAsync()` for Koa ([ae3bc0f](https://github.com/mikro-orm/mikro-orm/commit/ae3bc0fa39404b879a215f575751fb591d40d01c)), closes [#709](https://github.com/mikro-orm/mikro-orm/issues/709) * **core:** allow date to be used as primary key ([#609](https://github.com/mikro-orm/mikro-orm/issues/609)) ([d421be8](https://github.com/mikro-orm/mikro-orm/commit/d421be8dc463d36b94687477c999289fe31c5e59)) * **core:** allow having same property name as entity name ([6b9d4cd](https://github.com/mikro-orm/mikro-orm/commit/6b9d4cd6f66769d49ad2b16a570a888c27859396)), closes [#655](https://github.com/mikro-orm/mikro-orm/issues/655) * **core:** allow hiding PKs in `toObject()` ([0a920dd](https://github.com/mikro-orm/mikro-orm/commit/0a920ddabfb98dc72061361d8630b9e64a16d8ea)), closes [#644](https://github.com/mikro-orm/mikro-orm/issues/644) * **core:** allow populating FK as PK in `toJSON()` ([e05d780](https://github.com/mikro-orm/mikro-orm/commit/e05d780e8d1cb5a6506aaf12f4c7faec559dbff6)) * **core:** do not cascade merge new entities ([2b0f208](https://github.com/mikro-orm/mikro-orm/commit/2b0f208b3915cde1f7135b26539f7e57da465a4f)) * **core:** do not lookup in identity map with non-PK conditions ([4fb0e52](https://github.com/mikro-orm/mikro-orm/commit/4fb0e52534fd065897e9da794ba39ad05dd3d5d8)), closes [#625](https://github.com/mikro-orm/mikro-orm/issues/625) * **core:** do not merge entity instances in `em.create()` ([50aaef8](https://github.com/mikro-orm/mikro-orm/commit/50aaef8ba2fb9d774c67f5568935b1f989bae625)) * **core:** fix `em.create()` with deeply nested data ([#683](https://github.com/mikro-orm/mikro-orm/issues/683)) ([a302473](https://github.com/mikro-orm/mikro-orm/commit/a302473164961e682c1d41ae27c9b5cc4d937204)), closes [#678](https://github.com/mikro-orm/mikro-orm/issues/678) * **core:** fix default value for `cache.enabled` ([9be725f](https://github.com/mikro-orm/mikro-orm/commit/9be725fa3906323d4bc9788f54eccf74109d632b)) * **core:** fix extracting PK out of reference wrapper ([db037dc](https://github.com/mikro-orm/mikro-orm/commit/db037dc23e3343486266ecb84347c9148bd3747e)), closes [#589](https://github.com/mikro-orm/mikro-orm/issues/589) * **core:** map values from returning clause via hydrator ([c5384b4](https://github.com/mikro-orm/mikro-orm/commit/c5384b4a61b8638d8a2b6aa9ffc3f1219930b83b)), closes [#725](https://github.com/mikro-orm/mikro-orm/issues/725) * **core:** mark all properties as populated for new entities ([5f7fb8f](https://github.com/mikro-orm/mikro-orm/commit/5f7fb8f0cf17b9325e7f282eb969eaa4f1f0141b)), closes [#784](https://github.com/mikro-orm/mikro-orm/issues/784) * **core:** reset collections when assigning to those not initialized ([e19a6b4](https://github.com/mikro-orm/mikro-orm/commit/e19a6b4b6b3b0ef12f1945d214794715f353dabd)) * **core:** support comments in tsconfig.json ([6506695](https://github.com/mikro-orm/mikro-orm/commit/6506695e1fe3e15ac4709bdb7eca46523c683ae6)), closes [#730](https://github.com/mikro-orm/mikro-orm/issues/730) * **core:** support nullable bigints ([3bb2a2d](https://github.com/mikro-orm/mikro-orm/commit/3bb2a2d46e647309d7167fdfbf1e5e9dbc25cc9e)), closes [#631](https://github.com/mikro-orm/mikro-orm/issues/631) * **core:** support self referencing with Reference wrapper ([fd1e158](https://github.com/mikro-orm/mikro-orm/commit/fd1e158d32ff4a911800d459f24246ad9409ee0d)), closes [#610](https://github.com/mikro-orm/mikro-orm/issues/610) * **core:** throw when trying to call `em.remove(..., null)` ([77c52dd](https://github.com/mikro-orm/mikro-orm/commit/77c52dd191c9d5bbcc0e668ba3ea045344516a8f)) * **mapping:** support mixed M :N with composite PK on one side only ([a951918](https://github.com/mikro-orm/mikro-orm/commit/a95191831ce4e406cbbf43cc6ee27b1eecd3c31d)) * **mariadb:** enable `bigNumberStrings` toggle ([ee90c64](https://github.com/mikro-orm/mikro-orm/commit/ee90c64120460bcc2fa3af0f55213166411ed54a)), closes [#578](https://github.com/mikro-orm/mikro-orm/issues/578) * **mongo:** add support for `$re` operator in mongo ([13fe6e5](https://github.com/mikro-orm/mikro-orm/commit/13fe6e5ce208fba6d7da23a2365b6e62bf5f88f8)), closes [#613](https://github.com/mikro-orm/mikro-orm/issues/613) * **postgres:** time column type should be a string ([#774](https://github.com/mikro-orm/mikro-orm/issues/774)) ([237ddbf](https://github.com/mikro-orm/mikro-orm/commit/237ddbf24efe76a0457b92848e23a82defd0912e)) * **query-builder:** make sure `$or` and `$and` combined works correctly ([c8d3a34](https://github.com/mikro-orm/mikro-orm/commit/c8d3a3495861e497921fa5108c58497428247511)), closes [#792](https://github.com/mikro-orm/mikro-orm/issues/792) * **query-builder:** make sure we use the right alias in complex `$and` queries ([522787e](https://github.com/mikro-orm/mikro-orm/commit/522787e6005555feece6e934f2badcb9a762fc35)), closes [#786](https://github.com/mikro-orm/mikro-orm/issues/786) * **query-builder:** use correct operators in complex and/or conditions ([#803](https://github.com/mikro-orm/mikro-orm/issues/803)) ([aca0e10](https://github.com/mikro-orm/mikro-orm/commit/aca0e1053f3ab811b7af289d8f6d9f95f65daf7e)) * **schema:** do not create indexes for each composite PK ([91b38cb](https://github.com/mikro-orm/mikro-orm/commit/91b38cb2a93007862496ec9e7a8fff4a399af1ca)), closes [#760](https://github.com/mikro-orm/mikro-orm/issues/760) * **postgres:** keep `bigint`/`numeric` types as string ([014f3b5](https://github.com/mikro-orm/mikro-orm/commit/014f3b5510d441b3cebbf511c679e77e661021d2)), closes [#324](https://github.com/mikro-orm/mikro-orm/issues/324) * **sql:** pivot joining of m :n when no target entity needed directly ([2b0bb72](https://github.com/mikro-orm/mikro-orm/commit/2b0bb72a5c2819de96008ccdd597787d4ccc0625)), closes [#549](https://github.com/mikro-orm/mikro-orm/issues/549) * **sql:** pivot joining of m :n when target entity is null ([3b05a59](https://github.com/mikro-orm/mikro-orm/commit/3b05a5918f490037b0c618e76b139dc8f57a1343)), closes [#548](https://github.com/mikro-orm/mikro-orm/issues/548) * **sql:** rework implicit m :n pivot joining ([7928c50](https://github.com/mikro-orm/mikro-orm/commit/7928c50a6f5a2fea9c593c3ef4d70a73942a6dba)) * **sql:** support composite keys in `EntityCaseNamingStrategy` ([8d07727](https://github.com/mikro-orm/mikro-orm/commit/8d077272e0d69b9eec52fd4efa8f29f7a0f01cfa)) * **sql:** use composite FKs instead in schema generator ([f5c2302](https://github.com/mikro-orm/mikro-orm/commit/f5c2302041bd52e7e746655dc70e38055a3a161c)) * **utils:** ts-node check now runs in a webpack environment ([#657](https://github.com/mikro-orm/mikro-orm/issues/657)) ([4384019](https://github.com/mikro-orm/mikro-orm/commit/438401935ce2a36e46cebaba7911b33d0cc11657)) ### Features[​](#features-100 "Direct link to Features") * **core:** add `driver.nativeInsertMany()` method ([#688](https://github.com/mikro-orm/mikro-orm/issues/688)) ([78b2341](https://github.com/mikro-orm/mikro-orm/commit/78b2341bb08214858d53c80594d47e7fe8d10edd)), closes [#442](https://github.com/mikro-orm/mikro-orm/issues/442) * **core:** add `em.begin/commit/rollback` methods ([#717](https://github.com/mikro-orm/mikro-orm/issues/717)) ([5414c52](https://github.com/mikro-orm/mikro-orm/commit/5414c5224cf018f5ac38aac9b56c42eb2b5df324)) * **core:** add `EntityRepositoryType` symbol ([#698](https://github.com/mikro-orm/mikro-orm/issues/698)) ([ffae0a8](https://github.com/mikro-orm/mikro-orm/commit/ffae0a827025060963bf7599f0ed8d17633eadd2)), closes [#696](https://github.com/mikro-orm/mikro-orm/issues/696) * **core:** add `expr` helper to allow custom expressions in EM API ([39ced1b](https://github.com/mikro-orm/mikro-orm/commit/39ced1b8e4f088e2806721247ac56349c15f1ef8)), closes [#802](https://github.com/mikro-orm/mikro-orm/issues/802) * **core:** add property serializers ([3d94b93](https://github.com/mikro-orm/mikro-orm/commit/3d94b936bc7d1ca2fe0b355c272c22413b6dcfd1)), closes [#809](https://github.com/mikro-orm/mikro-orm/issues/809) * **core:** add support for entity and property comment ([#668](https://github.com/mikro-orm/mikro-orm/issues/668)) ([c01b338](https://github.com/mikro-orm/mikro-orm/commit/c01b3386f8592fbbde204e02b38889ae3d80b0c0)) * **core:** add support for filters/scopes ([#663](https://github.com/mikro-orm/mikro-orm/issues/663)) ([c1025b9](https://github.com/mikro-orm/mikro-orm/commit/c1025b9de77d59f43e4786cbc56a792134bf8696)), closes [#385](https://github.com/mikro-orm/mikro-orm/issues/385) * **core:** add support for flush events ([#642](https://github.com/mikro-orm/mikro-orm/issues/642)) ([1f12aff](https://github.com/mikro-orm/mikro-orm/commit/1f12affaf532e86cb75abc66e7e04f1f2a5ac0c7)), closes [#637](https://github.com/mikro-orm/mikro-orm/issues/637) * **core:** add support for ordering by NULLS ([#677](https://github.com/mikro-orm/mikro-orm/issues/677)) ([74ee0cb](https://github.com/mikro-orm/mikro-orm/commit/74ee0cb1ccaac26fb4742d2ed6ae9f7c184ddf8c)), closes [#675](https://github.com/mikro-orm/mikro-orm/issues/675) * **core:** allow persisting 1 :m collections ([#686](https://github.com/mikro-orm/mikro-orm/issues/686)) ([379b289](https://github.com/mikro-orm/mikro-orm/commit/379b2891a1a71467db3ad0fb50ba328a09913a7b)), closes [#467](https://github.com/mikro-orm/mikro-orm/issues/467) * **core:** allow using `knex.raw` in query params ([e6b9f0e](https://github.com/mikro-orm/mikro-orm/commit/e6b9f0ef696b0c13693222cbb6a843930f525812)), closes [#802](https://github.com/mikro-orm/mikro-orm/issues/802) * **core:** allow using destructing assignments in entity ctors ([06a5490](https://github.com/mikro-orm/mikro-orm/commit/06a54908db89b9f438d8ce9308045a6c383b8120)), closes [#781](https://github.com/mikro-orm/mikro-orm/issues/781) * **core:** execute hooks via `EventManager` ([#623](https://github.com/mikro-orm/mikro-orm/issues/623)) ([6a7f627](https://github.com/mikro-orm/mikro-orm/commit/6a7f6278a955ad4ace6dc398487db25a7c58d70e)), closes [#622](https://github.com/mikro-orm/mikro-orm/issues/622) * **core:** expose populate parameter in `wrap(e).init()` ([d33432a](https://github.com/mikro-orm/mikro-orm/commit/d33432abdbf92060d4946f1a408f94eb51bfab87)), closes [#814](https://github.com/mikro-orm/mikro-orm/issues/814) * **core:** readonly entity ([#738](https://github.com/mikro-orm/mikro-orm/issues/738)) ([7581592](https://github.com/mikro-orm/mikro-orm/commit/7581592644ac2c3be2fc98fdc3eb89afc67112f2)) * **core:** refactor internal dependencies to support Yarn PnP ([#645](https://github.com/mikro-orm/mikro-orm/issues/645)) ([7e21bb8](https://github.com/mikro-orm/mikro-orm/commit/7e21bb8ac64c235083708a522fdca60d458aaeb6)) * **core:** refactor merging to allow querying by custom type ([#800](https://github.com/mikro-orm/mikro-orm/issues/800)) ([bfbc5f8](https://github.com/mikro-orm/mikro-orm/commit/bfbc5f8df4c6b541983dfefb75467be5dc3b8901)), closes [#739](https://github.com/mikro-orm/mikro-orm/issues/739) * **core:** support globs in `entities` ([#618](https://github.com/mikro-orm/mikro-orm/issues/618)) ([ee81b61](https://github.com/mikro-orm/mikro-orm/commit/ee81b618cc8dc53fc026be2533843f92a8353b3b)), closes [#605](https://github.com/mikro-orm/mikro-orm/issues/605) * **core:** type safe references ([#691](https://github.com/mikro-orm/mikro-orm/issues/691)) ([77d64ba](https://github.com/mikro-orm/mikro-orm/commit/77d64ba4a137b14dd665a1e1b7cc400cbb6aa399)), closes [#214](https://github.com/mikro-orm/mikro-orm/issues/214) * **core:** use custom errors for failHandler and metadata ([6db22af](https://github.com/mikro-orm/mikro-orm/commit/6db22af044aa1181050675ff04184ccb37d38bb5)), closes [#611](https://github.com/mikro-orm/mikro-orm/issues/611) * **migrations:** add `Migration.execute()` method ([5c1f60a](https://github.com/mikro-orm/mikro-orm/commit/5c1f60aeeb128c2dfedfa08cc9b98d05c1582434)), closes [#770](https://github.com/mikro-orm/mikro-orm/issues/770) * **migrations:** add support for initial migrations ([#818](https://github.com/mikro-orm/mikro-orm/issues/818)) ([26b2228](https://github.com/mikro-orm/mikro-orm/commit/26b2228740b1b47a73e3e037f210ebe0b64fefd9)), closes [#772](https://github.com/mikro-orm/mikro-orm/issues/772) * **migrations:** allow specifying list of migrations ([#741](https://github.com/mikro-orm/mikro-orm/issues/741)) ([5a0f2a6](https://github.com/mikro-orm/mikro-orm/commit/5a0f2a6caebff1d40b47fcb49adb15d87413b4b8)), closes [#705](https://github.com/mikro-orm/mikro-orm/issues/705) * **migrations:** allow using knex in migrations ([fc2fbaa](https://github.com/mikro-orm/mikro-orm/commit/fc2fbaac425ec608b0108c3128d23f9115707f99)), closes [#799](https://github.com/mikro-orm/mikro-orm/issues/799) * **postgres:** add `$ilike`, `$overlap`, `$contains`, `$contained` ([3c59885](https://github.com/mikro-orm/mikro-orm/commit/3c59885a7bf8fc87f69f9bbb2c46012094b08f70)), closes [#641](https://github.com/mikro-orm/mikro-orm/issues/641) * **query-builder:** allow ordering by custom expressions ([e4674c7](https://github.com/mikro-orm/mikro-orm/commit/e4674c7cfed8642d10e80ef75afed32b006f7faa)), closes [#707](https://github.com/mikro-orm/mikro-orm/issues/707) * **query-builder:** make sure we do not prefix virtual props ([fd0766c](https://github.com/mikro-orm/mikro-orm/commit/fd0766c0b202f27c3379f7bbfc5322cd648cbfc6)), closes [#734](https://github.com/mikro-orm/mikro-orm/issues/734) * **cli:** allow the use of TS path mapping ([#554](https://github.com/mikro-orm/mikro-orm/issues/554)) ([2444192](https://github.com/mikro-orm/mikro-orm/commit/2444192907374e984ff972e5754df667860da3f5)) * **core:** accept references in collection `add/remove/set` methods ([26d132f](https://github.com/mikro-orm/mikro-orm/commit/26d132faa9ec7cfea5e7dd0bf2585bd90bb56d59)) * **core:** add `connect: boolean` param to `MikroORM.init()` ([43a9ce9](https://github.com/mikro-orm/mikro-orm/commit/43a9ce9c108945b1b48677919113e4a2c1c3886e)) * **core:** add `having` to `FindOptions` ([952fd2f](https://github.com/mikro-orm/mikro-orm/commit/952fd2fe7ba619a0906133694e4888f57ad8cecc)) * **core:** add custom types for array, blob and json ([#559](https://github.com/mikro-orm/mikro-orm/issues/559)) ([7703cc5](https://github.com/mikro-orm/mikro-orm/commit/7703cc5fa5fa88fce8b589d0a51c8601211cc9f5)), closes [#476](https://github.com/mikro-orm/mikro-orm/issues/476) * **core:** add pagination support (`QueryFlag.PAGINATE`) ([#544](https://github.com/mikro-orm/mikro-orm/issues/544)) ([d43241e](https://github.com/mikro-orm/mikro-orm/commit/d43241e4c5d36c38b3698bd586462d1d1c6126c7)) * **core:** add support for alternative loading strategies ([#556](https://github.com/mikro-orm/mikro-orm/issues/556)) ([0b89d4a](https://github.com/mikro-orm/mikro-orm/commit/0b89d4af61e3baf9d6be0b8ab1c16be7d337b8a5)), closes [#440](https://github.com/mikro-orm/mikro-orm/issues/440) * **core:** add support for event subscribers ([#614](https://github.com/mikro-orm/mikro-orm/issues/614)) ([1281356](https://github.com/mikro-orm/mikro-orm/commit/1281356e94bcd93f3bb265bca784a0a25bd70cb5)), closes [#516](https://github.com/mikro-orm/mikro-orm/issues/516) * **core:** add support for lazy scalar properties ([#585](https://github.com/mikro-orm/mikro-orm/issues/585)) ([cd8c683](https://github.com/mikro-orm/mikro-orm/commit/cd8c6833964d3cddf5b8d645a65839ee98bd1e8c)), closes [#427](https://github.com/mikro-orm/mikro-orm/issues/427) * **core:** add support for Node.js 14 ([#522](https://github.com/mikro-orm/mikro-orm/issues/522)) ([2093af8](https://github.com/mikro-orm/mikro-orm/commit/2093af80e9973b998477cb67a235060e417cb8cd)) * **core:** add support for single table inheritance ([#503](https://github.com/mikro-orm/mikro-orm/issues/503)) ([8c45339](https://github.com/mikro-orm/mikro-orm/commit/8c453390457df6d915d11dcaaf26b83f6f549254)), closes [#33](https://github.com/mikro-orm/mikro-orm/issues/33) * **core:** allow adding items to not initialized collections ([#489](https://github.com/mikro-orm/mikro-orm/issues/489)) ([8be8a4d](https://github.com/mikro-orm/mikro-orm/commit/8be8a4d5664005c137e1293c7907aa233e874324)) * **core:** allow adding items to not initialized collections ([#489](https://github.com/mikro-orm/mikro-orm/issues/489)) ([ca5eb64](https://github.com/mikro-orm/mikro-orm/commit/ca5eb64e16138a8f9cb5f72d69c4da165c8d2a13)) * **core:** do not cache metadata for other than ts-morph provider ([#569](https://github.com/mikro-orm/mikro-orm/issues/569)) ([49fb4eb](https://github.com/mikro-orm/mikro-orm/commit/49fb4eb42e72d73efe42532283359bb3a351f635)) * **core:** pass entity as parameter in `onCreate` and `onUpdate` ([#564](https://github.com/mikro-orm/mikro-orm/issues/564)) ([3044a19](https://github.com/mikro-orm/mikro-orm/commit/3044a1919607ee4e27fe0fc57135e9cc1b919ff0)) * **core:** split project into multiple packages ([#475](https://github.com/mikro-orm/mikro-orm/issues/475)) ([636e861](https://github.com/mikro-orm/mikro-orm/commit/636e8610573bd0f0c69da6331d048213794114e3)) * **core:** use custom exceptions for driver related errors ([#539](https://github.com/mikro-orm/mikro-orm/issues/539)) ([2c30679](https://github.com/mikro-orm/mikro-orm/commit/2c30679dffcfa195f6d88f885885b975c3b6dfdf)) * **discovery:** use both entity name and path as key in Metadat… ([#488](https://github.com/mikro-orm/mikro-orm/issues/488)) ([72f0aca](https://github.com/mikro-orm/mikro-orm/commit/72f0acaac2b6451b319af3f00bbcc7721ad89821)) * **mapping:** add support for embeddables ([#514](https://github.com/mikro-orm/mikro-orm/issues/514)) ([0fa06b1](https://github.com/mikro-orm/mikro-orm/commit/0fa06b1490894b395de1987fa414a7ac00f97307)) * **migrations:** support custom migration names ([8ea71b6](https://github.com/mikro-orm/mikro-orm/commit/8ea71b6e53d3683f695646ce2813d8285e5a3687)), closes [#449](https://github.com/mikro-orm/mikro-orm/issues/449) * **mongo:** add `getCollection()` method to `MongoEntityManager` ([79a9a7d](https://github.com/mikro-orm/mikro-orm/commit/79a9a7d2e83afc74ff1e3b0abdf41124134e542f)) * **mongo:** allow creating any kind of index in mongo ([8fbe48a](https://github.com/mikro-orm/mikro-orm/commit/8fbe48a8485595fbb3363a5c2e8725be9bc23957)) * **mongo:** allow using different primary key types than ObjectId ([#568](https://github.com/mikro-orm/mikro-orm/issues/568)) ([e523794](https://github.com/mikro-orm/mikro-orm/commit/e523794126ffec7b541bc3bf79d02d26f5afcc9e)), closes [#349](https://github.com/mikro-orm/mikro-orm/issues/349) * **postgres:** use `jsonb` column type by default ([b6c0578](https://github.com/mikro-orm/mikro-orm/commit/b6c057800234531d1ee8323d31d3649a7abd4853)) * **sql:** add `execute()` method to `SqlEntityManager` ([e389d40](https://github.com/mikro-orm/mikro-orm/commit/e389d4015c580ec3cdc81836ae910899aa901552)) * **sql:** add `groupBy` to `FindOptions` ([2f6687a](https://github.com/mikro-orm/mikro-orm/commit/2f6687ababadde684f9ca1e6dfb2912bd658a95e)) * **sql:** add `qb.raw()` to allow using raw snippets in QB ([c09a5b6](https://github.com/mikro-orm/mikro-orm/commit/c09a5b661d4b06c94017a78acce1ccee8479417e)), closes [#598](https://github.com/mikro-orm/mikro-orm/issues/598) * **sql:** add support for computed properties via `@Formula()` ([#553](https://github.com/mikro-orm/mikro-orm/issues/553)) ([68b9336](https://github.com/mikro-orm/mikro-orm/commit/68b9336aed3f098dea9c91fc3a060fb87449f0e0)) * **sql:** add support for sub-queries ([#525](https://github.com/mikro-orm/mikro-orm/issues/525)) ([e07f8ad](https://github.com/mikro-orm/mikro-orm/commit/e07f8ad2d474a3fe3d0084e1b24750d3bd2d5b0a)) * **sql:** allow delete queries with auto-joining via sub-queries ([#538](https://github.com/mikro-orm/mikro-orm/issues/538)) ([e44bc56](https://github.com/mikro-orm/mikro-orm/commit/e44bc56997fef12bd2d5f4e849e931694b1dc5d0)), closes [#492](https://github.com/mikro-orm/mikro-orm/issues/492) * **sql:** allow update queries with auto-joining via sub-queries ([#537](https://github.com/mikro-orm/mikro-orm/issues/537)) ([cff9a3a](https://github.com/mikro-orm/mikro-orm/commit/cff9a3a1e758856a43fb188c5a5cb2e511f532dc)), closes [#319](https://github.com/mikro-orm/mikro-orm/issues/319) * **sql:** ensure correct table order in schema generator ([#617](https://github.com/mikro-orm/mikro-orm/issues/617)) ([b3949cf](https://github.com/mikro-orm/mikro-orm/commit/b3949cf06c413cebbda4dabc5fdb91952b35bb36)) * **sql:** initialize query builder in select mode ([#565](https://github.com/mikro-orm/mikro-orm/issues/565)) ([3e3abe7](https://github.com/mikro-orm/mikro-orm/commit/3e3abe7eb2d76711dd7fe0490f4557ea0fa1fbf2)) * **ts-morph:** add ORM version to cache invalidation logic ([f28119a](https://github.com/mikro-orm/mikro-orm/commit/f28119a8271c3037053924d39816d74880687865)) * **ts-morph:** infer nullability from property types ([4c45e00](https://github.com/mikro-orm/mikro-orm/commit/4c45e00373b2110896660ffc24f37cf8f6b28f82)) * **ts-morph:** use `.d.ts` files for ts-morph discovery ([#616](https://github.com/mikro-orm/mikro-orm/issues/616)) ([54ce064](https://github.com/mikro-orm/mikro-orm/commit/54ce064a7c9d90432d1eaeca3619abd252da345c)) ### Performance Improvements[​](#performance-improvements-37 "Direct link to Performance Improvements") * **cli:** transpile only when using ts-node in CLI ([f739f39](https://github.com/mikro-orm/mikro-orm/commit/f739f397affa89b3bfed7ff5aad14246f79ebb60)) * **core:** do not generate sql when logging disabled ([f232bb3](https://github.com/mikro-orm/mikro-orm/commit/f232bb32c35880a716571dc12c4162e0b963b436)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** implement bulk deletes ([#757](https://github.com/mikro-orm/mikro-orm/issues/757)) ([d83f648](https://github.com/mikro-orm/mikro-orm/commit/d83f648f2c0bb45667de737ca34a34ea292100b1)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** improve performance of QB a bit ([efc044f](https://github.com/mikro-orm/mikro-orm/commit/efc044fe2ca69d5cadb9579adaf1f34d57762605)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** improve speed of inserting new items ([bfeb2e3](https://github.com/mikro-orm/mikro-orm/commit/bfeb2e3ed80e546c4e4b96f768881ca931351201)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** optimize QB for simple cases ([99cfca7](https://github.com/mikro-orm/mikro-orm/commit/99cfca7f53ce7247cd32d5aea027b66a7a2ae5d5)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** reduce usage of `wrap` helper internally ([66ffc3b](https://github.com/mikro-orm/mikro-orm/commit/66ffc3be4e0a6ac02657131d8d81c2188c3389fb)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** simplify `MetadataStorage.find()` method ([9abbe03](https://github.com/mikro-orm/mikro-orm/commit/9abbe03b957e48dfb80ebf61c4268149bab3f72c)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use actual Map for identity maps ([3645a20](https://github.com/mikro-orm/mikro-orm/commit/3645a200afc064160d696288aa33a212d51da456)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use `Set` instead of array for cycle lookups ([dff0c9d](https://github.com/mikro-orm/mikro-orm/commit/dff0c9dc43baf13ca79fa0b30a044a91257996d6)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) * **core:** use `Set` instead of array for stacks in UoW ([12ba811](https://github.com/mikro-orm/mikro-orm/commit/12ba8111d1e0a282fcb2bc5c0d3f2dd5ab2fa532)), closes [#732](https://github.com/mikro-orm/mikro-orm/issues/732) ### BREAKING CHANGES[​](#breaking-changes-2 "Direct link to BREAKING CHANGES") Please see the [upgrading guide](https://mikro-orm.io/docs/upgrading-v3-to-v4). --- # Source: https://mikro-orm.io/api/cli.md # @mikro-orm/cli --- # Source: https://mikro-orm.io/docs/collections.md # Collections `OneToMany` and `ManyToMany` properties are stored in a `Collection` wrapper. ## Working with collections[​](#working-with-collections "Direct link to Working with collections") The `Collection` class implements iterator, so we can use `for of` loop to iterate through it. Another way to access collection items is to use bracket syntax like when we access array items. Keep in mind that this approach will not check if the collection is initialized, while using `get` method will throw error in this case. > Note that array access in `Collection` is available only for reading already loaded items, we cannot add new items to `Collection` this way. To get all entities stored in a `Collection`, we can use `getItems()` method. It will throw in case the `Collection` is not initialized. If we want to disable this validation, we can use `getItems(false)`. This will give us the entity instances managed by the identity map. Alternatively we can use `toArray()` which will serialize the `Collection` to an array of DTOs. Modifying those will have no effect on the actual entity instances. ``` const author = em.findOne(Author, '...', { populate: ['books'] }); // populating books collection // Or we could lazy load books collection later via `load()` method. // Unlike `init()` it will check the state and do nothing if the collection is already initialized. // await author.books.load(); for (const book of author.books) { console.log(book.title); // initialized console.log(book.author.isInitialized()); // true console.log(book.author.id); console.log(book.author.name); // Jon Snow console.log(book.publisher); // just reference console.log(book.publisher.isInitialized()); // false console.log(book.publisher.id); console.log(book.publisher.name); // undefined } // collection needs to be initialized before we can work with it author.books.add(book); console.log(author.books.contains(book)); // true console.log(author.books.exists(item => item === book)); // true console.log(author.books.find(item => item === book)); // book console.log(author.books.map(item => item.title)); // array of book titles console.log(author.books.filter(item => item.title.startsWith('Foo'))); // array of books matching the callback author.books.remove(book); console.log(author.books.contains(book)); // false author.books.add(book); console.log(author.books.count()); // 1 console.log(author.books.slice(0, 1)); // Book[] console.log(author.books.slice()); // Book[] console.log(author.books.slice().length); // 1 author.books.removeAll(); console.log(author.books.isEmpty()); // true console.log(author.books.contains(book)); // false console.log(author.books.count()); // 0 console.log(author.books.getItems()); // Book[] console.log(author.books.getIdentifiers()); // array of string | number console.log(author.books.getIdentifiers('_id')); // array of ObjectId // array access works as well console.log(author.books[1]); // Book console.log(author.books[12345]); // undefined, even if the collection is not initialized // getting array of the items console.log(author.books.getItems()); // Book[] // serializing the collection console.log(author.books.toArray()); // EntityDTO[] const author = em.findOne(Author, '...'); // books collection has not been populated const count = await author.books.loadCount(); // gets the count of collection items from database instead of counting loaded items console.log(author.books.getItems()); // throws because the collection has not been initialized // initialize collection if not already loaded and return its items as array console.log(await author.books.loadItems()); // Book[] ``` ### Removing items from collection[​](#removing-items-from-collection "Direct link to Removing items from collection") Removing items from a collection does not necessarily imply deleting the target entity, it means we are disconnecting the relation - removing items from collection, not removing entities from database - `Collection.remove()` is not the same as `em.remove()`. When you use `em.assign()` to update entities you can also remove/disconnect entities from a collection, they do not get automatically removed from the database. If we want to delete the entity by removing it from collection, we need to enable `orphanRemoval: true`, which tells the ORM we don't want orphaned entities to exist, so we know those should be removed. Also check the documentation on [Orphan Removal](https://mikro-orm.io/docs/cascading.md#orphan-removal) ## OneToMany Collections[​](#onetomany-collections "Direct link to OneToMany Collections") `OneToMany` collections are inverse side of `ManyToOne` references, to which they need to point via `fk` attribute: ``` @Entity() export class Book { @PrimaryKey() _id!: ObjectId; @ManyToOne() author!: Author; } @Entity() export class Author { @PrimaryKey() _id!: ObjectId; @OneToMany(() => Book, book => book.author) books1 = new Collection(this); // or via options object @OneToMany({ entity: () => Book, mappedBy: 'author' }) books2 = new Collection(this); } ``` ## ManyToMany Collections[​](#manytomany-collections "Direct link to ManyToMany Collections") For ManyToMany, SQL drivers use pivot table that holds reference to both entities. As opposed to them, with MongoDB we do not need to have join tables for `ManyToMany` relations. All references are stored as an array of `ObjectId`s on owning entity. ### Unidirectional[​](#unidirectional "Direct link to Unidirectional") Unidirectional `ManyToMany` relations are defined only on one side, if we define only `entity` attribute, then it will be considered the owning side: ``` @ManyToMany(() => Book) books1 = new Collection(this); // or mark it as owner explicitly via options object @ManyToMany({ entity: () => Book, owner: true }) books2 = new Collection(this); ``` ### Bidirectional[​](#bidirectional "Direct link to Bidirectional") Bidirectional `ManyToMany` relations are defined on both sides, while one is owning side (where references are store), marked by `inversedBy` attribute pointing to the inverse side: ``` @ManyToMany(() => BookTag, tag => tag.books, { owner: true }) tags = new Collection(this); // or via options object @ManyToMany({ entity: () => BookTag, inversedBy: 'books' }) tags = new Collection(this); ``` And on the inversed side we define it with `mappedBy` attribute pointing back to the owner: ``` @ManyToMany(() => Book, book => book.tags) books = new Collection(this); // or via options object @ManyToMany({ entity: () => Book, mappedBy: 'tags' }) books = new Collection(this); ``` ### Custom pivot table entity[​](#custom-pivot-table-entity "Direct link to Custom pivot table entity") By default, a generated pivot table entity is used under the hood to represent the pivot table. Since v5.1 we can provide our own implementation via `pivotEntity` option. The pivot table entity needs to have exactly two many-to-one properties, where first one needs to point to the owning entity and the second to the target entity of the many-to-many relation. ``` @Entity() export class Order { @ManyToMany({ entity: () => Product, pivotEntity: () => OrderItem }) products = new Collection(this); } ``` For bidirectional M:N relations, it is enough to specify the `pivotEntity` option only on the owning side. We still need to link the sides via `inversedBy` or `mappedBy` option. ``` @Entity() export class Product { @ManyToMany({ entity: () => Order, mappedBy: o => o.products }) orders = new Collection(this); } ``` If we want to add new items to such M:N collection, we need to have all non-FK properties to define a database level default value. ``` @Entity() export class OrderItem { @ManyToOne({ primary: true }) order: Order; @ManyToOne({ primary: true }) product: Product; @Property({ default: 1 }) amount!: number; } ``` Alternatively, we can work with the pivot entity directly: ``` // create new item const item = em.create(OrderItem, { order: 123, product: 321, amount: 999, }); await em.persist(item).flush(); // or remove an item via delete query const em.nativeDelete(OrderItem, { order: 123, product: 321 }); ``` We can as well define the 1:m properties targeting the pivot entity as in the previous example, and use that for modifying the collection, while using the M:N property for easier reading and filtering purposes. ### Forcing fixed order of collection items[​](#forcing-fixed-order-of-collection-items "Direct link to Forcing fixed order of collection items") > Since v3 many to many collections does not require having auto increment primary key, that was used to ensure fixed order of collection items. To preserve fixed order of collections, we can use `fixedOrder: true` attribute, which will start ordering by `id` column. Schema generator will convert the pivot table to have auto increment primary key `id`. We can also change the order column name via `fixedOrderColumn: 'order'`. We can also specify default ordering via `orderBy: { ... }` attribute. This will be used when we fully populate the collection including its items, as it orders by the referenced entity properties instead of pivot table columns (which `fixedOrderColumn` is). On the other hand, `fixedOrder` is used to maintain the insert order of items instead of ordering by some property. ## Populating references[​](#populating-references "Direct link to Populating references") Sometimes we might want to know only what items are part of a collection, and we don't care about the values of those items. For this, we can populate the collection only with references: ``` const book1 = await em.findOne(Book, 1, { populate: ['tags:ref'] }); console.log(book1.tags.isInitialized()); // true console.log(wrap(book1.tags[0]).isInitialized()); // false // or alternatively use `init({ ref: true })` const book2 = await em.findOne(Book, 1); await book2.tags.init({ ref: true }); console.log(book2.tags.isInitialized()); // true console.log(wrap(book2.tags[0]).isInitialized()); // false ``` ## Propagation of Collection's add() and remove() operations[​](#propagation-of-collections-add-and-remove-operations "Direct link to Propagation of Collection's add() and remove() operations") When we use one of `Collection.add()` method, the item is added to given collection, and this action is also propagated to its counterpart. ``` // one to many const author = new Author(...); const book = new Book(...); author.books.add(book); console.log(book.author); // author will be set thanks to the propagation ``` For M:N this works in both ways, either from owning side, or from inverse side. ``` // many to many works both from owning side and from inverse side const book = new Book(...); const tag = new BookTag(...); book.tags.add(tag); console.log(tag.books.contains(book)); // true tag.books.add(book); console.log(book.tags.contains(tag)); // true ``` > Since v5.2.2 propagation of adding new items to inverse side M:N relation also works if the owning collection is not initialized. For propagation of remove operation, both sides still have to be initialized. > Although this propagation works also for M:N inverse side, we should always use owning side to manipulate the collection. Same applies for `Collection.remove()`. ## Filtering and ordering of collection items[​](#filtering-and-ordering-of-collection-items "Direct link to Filtering and ordering of collection items") When initializing collection items via `collection.init()`, you can filter the collection as well as order its items: ``` await book.tags.init({ where: { active: true }, orderBy: { name: QueryOrder.DESC }, }); ``` > You should never modify partially loaded collections. ## Declarative partial loading[​](#declarative-partial-loading "Direct link to Declarative partial loading") Collections can also represent only a subset of the target entities: ``` @Entity() class Author { @OneToMany(() => Book, b => b.author) books = new Collection(this); @OneToMany(() => Book, b => b.author, { where: { favorite: true } }) favoriteBooks = new Collection(this); } ``` This works also for M:N relations. Note that if you want to declare more relations mapping to the same pivot table, you need to explicitly specify its name (or use the same pivot entity): ``` @Entity() class Book { @ManyToMany(() => BookTag) tags = new Collection(this); @ManyToMany({ entity: () => BookTag, pivotTable: 'book_tags', where: { popular: true }, }) popularTags = new Collection(this); } ``` ## Filtering Collections[​](#filtering-collections "Direct link to Filtering Collections") Collections have a `matching` method that allows to slice parts of data from a collection. By default, it will return the list of entities based on the query. We can use the `store` boolean parameter to save this list into the collection items - this will mark the collection as `readonly`, methods like `add` or `remove` will throw. ``` const a = await em.findOneOrFail(Author, 1); // only loading the list of items const books = await a.books.matching({ limit: 3, offset: 10, orderBy: { title: 'asc' } }); console.log(books); // [Book, Book, Book] console.log(a.books.isInitialized()); // false // storing the items in collection const tags = await books[0].tags.matching({ limit: 3, offset: 5, orderBy: { name: 'asc' }, store: true, }); console.log(tags); // [BookTag, BookTag, BookTag] console.log(books[0].tags.isInitialized()); // true console.log(books[0].tags.getItems()); // [BookTag, BookTag, BookTag] ``` ## Mapping Collection items[​](#mapping-collection-items "Direct link to Mapping Collection items") The `Collection` class offers several handy helper methods to filter, map, or convert the collection items. ### `indexBy`[​](#indexby "Direct link to indexby") When you want to convert the collection to a simple key-value dictionary, use the `indexBy()` method: ``` // given `user.settings` is `Collection

; user: EntityRepository; tag: EntityRepository; } let cache: Services; export async function initORM(options?: Options): Promise { if (cache) { return cache; } const orm = await MikroORM.init(options); // save to cache before returning return cache = { orm, em: orm.em, article: orm.em.getRepository(Article), user: orm.em.getRepository(User), tag: orm.em.getRepository(Tag), }; } ``` And use it in the `app.ts` file instead of initializing the ORM directly: app.ts ``` import { RequestContext } from '@mikro-orm/core'; import { fastify } from 'fastify'; import { initORM } from './db.js'; export async function bootstrap(port = 3001) { const db = await initORM(); const app = fastify(); // register request context hook app.addHook('onRequest', (request, reply, done) => { RequestContext.create(db.em, done); }); // shut down the connection when closing the app app.addHook('onClose', async () => { await db.orm.close(); }); // register routes here app.get('/article', async request => { const { limit, offset } = request.query as { limit?: number; offset?: number }; const [items, total] = await db.article.findAndCount({}, { limit, offset, }); return { items, total }; }); const url = await app.listen({ port }); return { app, url }; } ``` Importing `EntityManager` and `EntityRepository` from driver package While [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md) and [`EntityRepository`](https://mikro-orm.io/api/core/class/EntityRepository.md) classes are provided by the `@mikro-orm/core` package, those are only the base - driver agnostic - implementations. One example of what that means is the `QueryBuilder` - as an SQL concept, it has no place in the `@mikro-orm/core` package, instead, an extension of the [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md) called `SqlEntityManager` is provided by the SQL driver packages (it is defined in `@mikro-orm/knex` package and reexported in every SQL driver packages that depend on it). This `SqlEntityManager` class provides the additional SQL related methods, like `em.createQueryBuilder()`. For convenience, the `SqlEntityManager` class is also reexported under [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md) alias. This means we can do `import { EntityManager } from '@mikro-orm/sqlite'` to access it. Under the hood, MikroORM will always use this driver-specific [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md) implementation (you can verify that by `console.log(orm.em)`, it will be an instance of `SqlEntityManager`), but for TypeScript to understand it, you will need to use the driver package to import it. The same applies to the [`EntityRepository`](https://mikro-orm.io/api/core/class/EntityRepository.md) and `SqlEntityRepository` classes. ``` import { EntityManager, EntityRepository } from '@mikro-orm/sqlite'; // or any other driver package ``` You can also use `MikroORM`, `defineConfig` and `Options` exported from the driver package, it works similarly, providing the driver type without the need to use generics. ### What is `EntityRepository`[​](#what-is-entityrepository "Direct link to what-is-entityrepository") Entity repositories are thin layers on top of [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md). They act as an extension point, so you can add custom methods, or even alter the existing ones. The default [`EntityRepository`](https://mikro-orm.io/api/core/class/EntityRepository.md) implementation just forwards the calls to the underlying [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md) instance. [`EntityRepository`](https://mikro-orm.io/api/core/class/EntityRepository.md) class carries the entity type, so we do not have to pass it to every `find` or `findOne` calls. Note that there is no such thing as "flushing a repository" - it is just a shortcut to [`em.flush()`](https://mikro-orm.io/api/core/class/EntityManager.md#flush). In other words, we always flush the whole Unit of Work, not just a single entity that this repository represents. ## Testing the endpoint[​](#testing-the-endpoint "Direct link to Testing the endpoint") The first endpoint is ready, let's test it. You already have `vitest` installed and available via `npm test`, now add a test case. Put it into the `test` folder and name the file with `.test.ts` extension so `vitest` knows it is a test file. So how should you test the endpoint? Fastify offers an easy way to test endpoints via `app.inject()`, all you need to do is to create the fastify app instance inside the test case (you already have the `bootstrap` method for that). But that would be testing against your production database, you don't want that! Let's create one more utility file before we get to the first test, and put it into the `test` folder too, but without the `.test.ts` suffix - let's call it `utils.ts`. We will define a function called `initTestApp` that initializes the ORM with overridden options for testing, create the schema and bootstrap our fastify app, all in one go. It will take the `port` number as a parameter, again to allow easy parallel runs when testing - every test case will have its own in-memory database and a fastify app running on its own port. utils.ts ``` import { bootstrap } from '../src/app.js'; import { initORM } from '../src/db.js'; import config from '../src/mikro-orm.config.js'; export async function initTestApp(port: number) { // this will create all the ORM services and cache them const { orm } = await initORM({ // first, include the main config ...config, // no need for debug information, it would only pollute the logs debug: false, // we will use in-memory database, this way we can easily parallelize our tests dbName: ':memory:', // this will ensure the ORM discovers TS entities, with ts-node, ts-jest and vitest // it will be inferred automatically, but we are using vitest here // preferTs: true, }); // create the schema so we can use the database await orm.schema.createSchema(); const { app } = await bootstrap(port); return app; } ``` And now the test case, finally. Currently, there is no data as we are using an empty in-memory database, fresh for each test run, so the article listing endpoint will return just an empty array - we will handle that in a moment. > Notice that we are using `beforeAll` hook to initialize the app and `afterAll` to tear it down - the `app.close()` will result in the `onClose` hook that calls `orm.close()`. Without that, the process would hang. article.test.ts ``` import { afterAll, beforeAll, expect, test } from 'vitest'; import { FastifyInstance } from 'fastify'; import { initTestApp } from './utils.js'; let app: FastifyInstance; beforeAll(async () => { // we use different ports to allow parallel testing app = await initTestApp(30001); }); afterAll(async () => { // we close only the fastify app - it will close the database connection via onClose hook automatically await app.close(); }); test('list all articles', async () => { // mimic the http request via `app.inject()` const res = await app.inject({ method: 'get', url: '/article', }); // assert it was successful response expect(res.statusCode).toBe(200); // with expected shape expect(res.json()).toMatchObject({ items: [], total: 0, }); }); ``` Now run `npm test` - but wait, something is broken again: ``` FAIL test/article.test.ts [ test/article.test.ts ] TypeError: Unknown file extension ".ts" for /blog-api/src/modules/article/article.entity.ts ``` So the dynamic import of our entities fails to resolve TypeScript files. This is one of the gotchas of ECMAScript modules we mentioned earlier. And luckily, we have a workaround for it! Vitest automatically adds TypeScript support to `import` calls from the context of your test - the problem is that MikroORM does such calls from inside its CommonJS codebase, so vitest is not able to detect it. What we can do instead is to override the `dynamicImportProvider`, a config option used for the actual importing - by the way, you could register any kind of transpiler like this. All we need to do is to use an `import` call defined inside the context of our ESM application (not necessarily inside the test), let's add it to our ORM config: mikro-orm.config.ts ``` // for vitest to get around `TypeError: Unknown file extension ".ts"` (ERR_UNKNOWN_FILE_EXTENSION) dynamicImportProvider: id => import(id), ``` Run `npm test` again, you should be good to go: ``` ✓ test/article.test.ts (1) Test Files 1 passed (1) Tests 1 passed (1) Start at 15:56:41 Duration 876ms (transform 264ms, setup 0ms, collect 300ms, tests 147ms) PASS Waiting for file changes... press h to show help, press q to quit ``` ### Note about unit tests[​](#note-about-unit-tests "Direct link to Note about unit tests") It might be tempting to skip the `MikroORM.init()` phase in some of your unit tests that do not require database connection, but the `init` method is **doing more** than just establishing that. The most important part of that method is metadata discovery, where the ORM checks all the entity definitions and sets up the default values for various metadata options (mainly for naming strategy and bidirectional relations). The discovery phase is **required for [propagation](https://mikro-orm.io/docs/propagation.md) to work**. But worry not, you can initialize the ORM without connecting to the database, just provide `connect: false` to the ORM config: ``` const orm = await MikroORM.init({ // ... connect: false, }); ``` Since v6, you can also use the new `initSync()` method to instantiate the ORM synchronously. This will run the discovery only, and skip the database connection. When you first try to query the database (or work with it in any way that requires the connection), the ORM will connect to it lazily. > The sync method never connects to the database, so `connect: false` is implicit. ``` const orm = MikroORM.initSync({ // ... }); ``` ## Seeding the database[​](#seeding-the-database "Direct link to Seeding the database") There are many ways how to go about seeding your testing database. The obvious way is to do it directly in your test, for example in the `beforeAll` hook, right after you initialize the ORM. One alternative to that is using the Seeder, an ORM package (available via `@mikro-orm/seeder`), which offers utilities to populate our database with (not necessarily) fake data. > We will be using Seeder for populating the test database with fake data, but it is a valid approach to have a seeder that creates initial data for a production database too - we could create the default set of article tags this way, or the initial admin user. You can set up a hierarchy of seeders or call them one by one. Let's install the seeder package and use the CLI to generate our test seeder: * npm * Yarn * pnpm * Bun ``` npm install @mikro-orm/seeder ``` ``` yarn add @mikro-orm/seeder ``` ``` pnpm add @mikro-orm/seeder ``` ``` bun add @mikro-orm/seeder ``` Next step will be to register the SeedManager extension in your ORM config, this will make it available via `orm.seeder` property: ``` import { defineConfig } from '@mikro-orm/sqlite'; import { SeedManager } from '@mikro-orm/seeder'; export default defineConfig({ // ... extensions: [SeedManager], }); ``` > Other extensions you can use are `SchemaGenerator`, `Migrator` and `EntityGenerator`. The `SchemaGenerator` (as well as `MongoSchemaGenerator`) is registered automatically as it does not require any 3rd party dependencies to be installed. Now let's try to create a new seeder named `test`: ``` npx mikro-orm-esm seeder:create test ``` This will create `src/seeders` directory and a `TestSeeder.ts` file inside it, with a skeleton of your new seeder: TestSeeder.ts ``` import type { EntityManager } from '@mikro-orm/core'; import { Seeder } from '@mikro-orm/seeder'; export class TestSeeder extends Seeder { async run(em: EntityManager): Promise {} } ``` We can use the [`em.create()`](https://mikro-orm.io/api/core/class/EntityManager.md#create) function we described earlier. It effectively calls `em.persist(entity)` before it returns the created entity, so you don't even need to do anything with the entity itself, calling [`em.create()`](https://mikro-orm.io/api/core/class/EntityManager.md#create) on its own will be enough. Time to test it! TestSeeder.ts ``` export class TestSeeder extends Seeder { async run(em: EntityManager): Promise { em.create(User, { fullName: 'Foo Bar', email: 'foo@bar.com', password: 'password123', articles: [ { title: 'title 1/3', description: 'desc 1/3', text: 'text text text 1/3', tags: [{ id: 1, name: 'foo1' }, { id: 2, name: 'foo2' }], }, { title: 'title 2/3', description: 'desc 2/3', text: 'text text text 2/3', tags: [{ id: 2, name: 'foo2' }], }, { title: 'title 3/3', description: 'desc 3/3', text: 'text text text 3/3', tags: [{ id: 2, name: 'foo2' }, { id: 3, name: 'foo3' }], }, ], }); } } ``` Then you need to run the `TestSeeder`, let's do that in your `initTestApp` helper, right after we call `orm.schema.createSchema()`: utils.ts ``` await orm.schema.createSchema(); await orm.seeder.seed(TestSeeder); ``` And adjust the test assertion, as we now get 3 articles in the feed: article.test.ts ``` expect(res.json()).toMatchObject({ items: [ { author: 1, slug: 'title-13', title: 'title 1/3' }, { author: 1, slug: 'title-23', title: 'title 2/3' }, { author: 1, slug: 'title-33', title: 'title 3/3' }, ], total: 3, }); ``` Now run `npm test` to verify things work as expected. That should be enough for now, but don't you worry, we will get back to this topic later on. ## SchemaGenerator[​](#schemagenerator "Direct link to SchemaGenerator") Earlier in the guide, when we needed to create the database for testing, we used the `SchemaGenerator` to recreate our database. Let's talk a bit more about this class. [`SchemaGenerator`](https://mikro-orm.io/docs/schema-generator.md) is responsible for generating the SQL queries based on your entity metadata. In other words, it translates the entity definition into the Data Definition Language (DDL). Moreover, it can also understand your current database schema and compare it with the metadata, resulting in queries needed to put your schema in sync. It can be used programmatically: ``` // to get the queries const diff = await orm.schema.getUpdateSchemaSQL(); console.log(diff); // or to run the queries await orm.schema.updateSchema(); ``` > With the `orm.schema.updateSchema()` you could easily set up the same behavior as TypeORM has via `synchronize: true`, just put that into your app right after the ORM gets initialized (or into some app bootstrap code). Keep in mind this approach can be destructive and is discouraged - you should always verify what queries the `SchemaGenerator` produced before you run them! Or via CLI: > To run the queries, replace `--dump` with `--run`. ``` npx mikro-orm-esm schema:create --dump # Dumps create schema SQL npx mikro-orm-esm schema:update --dump # Dumps update schema SQL npx mikro-orm-esm schema:drop --dump # Dumps drop schema SQL ``` Your production database (the one in `sqlite.db` file in the root of your project) is probably out of sync, as we were mostly using the in-memory database inside the tests. Let's try to sync it via the CLI. First, run it with the `--dump` (or `-d`) flag to see what queries it generates, then run them via `--run` (or `-r`): ``` # first check what gets generated npx mikro-orm-esm schema:update --dump # and when its fine, sync the schema npx mikro-orm-esm schema:update --run ``` > If this command does not work and produces some invalid queries, you can always recreate the schema from scratch, by first calling `schema:drop --run`. Working with `SchemaGenerator` can be handy when prototyping the initial app, or especially when testing, where you might want to have many databases with the latest schema, regardless of how your production schema looks like. But beware, it can be very dangerous when used on a real production database. Luckily, we have a solution for that - the migrations. ## Migrations[​](#migrations "Direct link to Migrations") > To use migrations you first need to install `@mikro-orm/migrations` package for SQL drivers (or `@mikro-orm/migrations-mongodb` for MongoDB), and register the `Migrator` extension in your ORM config. MikroORM has integrated support for migrations via [umzug](https://github.com/sequelize/umzug). It allows you to generate migrations with current schema differences, as well as manage their execution. By default, each migration will be executed inside a transaction, and all of them will be wrapped in one master transaction, so if one of them fails, everything will be rolled back. Let's install the migrations package and try to create your first migration: * npm * Yarn * pnpm * Bun ``` npm install @mikro-orm/migrations ``` ``` yarn add @mikro-orm/migrations ``` ``` pnpm add @mikro-orm/migrations ``` ``` bun add @mikro-orm/migrations ``` Then register the `Migrator` extension in your ORM config: ``` import { defineConfig } from '@mikro-orm/sqlite'; import { SeedManager } from '@mikro-orm/seeder'; import { Migrator } from '@mikro-orm/migrations'; export default defineConfig({ // ... extensions: [SeedManager, Migrator], }); ``` And finally try to create your first migration: ``` npx mikro-orm-esm migration:create ``` If you followed the guide closely, you should see this message: ``` No changes required, schema is up-to-date ``` That is because you just synchronized the schema by called `npx mikro-orm-esm schema:update --run` a moment ago. You have two options here, drop the schema first, or a less destructive one - an initial migration. ### Initial migration[​](#initial-migration "Direct link to Initial migration") If you want to start using migrations, and you already have the schema generated, the `--initial` flag will help with keeping the existing schema, while generating the first migration based only on the entity metadata. It can be used only if the schema is empty or fully up-to-date. The generated migration will be automatically marked as executed if your schema already exists - if not, you will need to execute it manually as any other migration, via `npx mikro-orm-esm migration:up`. > Initial migration can be created only if there are no migrations previously generated or executed. If you are starting fresh, and you have no schema yet, you don't need to use the `--inital` flag, a regular migration will do the job too. ``` npx mikro-orm-esm migration:create --initial ``` This will create the initial migration in the `src/migrations` directory, containing queries from `schema:create` command. The migration will be automatically marked as executed because our schema was already in sync. ### Migration class[​](#migration-class "Direct link to Migration class") Let's take a look at the generated migration. You can see there is a class that extends the `Migration` abstract class from the `@mikro-orm/migrations` package: Migration20220913202829.ts ``` import { Migration } from '@mikro-orm/migrations'; export class Migration20220913202829 extends Migration { async up(): Promise { this.addSql('create table `tag` (`id` integer not null primary key autoincrement, `created_at` datetime not null, `updated_at` datetime not null, `name` text not null);'); // ... } } ``` To support undoing those changed, you can implement the `down` method, which throws an error by default. Down migrations and SQLite MikroORM will generate the down migrations automatically (although not for the initial migration, for security concerns), with one exception - the SQLite driver, due to its limited capabilities. If you use any other driver, a down migration will be generated (unless it's an initial migration). > You can also execute queries inside the `up()`/`down()` method via `this.execute('...')`, which will run queries in the same transaction as the rest of the migration. The `this.addSql('...)` method also accepts instances of knex. Knex instance can be accessed via `this.getKnex()`; Read more about migrations in the [documentation](https://mikro-orm.io/docs/migrations.md). ### One more entity[​](#one-more-entity "Direct link to One more entity") The migrations are set up, let's test them by adding one more entity - the `Comment`, again belonging to the article module, so into `src/modules/article/comment.entity.ts`. comment.entity.ts ``` import { Entity, ManyToOne, Property } from '@mikro-orm/core'; import { Article } from './article.entity.js'; import { User } from '../user/user.entity.js'; import { BaseEntity } from '../common/base.entity.js'; @Entity() export class Comment extends BaseEntity { @Property({ length: 1000 }) text!: string; @ManyToOne() article!: Article; @ManyToOne() author!: User; } ``` and a OneToMany inverse side in `Article` entity: ``` @OneToMany({ mappedBy: 'article', eager: true, orphanRemoval: true }) comments = new Collection(this); ``` Don't forget to add the repository to our simple DI container too: ``` export interface Services { orm: MikroORM; em: EntityManager; user: UserRepository; article: EntityRepository
; comment: EntityRepository; tag: EntityRepository; } export async function initORM(options?: Options): Promise { // ... return cache = { orm, em: orm.em, user: orm.em.getRepository(User), article: orm.em.getRepository(Article), comment: orm.em.getRepository(Comment), tag: orm.em.getRepository(Tag), }; } ``` > We are using two new options here, `eager` and `orphanRemoval`: > > * `eager: true` will automatically populate this relation, just like if you would use `populate: ['comments']` explicitly. > * `orphanRemoval: true` is a special type of cascading, any entity removed from such collection will be deleted from the database, as opposed to being just detached from the relationship (by setting the foreign key to `null`). Now create the migration via CLI and run it. And just for the sake of testing, also try the other migration-related commands: ``` # create new migration based on the schema difference npx mikro-orm-esm migration:create # list pending migrations npx mikro-orm-esm migration:pending # run the pending migrations npx mikro-orm-esm migration:up # list executed migrations npx mikro-orm-esm migration:list ``` You should see output similar to this: ``` npx mikro-orm-esm migration:create Migration20220913205718.ts successfully created ``` ``` npx mikro-orm-esm migration:pending ┌─────────────────────────┐ │ Name │ ├─────────────────────────┤ │ Migration20220913205718 │ └─────────────────────────┘ ``` ``` npx mikro-orm-esm migration:up Processing 'Migration20220913205718' Applied 'Migration20220913205718' Successfully migrated up to the latest version ``` ``` npx mikro-orm-esm migration:list ┌─────────────────────────┬──────────────────────────┐ │ Name │ Executed at │ ├─────────────────────────┼──────────────────────────┤ │ Migration20220913202829 │ 2022-09-13T18:57:12.000Z │ │ Migration20220913205718 │ 2022-09-13T18:57:27.000Z │ └─────────────────────────┴──────────────────────────┘ ``` Migration snapshots Creating new migration will automatically save the target schema snapshot into the migrations folder. This snapshot will be then used if you try to create a new migration, instead of using the current database schema. This means that if you try to create new migration before you run the pending ones, you still get the right schema diff. > Snapshots should be versioned just like the regular migration files. Snapshotting can be disabled via `migrations.snapshot: false` in the ORM config. ### Running migrations automatically[​](#running-migrations-automatically "Direct link to Running migrations automatically") Before we call it a day, let's automate running the migrations a bit - we can use the `Migrator` programmatically, in a similar way like the `SchemaGenerator`. We want to run them during our app bootstrap cycle, before it starts to accept connections, so a good place for that is our `bootstrap` function, right after we initialize the ORM. app.ts ``` export async function bootstrap(port = 3001, migrate = true) { const db = await initORM(); if (migrate) { // sync the schema await db.orm.migrator.up(); } // ... } ``` We need to do this conditionally, as we want to run the migrations only for the production database, not for our testing ones (as they use the `SchemaGenerator` directly, together with the `Seeder`). Don't forget to pass `false` when calling the `bootstrap()` function from our test case: utils.ts ``` export async function initTestApp(port: number) { const { orm } = await initORM({ ... }); await orm.schema.createSchema(); await orm.seeder.seed(TestSeeder); const { app } = await bootstrap(port, false); // <-- here return app; } ``` ## ⛳ Checkpoint 3[​](#-checkpoint-3 "Direct link to ⛳ Checkpoint 3") We now have 4 entities, a working web app with a single get endpoint and a basic test case for it. We also set up migrations and seeding. This is our `app.ts` right now: > Due to the nature of how the ESM support in ts-node works, it is not possible to use it inside StackBlitz project - we need to use `node --loader` instead. We also use in-memory database, SQLite feature available via special database name `:memory:`. This is our [`app.ts` file](https://stackblitz.com/edit/mikro-orm-getting-started-guide-cp-3?file=src%2Fapp.ts) after this chapter: --- # Source: https://mikro-orm.io/docs/propagation.md # Propagation By default, MikroORM will propagate all changes made to one side of bidirectional relations to the other side, keeping them in sync. This works for all relations, including M:1 and 1:1. As part of the discovery process, all M:1 and 1:1 properties are re-defined as getter/setter. ``` const author = new Author(...); const book = new Book(...); book.author = author; console.log(author.books.contains(book)); // true ``` Warning Propagation on new entities you create via constructor is supported too, by modifying the entity class prototype, but this technique fails when `useDefineForClassFields` TypeScript compiler flag is enabled (which is true when targeting `ES2022` or higher). You can get around this by using `declare` keyword in your entity definition, or by creating entity instances via `em.create()`, which will ensure the propagation is enabled. ## Propagation of Collection's add() and remove() operations[​](#propagation-of-collections-add-and-remove-operations "Direct link to Propagation of Collection's add() and remove() operations") When you use one of `Collection.add()` method, the item is added to given collection, and this action is also propagated to its counterpart. ``` // one to many const author = new Author(...); const book = new Book(...); author.books.add(book); console.log(book.author); // author will be set thanks to the propagation ``` For M:N this works in both ways, either from owning side, or from inverse side. ``` // many to many works both from owning side and from inverse side const book = new Book(...); const tag = new BookTag(...); book.tags.add(tag); console.log(tag.books.contains(book)); // true tag.books.add(book); console.log(book.tags.contains(tag)); // true ``` > Collections on both sides have to be initialized, otherwise propagation won't work. > Although this propagation works also for M:N inverse side, you should always use owning side to manipulate the collection. Same applies for `Collection.remove()`. --- # Source: https://mikro-orm.io/docs/property-validation.md # Property Validation ## Required properties[​](#required-properties "Direct link to Required properties") Entity properties are by default considered as required, and as such, they will be validated on both type level and runtime level. To make a property nullable, we need to mark this both at type level and at metadata level (unless we are using `ts-morph` for metadata reflection): ``` @Property({ nullable: true }) name?: string; ``` In case we want to use explicit `null`, we should also provide property initializer: ``` @Property({ type: 'string', nullable: true }) name: string | null = null; ``` ### Properties with default value[​](#properties-with-default-value "Direct link to Properties with default value") The runtime validation will work fine if your required properties have default value. But when it comes to type validation, we will need additional hint for TypeScript, so it understands our property (for TS defined as required) is in fact optional too (because we have a default value for it). We have two options: Define property as optional even when it has a default value (not perfect as it will allow unsetting such property, which might not be what you want): ``` @Property({ default: 1 }) level?: number = 1; ``` Or use `OptionalProps` symbol, specially designed to help with this use case. It should be defined as optional property on the entity and its type needs to be a union of all the properties you want to mark as optional. ``` import { OptionalProps, Entity, PrimaryKey, Property } from '@mikro-orm/core'; @Entity() class User { // getters will have the same problem [OptionalProps]?: 'foo' | 'bar' | 'fooBar'; @PrimaryKey() id!: number; @Property({ default: 1 }) foo: number = 1; @Property({ default: 2 }) bar: number = 2; @Property({ persist: false }) get fooBar() { return foo + bar; } } ``` When you want to define some optional properties in your own base entity class, use generics, so you can add more properties from the extending classes: ``` @Entity() class MyBaseEntity { [OptionalProps]?: 'foo' | 'bar' | Optional; @PrimaryKey() id!: number; @Property({ default: 1 }) foo: number = 1; @Property({ default: 2 }) bar: number = 2; } @Entity() class User extends MyBaseEntity { @Property({ default: 3 }) baz: number = 3; } ``` An alternative approach is using the `Opt` type, which can be used in two ways: * with generics: `middleName: Opt = '';` * with intersections: `middleName: string & Opt = '';` Both will work the same, and can be combined with the `OptionalProps` symbol approach. ``` import { Opt, Entity, PrimaryKey, Property } from '@mikro-orm/core'; @Entity() class User { @PrimaryKey() id!: number; @Property() firstName!: string; @Property() middleName: string & Opt = ''; @Property() lastName!: string; @Property({ persist: false }) get fullName(): Opt { return `${this.firstName} ${this.middleName} ${this.lastName}`; } } ``` ### Runtime validation[​](#runtime-validation "Direct link to Runtime validation") The runtime validation happens on flush operation, right before we fire the insert queries. If for some reason we don't want the ORM to throw on missing properties that are marked as required, we can disable the validation via `validateRequired: false`. This validation is enabled by default since v5. ### Note about optional properties and metadata reflection[​](#note-about-optional-properties-and-metadata-reflection "Direct link to Note about optional properties and metadata reflection") When we define our entities, we need to be careful about optional properties. With `reflect-metadata` provider (the default one), the property type can be inferred only if we mark properties as optional via `?` suffix - if we would use a type union like `string | null`, `reflect-metadata` won't help us with such type, and we will be forced to define it explicitly. This issue is not present with `ts-morph` provider. ## Strict property type validation[​](#strict-property-type-validation "Direct link to Strict property type validation") > Since v4.0.3 the validation needs to be explicitly enabled via `validate: true`. It has performance implications and usually should not be needed, as long as you don't modify your entities via `Object.assign()`. `MikroORM` will validate your properties before actual persisting happens. It will try to fix wrong data types for you automatically. If automatic conversion fails, it will throw an error. You can enable strict mode to disable this feature and let ORM throw errors instead. Validation is triggered when persisting the entity. ``` // number instead of string will throw const author = new Author('test', 'test'); wrap(author).assign({ name: 111, email: 222 }); await orm.em.persist(author).flush(); // throws "Validation error: trying to set Author.name of type 'string' to '111' of type 'number'" // string date with unknown format will throw wrap(author).assign(author, { name: '333', email: '444', born: 'asd' }); await orm.em.persist(author).flush(); // throws "Validation error: trying to set Author.born of type 'date' to 'asd' of type 'string'" // string date with correct format will be auto-corrected wrap(author).assign({ name: '333', email: '444', born: '2018-01-01' }); await orm.em.persist(author).flush(); console.log(author.born).toBe(true); // instance of Date // Date object will be ok wrap(author).assign({ born: new Date() }); await orm.em.persist(author).flush(); console.log(author.born).toBe(true); // instance of Date // null will be ok wrap(author).assign({ born: null }); await orm.em.persist(author).flush(); console.log(author.born); // null // string number with correct format will be auto-corrected wrap(author).assign({ age: '21' }); await orm.em.persist(author).flush(); console.log(author.age); // number 21 // string instead of number with will throw wrap(author).assign({ age: 'asd' }); await orm.em.persist(author).flush(); // throws "Validation error: trying to set Author.age of type 'number' to 'asd' of type 'string'" wrap(author).assign({ age: new Date() }); await orm.em.persist(author).flush(); // throws "Validation error: trying to set Author.age of type 'number' to '2019-01-17T21:14:23.875Z' of type 'date'" wrap(author).assign({ age: false }); await orm.em.persist(author).flush(); // throws "Validation error: trying to set Author.age of type 'number' to 'false' of type 'boolean'" ``` --- # Source: https://mikro-orm.io/docs/query-builder.md # Using Query Builder info Since v4, we need to make sure we are working with correctly typed `EntityManager` or `EntityRepository` to have access to `createQueryBuilder()` method. ``` import { EntityManager, EntityRepository } from '@mikro-orm/mysql'; // or any other driver package ``` When you need to execute some SQL query without all the ORM stuff involved, you can either compose the query yourself, or use the `QueryBuilder` helper to construct the query for you: ``` // since v5 we can also use `em.qb()` shortcut const qb = em.createQueryBuilder(Author); qb.update({ name: 'test 123', type: PublisherType.GLOBAL }).where({ id: 123, type: PublisherType.LOCAL }); console.log(qb.getQuery()); // update `publisher2` set `name` = ?, `type` = ? where `id` = ? and `type` = ? console.log(qb.getParams()); // ['test 123', PublisherType.GLOBAL, 123, PublisherType.LOCAL] // run the query const res1 = await qb.execute(); ``` `QueryBuilder` also supports [smart query conditions](https://mikro-orm.io/docs/query-conditions.md). ## Executing the Query[​](#executing-the-query "Direct link to Executing the Query") You can use `execute(method = 'all', mapResults = true)`'s parameters to control form of result: ``` const res1 = await qb.execute('all'); // returns array of objects, default behavior const res2 = await qb.execute('get'); // returns single object const res3 = await qb.execute('run'); // returns object like `{ affectedRows: number, insertId: number, row: any }` ``` Second argument can be used to disable mapping of database columns to property names (which is enabled by default). In following example, `Book` entity has `createdAt` property defined with implicit underscored field name `created_at`: ``` const res4 = await em.createQueryBuilder(Book).select('*').execute('get', true); console.log(res4); // `createdAt` will be defined, while `created_at` will be missing const res5 = await em.createQueryBuilder(Book).select('*').execute('get', false); console.log(res5); // `created_at` will be defined, while `createdAt` will be missing ``` To get entity instances from the QueryBuilder result, you can use `getResult()` and `getSingleResult()` methods: ``` const book = await em.createQueryBuilder(Book).select('*').where({ id: 1 }).getSingleResult(); console.log(book instanceof Book); // true const books = await em.createQueryBuilder(Book).select('*').getResult(); console.log(books[0] instanceof Book); // true ``` > You can also use `qb.getResultList()` which is alias to `qb.getResult()`. ## Awaiting the QueryBuilder[​](#awaiting-the-querybuilder "Direct link to Awaiting the QueryBuilder") Since v5 we can await the `QueryBuilder` instance, which will automatically execute the QB and return appropriate response. The QB instance is now typed based on usage of `select/insert/update/delete/truncate` methods to one of: * `SelectQueryBuilder` * awaiting yields array of entities (as `qb.getResultList()`) * `CountQueryBuilder` * awaiting yields number (as `qb.getCount()`) * `InsertQueryBuilder` (extends `RunQueryBuilder`) * awaiting yields `QueryResult` * `UpdateQueryBuilder` (extends `RunQueryBuilder`) * awaiting yields `QueryResult` * `DeleteQueryBuilder` (extends `RunQueryBuilder`) * awaiting yields `QueryResult` * `TruncateQueryBuilder` (extends `RunQueryBuilder`) * awaiting yields `QueryResult` ``` const res1 = await em.qb(Publisher).insert({ name: 'p1', type: PublisherType.GLOBAL, }); // res1 is of type `QueryResult` console.log(res1.insertId); const res2 = await em.qb(Publisher) .select('*') .where({ name: 'p1' }) .limit(5); // res2 is Publisher[] console.log(res2.map(p => p.name)); const res3 = await em.qb(Publisher).count().where({ name: 'p1' }); // res3 is number console.log(res3 > 0); // true const res4 = await em.qb(Publisher) .update({ type: PublisherType.LOCAL }) .where({ name: 'p1' }); // res4 is QueryResult console.log(res4.affectedRows > 0); // true const res5 = await em.qb(Publisher).delete().where({ name: 'p1' }); // res5 is QueryResult console.log(res5.affectedRows > 0); // true expect(res5.affectedRows > 0).toBe(true); // test the type ``` ## Mapping Raw Results to Entities[​](#mapping-raw-results-to-entities "Direct link to Mapping Raw Results to Entities") Another way to create entity from raw results (that are not necessarily mapped to entity properties) is to use `map()` method of `EntityManager`, that is basically a shortcut for mapping results via `IDatabaseDriver.mapResult()` (which converts field names to property names - e.g. `created_at` to `createdAt`) and `merge()` which converts the data to entity instance and makes it managed. This method comes handy when you want to use 3rd party query builders, where the result is not mapped to entity properties automatically: ``` const results = await knex.select('*').from('users').where(knex.raw('id = ?', [id])); const users = results.map(user => em.map(User, user)); // or use EntityRepository.map() const repo = em.getRepository(User); const users = results.map(user => repo.map(user)); ``` ## Implicit Joining[​](#implicit-joining "Direct link to Implicit Joining") `QueryBuilder` supports automatic joining based on entity metadata: ``` const qb = em.createQueryBuilder(BookTag, 't'); qb.select('*').where({ books: 123 }); console.log(qb.getQuery()); // select `t`.*, `e1`.`book_tag_id`, `e1`.`book_uuid_pk` // from `book_tag` as `t` // left join `book_to_book_tag` as `e1` ON `t`.`id` = `e1`.`book_tag_id` // where `e1`.`book_uuid_pk` = ? ``` This also works for multiple levels of nesting: ``` const qb = em.createQueryBuilder(Author); qb.select('*') .where({ books: { tags: { name: 'Cool' } } }) .orderBy({ books: { tags: { createdBy: QueryOrder.DESC } } }); console.log(qb.getQuery()); // select `e0`.* // from `author` as `e0` // left join `book2` as `e1` on `e0`.`id` = `e1`.`author_id` // left join `book2_to_book_tag2` as `e3` on `e1`.`uuid_pk` = `e3`.`book2_uuid_pk` // left join `book_tag2` as `e2` on `e3`.`book_tag2_id` = `e2`.`id` // where `e2`.`name` = ? // order by `e1`.`tags` asc ``` This is currently available only for filtering (`where`) and sorting (`orderBy`), only the root entity will be selected. To populate its relationships, you can use [`em.populate()`](https://mikro-orm.io/docs/populating-relations.md). ## Explicit Joining[​](#explicit-joining "Direct link to Explicit Joining") Another way is to manually specify join property via `join()`/`leftJoin()` methods: ``` const qb = em.createQueryBuilder(BookTag, 't'); qb.select(['b.uuid', 'b.*', 't.*'], true) .join('t.books', 'b') .where({ 'b.title': 'test 123' }) .limit(2, 1); console.log(qb.getQuery()); // select distinct `b`.`uuid_pk`, `b`.*, `t`.*, `e1`.`book_tag_id`, `e1`.`book_uuid_pk` from `book_tag` as `t` // join `book_to_book_tag` as `e1` ON `t`.`id` = `e1`.`book_tag_id` // join `book` as `b` ON `e1`.`book_uuid_pk` = `b`.`uuid_pk` // where `b`.`title` = ? // limit ? offset ? ``` ## Mapping joined results[​](#mapping-joined-results "Direct link to Mapping joined results") To select multiple entities and map them from `QueryBuilder`, we can use `joinAndSelect` or `leftJoinAndSelect` method: ``` // `res` will contain array of authors, with books and their tags populated const res = await em.createQueryBuilder(Author, 'a') .select('*') .leftJoinAndSelect('a.books', 'b') .leftJoinAndSelect('b.tags', 't') .where({ 't.name': ['sick', 'sexy'] }) .getResultList(); ``` ## Joining sub-queries[​](#joining-sub-queries "Direct link to Joining sub-queries") Sometimes you might want to join a relation, but want to have more control over the query. The ORM allows you to override the join target with a sub-query, while keeping the original metadata for hydration: ``` // subquery can be a knex query builder as well const subquery = em.createQueryBuilder(Book, 'b') .where({ ... }) .orderBy({ title: 'asc' }).limit(1); const authors = await em.createQueryBuilder(Author, 'a') .select('*') // pass in both the property path and the subquery into the first argument as a tuple .leftJoinAndSelect(['a.books', subquery], 'b') // you can join more relations on top of the subquery join .leftJoinAndSelect('b.tags', 't') .getResultList(); ``` This will produce query similar to the following: ``` select `a`.*, `b`.`id` as `b__id`, `b`.`title` as `b__title`, `b`.`author_id` as `b__author_id`, `b`.`publisher_id` as `b__publisher_id`, `t`.`id` as `t__id`, `t`.`name` as `t__name` from `author` as `a` left join ( select `b`.*, `b`.price * 1.19 as `price_taxed` from `book` as `b` order by `b`.`title` asc limit 1 ) as `b` on `b`.`author_id` = `a`.`id` left join `book_tags` as `e1` on `b`.`uuid_pk` = `e1`.`book_uuid_pk` left join `book_tag` as `t` on `e1`.`book_tag_id` = `t`.`id` ``` ## Complex Where Conditions[​](#complex-where-conditions "Direct link to Complex Where Conditions") There are multiple ways to construct complex query conditions. You can either write parts of SQL manually, use `andWhere()`/`orWhere()`, or provide condition object: ### Using custom SQL fragments[​](#using-custom-sql-fragments "Direct link to Using custom SQL fragments") Any SQL fragment in your `WHERE` query or `ORDER BY` clause need to be wrapped with `raw()` or `sql`: ``` const users = em.createQueryBuilder(User) .select('*') .where({ [sql`lower(email)`]: 'foo@bar.baz' }) // sql tagged template function .orderBy({ [raw(`(point(loc_latitude, loc_longitude) <@> point(0, 0))`)]: 'ASC' }) // raw helper .getResultList(); ``` This will produce following query: ``` select `e0`.* from `user` as `e0` where lower(email) = 'foo@bar.baz' order by (point(loc_latitude, loc_longitude) <@> point(0, 0)) asc ``` Read more about this in [Using raw SQL query fragments](https://mikro-orm.io/docs/raw-queries.md) section. ### Custom SQL in where[​](#custom-sql-in-where "Direct link to Custom SQL in where") ``` const qb = em.createQueryBuilder(BookTag, 't'); qb.select(['b.*', 't.*']) .leftJoin('t.books', 'b') .where('b.title = ? or b.title = ?', ['test 123', 'lol 321']) .andWhere('1 = 1') .orWhere('1 = 2') .limit(2, 1); console.log(qb.getQuery()); // select `b`.*, `t`.*, `e1`.`book_tag_id`, `e1`.`book_uuid_pk` from `book_tag` as `t` // left join `book_to_book_tag` as `e1` ON `t`.`id` = `e1`.`book_tag_id` // left join `book` as `b` ON `e1`.`book_uuid_pk` = `b`.`uuid_pk` // where (((b.title = ? or b.title = ?) and (1 = 1)) or (1 = 2)) // limit ? offset ? ``` ### andWhere() and orWhere()[​](#andwhere-and-orwhere "Direct link to andWhere() and orWhere()") ``` const qb = em.createQueryBuilder(BookTag, 't'); qb.select(['b.*', 't.*']) .leftJoin('t.books', 'b') .where('b.title = ? or b.title = ?', ['test 123', 'lol 321']) .andWhere('1 = 1') .orWhere('1 = 2') .limit(2, 1); console.log(qb.getQuery()); // select `b`.*, `t`.*, `e1`.`book_tag_id`, `e1`.`book_uuid_pk` from `book_tag` as `t` // left join `book_to_book_tag` as `e1` ON `t`.`id` = `e1`.`book_tag_id` // left join `book` as `b` ON `e1`.`book_uuid_pk` = `b`.`uuid_pk` // where (((b.title = ? or b.title = ?) and (1 = 1)) or (1 = 2)) // limit ? offset ? ``` ### Conditions Object[​](#conditions-object "Direct link to Conditions Object") ``` const qb = em.createQueryBuilder(Test); qb.select('*').where({ $and: [{ id: { $nin: [3, 4] } }, { id: { $gt: 2 } }] }); console.log(qb.getQuery()); // select `e0`.* from `test` as `e0` where (`e0`.`id` not in (?, ?) and `e0`.`id` > ?) ``` ## Count queries[​](#count-queries "Direct link to Count queries") To create a count query, we can use `qb.count()`, which will initialize a select clause with `count()` function. By default, it will use the primary key. ``` const qb = em.createQueryBuilder(Test); qb.count().where({ $and: [{ id: { $nin: [3, 4] } }, { id: { $gt: 2 } }] }); console.log(qb.getQuery()); // select count(`e0`.`id`) from `test` as `e0` where (`e0`.`id` not in (?, ?) and `e0`.`id` > ?) // to get the count, we can use `qb.execute()` const res = await qb.execute('get'); const count = res ? +res.count : 0; ``` To simplify this process, we can use `qb.getCount()` method. Following code is equivalent: ``` const qb = em.createQueryBuilder(Test); qb.select('*').limit(10, 20).where({ $and: [{ id: { $nin: [3, 4] } }, { id: { $gt: 2 } }] }); const count = await qb.getCount(); ``` This will also remove any existing limit and offset from the query (the QB will be cloned under the hood, so calling `getCount()` does not mutate the original QB state). ## Pagination[​](#pagination "Direct link to Pagination") If we want to paginate the results of a QueryBuilder, we can use `qb.getResultAndCount()` method. It returns an ordered tuple, the first item being an array of results, and the second one being the total count of items, discarding the limit and offset clause. ``` const qb = em.createQueryBuilder(User); qb.select('*') .where({ age: 18 }) .limit(10); const [results, count] = await qb.getResultAndCount(); console.log(results.length); // max 10, as we used the limit clause console.log(count); // total count regardless limit and offset, e.g. 1327 ``` ## Overriding FROM clause[​](#overriding-from-clause "Direct link to Overriding FROM clause") You can specify the table used in the `FROM` clause, replacing the current table name if one has already been specified. This is typically used to specify a sub-query expression in SQL. ``` const qb = em.createQueryBuilder(Book2); qb.select('*').from(Author2).where({ id: { $gt: 2 } }); console.log(qb.getQuery()); // select `e0`.* from `author2` as `e0` where `e0`.`id` > 2; ``` You can also use sub-queries in the `FROM` like this: ``` const qb1 = em.createQueryBuilder(Book2).where({ id: { $lte: new Date() } }).orderBy({ id: 'DESC' }).limit(10); const qb2 = em.createQueryBuilder(qb1.clone()) qb2.select('*').orderBy({ id: 'ASC' }); console.log(qb2.getQuery()); // select `e1`.* from (select `e0`.* from `book2` as `e0` where `e0`.`id` <= ? order by `e0`.`id` desc limit ?) as `e1` order by `e1`.`id`; ``` To set up an alias to refer to a table in a `SELECT` statement, pass the second argument as follows: ``` const qb1 = em.createQueryBuilder(Book2, 'b1').where({ id: { $lte: new Date() } }).orderBy({ id: 'DESC' }).limit(10); const qb2 = em.createQueryBuilder(qb1.clone(), 'b2') qb2.select('*').orderBy({ id: 'ASC' }); console.log(qb2.getQuery()); // select `b2`.* from (select `b1`.* from `book2` as `b1` where `b1`.`id` <= ? order by `b1`.`id` desc limit ?) as `b2` order by `b2`.`id`; ``` ## Using sub-queries[​](#using-sub-queries "Direct link to Using sub-queries") You can filter using sub-queries in where conditions: ``` const qb1 = em.createQueryBuilder(Book2, 'b').select('b.author').where({ price: { $gt: 100 } }); const qb2 = em.createQueryBuilder(Author2, 'a').select('*').where({ id: { $in: qb1.getKnexQuery() } }); console.log(qb2.getQuery()); // select `a`.* from `author2` as `a` where `a`.`id` in (select `b`.`author_id` from `book2` as `b` where `b`.`price` > ?) ``` For sub-queries in selects, use the `qb.as(alias)` method: > The dynamic property (`booksTotal`) needs to be defined at the entity level (as `persist: false`). ``` const knex = em.getKnex(); const qb1 = em.createQueryBuilder(Book2, 'b').count('b.uuid', true).where({ author: knex.ref('a.id') }).as('Author2.booksTotal'); const qb2 = em.createQueryBuilder(Author2, 'a'); qb2.select(['*', qb1]).orderBy({ booksTotal: 'desc' }); console.log(qb2.getQuery()); // select `a`.*, (select count(distinct `b`.`uuid_pk`) as `count` from `book2` as `b` where `b`.`author_id` = `a`.`id`) as `books_total` from `author2` as `a` order by `books_total` desc ``` ``` const knex = em.getKnex(); const qb3 = em.createQueryBuilder(Book2, 'b').count('b.uuid', true).where({ author: knex.ref('a.id') }).as('books_total'); const qb4 = em.createQueryBuilder(Author2, 'a'); qb4.select(['*', qb3]).orderBy({ booksTotal: 'desc' }); console.log(qb4.getQuery()); // select `a`.*, (select count(distinct `b`.`uuid_pk`) as `count` from `book2` as `b` where `b`.`author_id` = `a`.`id`) as `books_total` from `author2` as `a` order by `books_total` desc ``` When you want to filter by sub-query on the left-hand side of a predicate, you will need to register it first via `qb.withSubquery()`: > The dynamic property (`booksTotal`) needs to be defined at the entity level (as `persist: false`). You always need to use prefix in the `qb.withSchema()` (so `a.booksTotal`). ``` const knex = em.getKnex(); const qb1 = em.createQueryBuilder(Book2, 'b').count('b.uuid', true).where({ author: knex.ref('a.id') }).getKnexQuery(); const qb2 = em.createQueryBuilder(Author2, 'a'); qb2.select('*').withSubQuery(qb1, 'a.booksTotal').where({ 'a.booksTotal': { $in: [1, 2, 3] } }); console.log(qb2.getQuery()); // select `a`.* from `author2` as `a` where (select count(distinct `b`.`uuid_pk`) as `count` from `book2` as `b` where `b`.`author_id` = `a`.`id`) in (?, ?, ?) ``` ``` const knex = em.getKnex(); const qb3 = em.createQueryBuilder(Book2, 'b').count('b.uuid', true).where({ author: knex.ref('a.id') }).getKnexQuery(); const qb4 = em.createQueryBuilder(Author2, 'a'); qb4.select('*').withSubQuery(qb3, 'a.booksTotal').where({ 'a.booksTotal': 1 }); console.log(qb4.getQuery()); // select `a`.* from `author2` as `a` where (select count(distinct `b`.`uuid_pk`) as `count` from `book2` as `b` where `b`.`author_id` = `a`.`id`) = ? ``` ## Referring to column in update queries[​](#referring-to-column-in-update-queries "Direct link to Referring to column in update queries") You can use static `raw()` helper to insert raw SQL snippets like this: ``` const qb = em.createQueryBuilder(Book); qb.update({ price: raw('price + 1') }).where({ uuid: '123' }); console.log(qb.getQuery()); // update `book` set `price` = price + 1 where `uuid_pk` = ? ``` ## Locking support[​](#locking-support "Direct link to Locking support") We can set the `LockMode` via `qb.setLockMode()`. ``` const qb = em.createQueryBuilder(Test); qb.select('*').where({ name: 'Lol 321' }).setLockMode(LockMode.PESSIMISTIC_READ); console.log(qb.getQuery()); // for MySQL // select `e0`.* from `test` as `e0` where `e0`.`name` = ? lock in share mode ``` Available lock modes: | Mode | Postgres | MySQL | | ------------------------------------ | ------------------------ | -------------------------------- | | `LockMode.PESSIMISTIC_READ` | `for share` | `lock in share mode` | | `LockMode.PESSIMISTIC_WRITE` | `for update` | `for update` | | `LockMode.PESSIMISTIC_PARTIAL_WRITE` | `for update skip locked` | `for update skip locked` | | `LockMode.PESSIMISTIC_WRITE_OR_FAIL` | `for update nowait` | `for update nowait` | | `LockMode.PESSIMISTIC_PARTIAL_READ` | `for share skip locked` | `lock in share mode skip locked` | | `LockMode.PESSIMISTIC_READ_OR_FAIL` | `for share nowait` | `lock in share mode nowait` | Optionally we can also pass list of table aliases we want to lock via second parameter: ``` const qb = em.createQueryBuilder(User, 'u'); qb.select('*') .leftJoinAndSelect('u.identities', 'i') .where({ name: 'Jon' }) .setLockMode(LockMode.PESSIMISTIC_READ, ['u']); console.log(qb.getQuery()); // for Postgres // select ... // from "user" as "u" // left join "identity" as "i" on "u"."id" = "i"."user_id" // where "u"."name" = 'Jon' // for update of "u" skip locked ``` ## Using Knex.js[​](#using-knexjs "Direct link to Using Knex.js") Under the hood, `QueryBuilder` uses [`Knex.js`](https://knexjs.org) to compose and run queries. You can access configured `knex` instance via `qb.getKnexQuery()` method: ``` const qb = em.createQueryBuilder(Author); qb.update({ name: 'test 123', type: PublisherType.GLOBAL }).where({ id: 123, type: PublisherType.LOCAL }); const knex = qb.getKnexQuery(); // instance of Knex' QueryBuilder // do what ever you need with `knex` const res = await em.getConnection().execute(knex); const entities = res.map(a => em.map(Author, a)); console.log(entities); // Author[] ``` You can also get clear and configured knex instance from the connection via `getKnex()` method. As this method is not available on the base `Connection` class, you will need to either manually type cast the connection to `AbstractSqlConnection` (or the actual implementation you are using, e.g. `MySqlConnection`), or provide correct driver type hint to your `EntityManager` instance, which will be then automatically inferred in `em.getConnection()` method. > Driver and connection implementations are not directly exported from `@mikro-orm/core` module. You can import them from the driver packages (e.g. `import { PostgreSqlDriver } from '@mikro-orm/postgresql'`). ``` const conn = em.getConnection() as AbstractSqlConnection; // you can make sure the `em` is correctly typed to `EntityManager` // or one of its implementations: // const em: EntityManager = em; const knex = conn.getKnex(); // do what ever you need with `knex` const res = await knex; ``` ## Running Native SQL Query[​](#running-native-sql-query "Direct link to Running Native SQL Query") You can run native SQL via underlying connection ``` const connection = em.getConnection(); const res = await connection.execute('select 1 as count'); console.log(res); // res is array of objects: `[ { count: 1 } ]` ``` Since v4 we can also use `em.execute()` which will also handle logging and mapping of exceptions. --- # Source: https://mikro-orm.io/docs/query-conditions.md # Query Conditions When you want to make complex queries, we can easily end up with a lot of boilerplate code full of curly brackets: ``` const res = await orm.em.find(Author, { $and: [ { id: { $in: [1, 2, 7] }, }, { id: { $nin: [3, 4] }, }, { id: { $gt: 5 }, }, { id: { $lt: 10 }, }, { id: { $gte: 7 }, }, { id: { $lte: 8 }, }, { id: { $ne: 9 }, }, ] }); ``` For AND condition with single field, we can also do this: ``` const res = await orm.em.find(Author, { id: { $in: [1, 2, 7], $nin: [3, 4], $gt: 5, $lt: 10, $gte: 7, $lte: 8, $ne: 9, }, }); ``` There is also shortcut for `$in` - simply provide array as value, and it will be converted automatically: ``` const res = await orm.em.find(Author, { favouriteBook: [1, 2, 7] }); ``` For primary key lookup, we can provide the array directly to `em.find()`: ``` const res = await orm.em.find(Author, [1, 2, 7]); ``` ## List of supported operators[​](#list-of-supported-operators "Direct link to List of supported operators") ### Comparison[​](#comparison "Direct link to Comparison") | operator | name | description | | -------------- | ---------------- | ------------------------------------------------------------------------------------------- | | `$eq` | equals | Matches values that are equal to a specified value. | | `$gt` | greater | Matches values that are greater than a specified value. | | `$gte` | greater or equal | Matches values that are greater than or equal to a specified value. | | `$in` | contains | Matches any of the values specified in an array. | | `$lt` | lower | Matches values that are less than a specified value. | | `$lte` | lower or equal | Matches values that are less than or equal to a specified value. | | `$ne` | not equal | Matches all values that are not equal to a specified value. | | `$nin` | not contains | Matches none of the values specified in an array. | | `$like` | like | Uses LIKE operator | | `$re` | regexp | Uses REGEXP operator. See info [below](#regular-expressions) | | `$fulltext` | full text | A driver specific full text search function. See requirements [below](#full-text-searching) | | `$ilike` | ilike | (postgres only) | | `$overlap` | && | (postgres only) | | `$contains` | @> | (postgres only) | | `$contained` | <@ | (postgres only) | | `$hasKey` | ? | (postgres only) | | `$hasSomeKeys` | ?\| | (postgres only) | | `$hasKeys` | ?& | (postgres only) | ### Logical[​](#logical "Direct link to Logical") | operator | description | | -------- | ------------------------------------------------------------------------------------------------------- | | `$and` | Joins query clauses with a logical AND returns all documents that match the conditions of both clauses. | | `$not` | Inverts the effect of a query expression and returns documents that do not match the query expression. | | `$or` | Joins query clauses with a logical OR returns all documents that match the conditions of either clause. | ### Collection[​](#collection "Direct link to Collection") In addition to the regular operators that translate to a real SQL operator expression (e.g. `>=`), you can also use the following collection operators: | operator | description | | -------- | --------------------------------------------------------------- | | `$some` | Finds collections that have some record matching the condition. | | `$none` | Finds collections that have no records matching the condition. | | `$every` | Finds collections where every record is matching the condition. | This will be resolved as a subquery condition: ``` // finds all authors that have some book called `Foo` const res1 = await em.find(Author, { books: { $some: { title: 'Foo' } }, }); // finds all authors that have no books called `Foo` const res2 = await em.find(Author, { books: { $none: { title: 'Foo' } }, }); // finds all authors that have every book called `Foo` const res3 = await em.find(Author, { books: { $every: { title: 'Foo' } }, }); ``` The condition object can be also empty: ``` // finds all authors that have at least one book const res1 = await em.find(Author, { books: { $some: {} }, }); // finds all authors that have no books const res2 = await em.find(Author, { books: { $none: {} }, }); ``` ## Regular Expressions[​](#regular-expressions "Direct link to Regular Expressions") The `$re` operator takes a string as input value, and by default uses the case-sensitive operator. If you would like to use a `RegExp` object, i.e. to be able to set flags, then search directly on the field name without using the operator: ``` const res = await em.find(Painter, { lastName: /m[oa]net/i, // or `new RegExp('m[oa]net', 'i')` }); ``` ## Full text searching[​](#full-text-searching "Direct link to Full text searching") Full-text search refers to searching some text inside extensive text data stored and returning results that contain some or all of the words from the query. In contrast, traditional search would return exact matches. The implementation and requirements differs per driver so it's important that fields are set up correctly. ### PostgreSQL[​](#postgresql "Direct link to PostgreSQL") PosgreSQL allows to execute queries (pg-query) on the type pg-vector. The pg-vector type can be a column (more performant) or be created in the query (no excess columns in the database). When using a column, advanced functionality such as [a custom `regconfig` or `setweight`](https://www.postgresql.org/docs/current/textsearch-controls.html) (the default `regconfig` is `simple`) is also supported. Refer to the [PostgreSQL documentation](https://www.postgresql.org/docs/current/functions-textsearch.html) for possible queries. * Using a column * Using an index ./entities/Book.ts ``` import { FullTextType, WeightedFullTextValue } from '@mikro-orm/postgresql'; @Entity() export class Book { @Property() title!: string; // example when using default settings @Index({ type: 'fulltext' }) @Property({ type: FullTextType, onUpdate: (book) => book.title }) searchableTitle!: string; // example when using a custom regconfig @Index({ type: 'fulltext' }) @Property({ type: new FullTextType('english'), onUpdate: (book) => book.title }) searchableTitle!: string; // example when using weights @Index({ type: 'fulltext' }) @Property({ type: FullTextType, onUpdate: (book) => ({ A: book.title, B: book.description }) }) searchableTitle!: WeightedFullTextValue; } ``` And to find results: `repository.findOne({ searchableTitle: { $fulltext: 'query' } })`. ./entities/Book.ts ``` @Entity() export class Book { @Index({ type: 'fulltext' }) @Property() title!: string; } ``` And to find results: `repository.findOne({ title: { $fulltext: 'query' } })` ### MySQL, MariaDB[​](#mysql-mariadb "Direct link to MySQL, MariaDB") MySQL and MariaDB allow full text searches on all columns with a fulltext index. Refer to the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/fulltext-boolean.html) or [MariaDB documentation](https://mariadb.com/kb/en/full-text-index-overview/#in-boolean-mode) for possible queries. ./entities/Book.ts ``` @Entity() export class Book { @Index({ type: 'fulltext' }) @Property() title!: string; } ``` And to find results: `repository.findOne({ title: { $fulltext: 'query' } })` ### MongoDB[​](#mongodb "Direct link to MongoDB") MongoDB allows full text searches on all columns with a text index. However, when executing a full text search, it selects matches based on all fields with a text index: it's only possible to add one query and only on the top-level of the query object. Refer to the [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/operator/query/text/#behavior) for more information on this behavior. Refer to the [MongoDB documentation](https://www.mongodb.com/docs/manual/reference/operator/query/text/#definition) for possible queries. ./entities/Book.ts ``` @Entity() export class Book { @Index({ type: 'fulltext' }) @Property() title!: string; } ``` ### SQLite[​](#sqlite "Direct link to SQLite") In SQLite, full text searches can only be executed on [FTS5 virtual tables](https://www.sqlite.org/fts5.html#overview_of_fts5). MikroORM can't create this table, and has to be done [manually](https://www.sqlite.org/fts5.html#fts5_table_creation_and_initialization). Simple tables can be created with this query: `CREATE VIRTUAL TABLE USING fts5(, , ...);` Afterwards an entity can create normally for the structure of this table. The `@Index` is not necessary for full text searches in SQLite. Refer to the [SQLite documentation](https://www.sqlite.org/fts5.html#full_text_query_syntax) for possible queries. ./entities/Book.ts ``` @Entity() export class Book { @PrimaryKey() id!: number; @Property() title!: string; } ``` And to find results: `repository.findOne({ title: { $fulltext: 'query' } })` --- # Source: https://mikro-orm.io/docs/quick-start.md # Quick Start In this guide, you will learn how to quickly bootstrap a simple project using MikroORM. For a deeper dive, check out the [Getting Started guide](https://mikro-orm.io/docs/guide.md) which follows. > If you prefer to take a peek at an existing project, there are [several example repositories](https://mikro-orm.io/docs/examples.md) available. ## Installation[​](#installation "Direct link to Installation") First install the module via package manager of your choice. Do not forget to install the database driver as well: * npm * Yarn * pnpm * Bun ``` # for mongodb npm install @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) npm install @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) npm install @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) npm install @mikro-orm/core @mikro-orm/postgresql # for sqlite npm install @mikro-orm/core @mikro-orm/sqlite # for better-sqlite npm install @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso npm install @mikro-orm/core @mikro-orm/libsql # for mssql npm install @mikro-orm/core @mikro-orm/mssql ``` ``` # for mongodb yarn add @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) yarn add @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) yarn add @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) yarn add @mikro-orm/core @mikro-orm/postgresql # for sqlite yarn add @mikro-orm/core @mikro-orm/sqlite # for better-sqlite yarn add @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso yarn add @mikro-orm/core @mikro-orm/libsql # for mssql yarn add @mikro-orm/core @mikro-orm/mssql ``` ``` # for mongodb pnpm add @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) pnpm add @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) pnpm add @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) pnpm add @mikro-orm/core @mikro-orm/postgresql # for sqlite pnpm add @mikro-orm/core @mikro-orm/sqlite # for better-sqlite pnpm add @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso pnpm add @mikro-orm/core @mikro-orm/libsql # for mssql pnpm add @mikro-orm/core @mikro-orm/mssql ``` ``` # for mongodb bun add @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) bun add @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) bun add @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) bun add @mikro-orm/core @mikro-orm/postgresql # for sqlite bun add @mikro-orm/core @mikro-orm/sqlite # for better-sqlite bun add @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso bun add @mikro-orm/core @mikro-orm/libsql # for mssql bun add @mikro-orm/core @mikro-orm/mssql ``` Next you will need to enable support for [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) as well as `esModuleInterop` in `tsconfig.json` via: ``` "experimentalDecorators": true, "emitDecoratorMetadata": true, "esModuleInterop": true ``` > The decorators are opt-in, if you use a different way to define your entity metadata like `EntitySchema`, you don't need to enable them. Then call `MikroORM.init` as part of bootstrapping your app: ``` import { MikroORM } from '@mikro-orm/postgresql'; // or any other driver package const orm = await MikroORM.init({ entities: ['./dist/entities'], // path to your JS entities (dist), relative to `baseDir` dbName: 'my-db-name', }); console.log(orm.em); // access EntityManager via `em` property ``` > To access driver specific methods like `em.createQueryBuilder()` you need to import the `MikroORM`/`EntityManager`/`EntityRepository` class from the driver package. Alternatively you can cast the `orm.em` to `EntityManager` exported from the driver package: > > ``` > import { EntityManager } from '@mikro-orm/postgresql'; > const em = orm.em as EntityManager; > const qb = em.createQueryBuilder(...); > ``` You can read more about all the possible configuration options in [Advanced Configuration](https://mikro-orm.io/docs/configuration.md) section. ## Folder-based discovery[​](#folder-based-discovery "Direct link to Folder-based discovery") You can also provide paths where you store your entities via `entities` array. The paths are resolved via [`globby`](https://github.com/sindresorhus/globby) internally, so you can use [globbing patterns](https://github.com/sindresorhus/globby#globbing-patterns), including **negative globs**. ``` const orm = await MikroORM.init({ entities: ['./dist/app/**/*.entity.js'], entitiesTs: ['./src/app/**/*.entity.ts'], // ... }); ``` If you are experiencing problems with folder based discovery, try using `mikro-orm debug` CLI command to check what paths are actually being used. ## Entity Discovery in TypeScript[​](#entity-discovery-in-typescript "Direct link to Entity Discovery in TypeScript") The default metadata provider is `ReflectMetadataProvider`. If you want to use `ts-morph` based discovery (that reads actual TS types via the compiler API), you need to install `@mikro-orm/reflection` package. ``` import { MikroORM } from '@mikro-orm/postgresql'; import { TsMorphMetadataProvider } from '@mikro-orm/reflection'; const orm = await MikroORM.init({ metadataProvider: TsMorphMetadataProvider, // ... }); ``` Read more about the differences in [Metadata Providers section](https://mikro-orm.io/docs/metadata-providers.md). ``` import { MikroORM } from '@mikro-orm/postgresql'; const orm = await MikroORM.init({ entities: ['./dist/entities/**/*.js'], // path to your JS entities (dist), relative to `baseDir` entitiesTs: ['./src/entities/**/*.ts'], // path to your TS entities (source), relative to `baseDir` // ... }); ``` > It is important that `entities` will point to the compiled JS files, and `entitiesTs` will point to the TS source files. You should not mix those. > For `ts-morph` discovery to work in production, you need to deploy `.d.ts` declaration files. Be sure to enable `compilerOptions.declaration` in your `tsconfig.json`. You can also use different the default [`ReflectMetadataProvider`](https://mikro-orm.io/docs/metadata-providers.md#reflectmetadataprovider) or even write custom one. Using [`EntitySchema`](https://mikro-orm.io/docs/entity-schema.md) is another way to define your entities and does not depend on the metadata providers at all. ``` import { MikroORM } from '@mikro-orm/postgresql'; const orm = await MikroORM.init({ // default since v4, so not needed to specify explicitly metadataProvider: ReflectMetadataProvider, // ... }); ``` ## Synchronous initialization[​](#synchronous-initialization "Direct link to Synchronous initialization") As opposed to the async `MikroORM.init` method, you can prefer to use synchronous variant `initSync`. This method has some limitations: * database connection will be established when you first interact with the database (or you can use `orm.connect()` explicitly) * no loading of the `config` file, `options` parameter is mandatory * no support for folder based discovery * no check for mismatched package versions ## RequestContext helper[​](#requestcontext-helper "Direct link to RequestContext helper") Now you will need to fork entity manager for each request so their [identity maps](https://mikro-orm.io/identity-map/) will not collide. To do so, use the `RequestContext` helper: ``` const app = express(); app.use((req, res, next) => { RequestContext.create(orm.em, next); }); ``` > You should register this middleware as the last one just before request handlers and before any of your custom middleware that is using the ORM. There might be issues when you register it before request processing middleware like `queryParser` or `bodyParser`, so definitely register the context after them. More info about `RequestContext` is described [here](https://mikro-orm.io/docs/identity-map.md#request-context). ## Entity definition[​](#entity-definition "Direct link to Entity definition") Now you can start defining your entities (in one of the `entities` folders). This is how a simple entity can look like: ./entities/Book.ts ``` @Entity() export class Book { @PrimaryKey() id: bigint; @Property() title: string; @ManyToOne(() => Author) author: Author; @ManyToMany(() => BookTag) tags = new Collection(this); constructor(title: string, author: Author) { this.title = title; this.author = author; } } ``` Or if you want to use UUID primary key: ./entities/Book.ts ``` import { v4 } from 'uuid'; @Entity() export class Book { @PrimaryKey({ type: 'uuid' }) uuid = v4(); // ... } ``` More information can be found in [defining entities section](https://mikro-orm.io/docs/defining-entities.md) in docs. ## EntityManager[​](#entitymanager "Direct link to EntityManager") When you have your entities defined, you can start using ORM either via `EntityManager`. To save entity state to database, you need to persist it. Persist determines whether to use `insert` or `update` and computes appropriate change-set. Entity references that are not persisted yet (does not have identifier) will be cascade persisted automatically. ``` // use constructors in your entities for required parameters const author = new Author('Jon Snow', 'snow@wall.st'); author.born = new Date(); const publisher = new Publisher('7K publisher'); const book1 = new Book('My Life on The Wall, part 1', author); book1.publisher = publisher; const book2 = new Book('My Life on The Wall, part 2', author); book2.publisher = publisher; const book3 = new Book('My Life on The Wall, part 3', author); book3.publisher = publisher; // just persist books, author and publisher will be automatically cascade persisted await em.persist([book1, book2, book3]).flush(); ``` To fetch entities from database you can use `find()` and `findOne()` of `EntityManager`: ``` const authors = em.find(Author, {}); for (const author of authors) { console.log(author); // instance of Author entity console.log(author.name); // Jon Snow for (const book of author.books) { // iterating books collection console.log(book); // instance of Book entity console.log(book.title); // My Life on The Wall, part 1/2/3 } } ``` Take a look at docs about [working with `EntityManager`](https://mikro-orm.io/docs/entity-manager.md). ## Setting up the Commandline Tool[​](#setting-up-the-commandline-tool "Direct link to Setting up the Commandline Tool") MikroORM ships with a number of command line tools that are very helpful during development, like `SchemaGenerator` and `EntityGenerator`. You can call this command from the NPM binary directory or use `npx`: ``` # install the CLI package first! $ yarn add @mikro-orm/cli # manually $ node node_modules/.bin/mikro-orm # via npx $ npx mikro-orm # or via yarn $ yarn mikro-orm ``` > To work with the CLI, first install `@mikro-orm/cli` package locally. The version needs to be aligned with the `@mikro-orm/core` package. For CLI to be able to access your database, you will need to create a configuration file that exports your ORM configuration(s). By default, the following paths, relative to the current working directory, are searched in this order: 1. `./src/mikro-orm.config.ts` 2. `./mikro-orm.config.ts` 3. `./dist/mikro-orm.config.js` 4. `./build/mikro-orm.config.js` 5. `./src/mikro-orm.config.js` 6. `./mikro-orm.config.js` You can set up array of possible paths to ORM config files in `package.json`. The `package.json` file can be located in the current working directory, or in one of its parent folders. ./package.json ``` { "name": "your-app", "dependencies": { ... }, "mikro-orm": { "configPaths": [ "./src/mikro-orm.config.ts", "./dist/mikro-orm.config.js" ] } } ``` Another way to control these CLI-related settings is with the environment variables: * `MIKRO_ORM_CLI_CONFIG`: the path to ORM config file * `MIKRO_ORM_CLI_USE_TS_NODE`: register `ts-node` for TypeScript support * `MIKRO_ORM_CLI_TS_CONFIG_PATH`: path to the tsconfig.json (for ts-node) * `MIKRO_ORM_CLI_ALWAYS_ALLOW_TS`: enable `.ts` files to use without ts-node * `MIKRO_ORM_CLI_VERBOSE`: enable verbose logging (e.g. print queries used in seeder or schema diffing) MikroORM will always try to load the first available config file, based on the order in `configPaths`. When you have `useTsNode` explicitly disabled or `ts-node` is not already registered nor detected, TS config files will be ignored. You can also specify the config path via `--config` option: ``` $ npx mikro-orm debug --config ./my-config.ts ``` Since v6.3, the CLI will always try to use TS config file, even without explicitly enabling it via `useTsNode` flag in your `package.json` file. You can still use it to disable the TS support explicitly. Keep in mind that having `ts-node` installed is still required for the TS support to work. The `useTsNode` has effect only on the CLI. Your configuration file may export multiple configuration objects in an array. The different configurations must have a `contextName` in them. If no `contextName` is specified, it is treated as the name "default". You can use the `MIKRO_ORM_CONTEXT_NAME` environment variable or the `--contextName` command line option to pick a configuration with a particular `contextName` to use for the CLI. See [below](#configuration-file-structure) for details on the config object. All available commands are listed in the CLI help: ``` $ npx mikro-orm Usage: mikro-orm [options] Commands: mikro-orm cache:clear Clear metadata cache mikro-orm cache:generate Generate metadata cache mikro-orm generate-entities Generate entities based on current database schema mikro-orm database:create Create your database if it does not exist mikro-orm database:import Imports the SQL file to the database mikro-orm seeder:run Seed the database using the seeder class mikro-orm seeder:create Create a new seeder class mikro-orm schema:create Create database schema based on current metadata mikro-orm schema:drop Drop database schema based on current metadata mikro-orm schema:update Update database schema based on current metadata mikro-orm schema:fresh Drop and recreate database schema based on current metadata mikro-orm migration:create Create new migration with current schema diff mikro-orm migration:up Migrate up to the latest version mikro-orm migration:down Migrate one step down mikro-orm migration:list List all executed migrations mikro-orm migration:check Check if migrations are needed. Useful for bash scripts. mikro-orm migration:pending List all pending migrations mikro-orm migration:fresh Clear the database and rerun all migrations mikro-orm debug Debug CLI configuration Options: --config Set path to the ORM configuration file [array] --contextName Set name of config to load out of the ORM configuration file. Used when config file exports an array or a function [string] [default: "default"] -v, --version Show version number [boolean] -h, --help Show help [boolean] Examples: mikro-orm schema:update --run Runs schema synchronization ``` To verify your setup, you can use `mikro-orm debug` command. ## Running MikroORM.init() without arguments[​](#running-mikroorminit-without-arguments "Direct link to Running MikroORM.init() without arguments") When a CLI config is properly set up, you can omit the `options` parameter when calling `MikroORM.init()` in your app. The configuration is loaded similarly to how it is loaded when using the MikroORM CLI. The `--config` flag from the command line will be respected also when you run your app (as long as it is part of `process.argv`), not just when you use the CLI. ``` $ node ./dist/index.js --config ./my-orm-config.js ``` This might introduce a conflict with other tools like `jest` that also support overriding the config path via `--config` argument. In those cases you can use the `MIKRO_ORM_CONFIG_ARG_NAME` environment variable to change the argument name to something other than `config`: ``` $ MIKRO_ORM_CONFIG_ARG_NAME=mikro-orm-config \ node ./dist/index.js --mikro-orm-config ./my-orm-config.js ``` > `jest` does not allow unrecognised parameters, to run tests with a custom configuration you can use this together with `MIKRO_ORM_CLI_CONFIG` environment variable to point to a test config. warning Currently, `process.argv` is automatically analyzed for backwards compatibility. This is deprecated and will be removed in v7. Using `--config` with the MikroORM CLI will still be available. If you want your application to analyze `process.argv`, you can manually do so, and then load the ORM config and explicitly specify it to `MikroORM.init()`. By default, TS config files are not considered when running your app, unless you run it via `ts-node`. You can use the `alwaysAllowTs` option in your `package.json` file, which will enable checking the TS files even if `ts-node` is not used, as well as in the MikroORM CLI. This can be handy if you run your app via [Bun](https://bun.sh). Note that automatically loading the config file out of the config paths may fail if you use bundlers that use tree shaking. As the config file is not referenced anywhere statically, it would not be compiled - for that the best approach is to provide the config explicitly: ``` import config from './mikro-orm.config'; const orm = await MikroORM.init(config); ``` ## Configuration file structure[​](#configuration-file-structure "Direct link to Configuration file structure") Preferred way of creating to the configuration object is with the `defineConfig` helper. It will provide intellisense even in JavaScript files, without the need for type hints via jsdoc: ``` import { defineConfig } from '@mikro-orm/sqlite'; export default defineConfig({ entities: [Author, Book, BookTag], dbName: 'my-db-name', // this is inferred as you import `defineConfig` from sqlite package // driver: SqliteDriver, }); ``` Using `defineConfig` also automatically infers the driver option for you if you import the helper from the driver package. This means you don't have to provide the `driver` option explicitly. Alternatively, you can use the `Options` type: ./src/mikro-orm.config.ts ``` import { Options } from '@mikro-orm/sqlite'; const config: Options = { entities: [Author, Book, BookTag], dbName: 'my-db-name', driver: SqliteDriver, }; export default config; ``` You can also export array of different configs for different purposes. For example, you may export one config object for CLI, and another for your app. Each config in the array needs to have a distinct `contextName` value (omitting it is same as setting it to "default"), like so: ``` import { defineConfig } from '@mikro-orm/postgresql'; export default [ defineConfig({ contextName: 'default', entities: [Author, Book, BookTag], dbName: 'my-db-name', user: 'app', // other credentials and settings }), defineConfig({ contextName: 'super', entities: [Author, Book, BookTag], dbName: 'my-db-name', user: 'admin', // other credentials and settings }), ]; ``` Which in turn enables you to run `MikroORM.init()` in your app without arguments (and connect with the user "app"), while in CLI (where you may need higher privileges), you can use ``` $ npx mikro-orm --contextName=super ``` You can also export a function, which will be called with a `contextName` parameter. That function should return a configuration object for the provided `contextName`, a promise resolving to a configuration object for that `contextName`, or nothing if you wish to error on that name instead. This can be particularly useful in multi-tenant setups. For example, if you have ``` import { defineConfig } from '@mikro-orm/postgresql'; export default (contextName: string) => defineConfig({ entities: [Author, Book, BookTag], dbName: `tenant_${contextName}`, user: 'app', // other credentials and settings }); ``` then you will need to start your app with the `MIKRO_ORM_CONTEXT_NAME` environment variable set to `example1` to load the database `tenant_example1`, and similarly, when running CLI, you can use ``` $ npx mikro-orm --contextName=example1 ``` to operate on that particular tenant's database instance. Not specifying either option will point you to the "tenant\_default" database. You can also combine arrays and factory functions. Array members will be preferred, and any functions in the array will be executed from top to bottom. The first function to return an object will be what ends up being used. For example, you can have in your config file ``` import { defineConfig } from '@mikro-orm/postgresql'; export default [ defineConfig({ contextName: 'default', entities: [Author, Book, BookTag], dbName: 'demo', user: 'app', // other credentials and settings }), defineConfig({ contextName: 'super', entities: [Author, Book, BookTag], dbName: 'demo', user: 'admin', // other credentials and settings }), (contextName: string) => { if (!contextName.startsWith('use:')) { return; } return defineConfig({ contextName, entities: [Author, Book, BookTag], dbName: `tenant_${contextName.split(':', 2)[1]}`, user: 'app', // other credentials and settings }); }, (contextName: string) => { if (!contextName.startsWith('edit:')) { return; } return defineConfig({ contextName, entities: [Author, Book, BookTag], dbName: `tenant_${contextName.split(':', 2)[1]}`, user: 'admin', // other credentials and settings }); } ]; ``` which will let you run the "demo" database with "app" user whenever you do not specify `MIKRO_ORM_CONTEXT_NAME` or the `--contextName` option in CLI. Specifying "super" for the name will run the "demo" database with the "admin" user, specifying "use:example1" will load the "tenant\_example1" database with the "app" user, and specifying "edit:example1" will load the "tenant\_example1" database with the "admin" user. --- # Source: https://mikro-orm.io/api/core/function/quote.md # quote ### Callable * ****quote**(expParts, ...values): any *** * Tag function providing quoting of db identifiers (table name, columns names, index names, ...). Within the template literal on which the tag function is applied, all placeholders are considered to be database identifiers, and will thus be quoted as so according to the database in use. ``` // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("name") // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`name`) @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) @Entity({ schema: 'library' }) export class Author { ... } ``` *** #### Parameters * ##### expParts: readonly string\[] * ##### rest...values: (string | { toString: any })\[] #### Returns any --- # Source: https://mikro-orm.io/docs/raw-queries.md # Using raw SQL query fragments ## `raw()` helper[​](#raw-helper "Direct link to raw-helper") When you want to use a raw SQL fragment as part of your query, you can use the `raw()` helper. It creates a raw SQL query fragment instance that can be assigned to a property or part of a filter. This fragment is represented by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value and key. When serialized, the fragment key gets cached and only such a cached key will be recognized by the ORM. This adds runtime safety to the raw query fragments. > **`raw()` helper is required since v6 to use a raw SQL fragment in your query, both through EntityManager and QueryBuilder.** ``` // as a value await em.find(User, { time: raw('now()') }); // as a key await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); // with operators await em.find(User, { [raw('lower(name)')]: { $like: name.toLowerCase() } }); // value can be empty array to skip operator await em.find(User, { [raw('(select 1 = 1)')]: [] }); ``` The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: ``` await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); ``` ### Raw fragments in filters[​](#raw-fragments-in-filters "Direct link to Raw fragments in filters") When using raw query fragment inside a filter, you might have to use a callback signature to create new raw instance for every filter usage - namely when you use the fragment as an object key, which requires its serialization. ``` @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) ``` ### Raw fragments in indexes and uniques[​](#raw-fragments-in-indexes-and-uniques "Direct link to Raw fragments in indexes and uniques") The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: ``` // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) @Entity({ schema: 'library' }) export class Author { ... } ``` You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: ``` @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) @Entity({ schema: 'library' }) export class Author { ... } ``` ## `raw` queries with `QueryBuilder`[​](#raw-queries-with-querybuilder "Direct link to raw-queries-with-querybuilder") You can use the `raw` helper for `QueryBuilder` or `Knex.QueryBuilder` instances too. Note that this is only available in the `raw` helper exported from SQL drivers, not with the one exported from the `@mikro-orm/core` package. ``` import { raw } from '@mikro-orm/postgresql'; const knexRaw = em.getKnex().raw('select 1'); const r = await em.find(User, { id: raw(knexRaw), }); ``` ## `sql` tagged templates[​](#sql-tagged-templates "Direct link to sql-tagged-templates") You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: ``` // as a value await em.find(User, { time: sql`now()` }); // as a key await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); // value can be empty array await em.find(User, { [sql`(select ${1} = ${1})`]: [] }); ``` ### `sql.ref()`[​](#sqlref "Direct link to sqlref") When you want to refer to a column, you can use the `sql.ref()` function: ``` await em.find(User, { foo: sql.ref('bar') }); ``` ### `sql.now()`[​](#sqlnow "Direct link to sqlnow") When you want to define a default value for a datetime column, you can use the `sql.now()` function. It resolves to `current_timestamp` SQL function, and accepts a `length` parameter. ``` @Property({ default: sql.now() }) createdAt: Date & Opt; ``` ### `sql.lower()` and `sql.upper()`[​](#sqllower-and-sqlupper "Direct link to sqllower-and-sqlupper") To convert a key to lowercase or uppercase, you can use the `sql.lower()` and `sql.upper()` functions ``` const books = await orm.em.find(Book, { [sql.upper('title')]: 'TITLE', }); ``` ### Aliasing[​](#aliasing "Direct link to Aliasing") To select a raw fragment, we need to alias it. For that, we can use ``sql`(select 1 + 1)`.as('')``. --- # Source: https://mikro-orm.io/api/knex/function/raw.md # Source: https://mikro-orm.io/api/core/function/raw.md # raw ### Callable * ****raw**\(sql, params): NoInfer\ *** * Creates raw SQL query fragment that can be assigned to a property or part of a filter. This fragment is represented by `RawQueryFragment` class instance that can be serialized to a string, so it can be used both as an object value and key. When serialized, the fragment key gets cached and only such cached key will be recognized by the ORM. This adds a runtime safety to the raw query fragments. > **`raw()` helper is required since v6 to use a raw fragment in your query, both through EntityManager and QueryBuilder.** ``` // as a value await em.find(User, { time: raw('now()') }); // as a key await em.find(User, { [raw('lower(name)')]: name.toLowerCase() }); // value can be empty array await em.find(User, { [raw('(select 1 = 1)')]: [] }); ``` The `raw` helper supports several signatures, you can pass in a callback that receives the current property alias: ``` await em.find(User, { [raw(alias => `lower(${alias}.name)`)]: name.toLowerCase() }); ``` You can also use the `sql` tagged template function, which works the same, but supports only the simple string signature: ``` await em.find(User, { [sql`lower(name)`]: name.toLowerCase() }); ``` When using inside filters, you might have to use a callback signature to create new raw instance for every filter usage. ``` @Filter({ name: 'long', cond: () => ({ [raw('length(perex)')]: { $gt: 10000 } }) }) ``` The `raw` helper can be used within indexes and uniques to write database-agnostic SQL expressions. In that case, you can use `'??'` to tag your database identifiers (table name, column names, index name, ...) inside your expression, and pass those identifiers as a second parameter to the `raw` helper. Internally, those will automatically be quoted according to the database in use: ``` // On postgres, will produce: create index "index custom_idx_on_name" on "library.author" ("country") // On mysql, will produce: create index `index custom_idx_on_name` on `library.author` (`country`) @Index({ name: 'custom_idx_on_name', expression: (table, columns) => raw(`create index ?? on ?? (??)`, ['custom_idx_on_name', table, columns.name]) }) @Entity({ schema: 'library' }) export class Author { ... } ``` You can also use the `quote` tag function to write database-agnostic SQL expressions. The end-result is the same as using the `raw` function regarding database identifiers quoting, only to have a more elegant expression syntax: ``` @Index({ name: 'custom_idx_on_name', expression: (table, columns) => quote`create index ${'custom_idx_on_name'} on ${table} (${columns.name})` }) @Entity({ schema: 'library' }) export class Author { ... } ``` *** #### Parameters * ##### sql: [AnyString](https://mikro-orm.io/api/core.md#AnyString) | [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) | [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\ | [EntityKey](https://mikro-orm.io/api/core.md#EntityKey)\\[] | (alias) => string * ##### optionalparams: readonly unknown\[] | [Dictionary](https://mikro-orm.io/api/core.md#Dictionary)\ #### Returns NoInfer\ --- # Source: https://mikro-orm.io/docs/read-connections.md # Read Replica Connections Users can specify multiple read connections via `replicas` option. You can provide only fields that differ from master connection, rest will be taken from it. When resolving read connections, the default strategy is to assign random read replicas for all read operations (SELECT, COUNT) that are not running inside a transaction. You can specify an explicit connection type for find and count operations by using the `connectionType` property on the corresponding Options argument (i.e. `FindOptions`, `CountOptions`). The connection resolution strategy can be also inverted by setting the `preferReadReplicas` configuration property to `false` so that the default connection will always be a write connection, unless explicitly requested to be read (can be useful in applications where read-replicas are available but should only be used for specific use-cases). ``` const orm = await MikroORM.init({ entities: [Author, ...], dbName: `my_database`, user: 'master_user', host: 'master_host', preferReadReplicas: true, // optional property, defaults to true replicas: [ { name: 'read-1', host: 'read_host_1', user: 'read_user' }, { name: 'read-2', host: 'read_host_2' }, // user omitted, will be taken from master connection ], }); ``` By default, select queries will use random read connection if not inside transaction. You can specify the connection type explicitly in `em.getConnection(type: 'read' | 'write')`. ``` const connection = em.getConnection(); // write connection const readConnection = em.getConnection('read'); // random read connection const qb1 = em.createQueryBuilder(Author); const res1 = await qb1.select('*').execute(); // random read connection const qb2 = em.createQueryBuilder(Author, 'a', 'write'); const res2 = await qb2.select('*').execute(); // write connection const qb3 = em.createQueryBuilder(Author); const res3 = await qb3.update(...).where(...).execute(); // write connection const res4 = await em.findOne(Author, 1, { connectionType: 'write' }); // explicit write connection // all queries inside a transaction will use write connection await em.transactional(async em => { const a = await em.findOne(Author, 1); // write connection const b = await em.findOne(Author, 1, { connectionType: 'read' }); // still a write connection - we are in a transaction a.name = 'test'; // will trigger update on write connection once flushed }); // given a configuration where preferReadReplicas: false const res5 = await em.findOne(Author, 1); // write connection - even for a read operation const res6 = await em.findOne(Author, 1, { connectionType: 'read' }); // unless explicitly asking for a read replica ``` --- # Source: https://mikro-orm.io/docs/recipes.md ## [📄️ Schema First Guide](https://mikro-orm.io/docs/schema-first-guide.md) [Although MikroORM is primarily a "code first" ORM, it can also be used in a "schema first" approach.](https://mikro-orm.io/docs/schema-first-guide.md) --- # Source: https://mikro-orm.io/api/core/function/ref.md # ref shortcut for `wrap(entity).toReference()` ### Callable * ****ref**\(entity): ([Ref](https://mikro-orm.io/api/core.md#Ref)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>>) | AddOptional\ * ****ref**\(entityType, pk): [Ref](https://mikro-orm.io/api/core.md#Ref)\ | AddOptional\ *** * shortcut for `wrap(entity).toReference()` *** #### Parameters * ##### entity: I #### Returns ([Ref](https://mikro-orm.io/api/core.md#Ref)\ & [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\>>) | AddOptional\ --- # Source: https://mikro-orm.io/api/reflection.md # @mikro-orm/reflection ## Index[**](#Index) ### Classes * [**TsMorphMetadataProvider](https://mikro-orm.io/api/reflection/class/TsMorphMetadataProvider.md) --- # Source: https://mikro-orm.io/api/core/function/rel.md # rel shortcut for `Reference.createNakedFromPK(entityType, pk)` ### Callable * ****rel**\(entityType, pk): T *** * shortcut for `Reference.createNakedFromPK(entityType, pk)` *** #### Parameters * ##### entityType: [EntityClass](https://mikro-orm.io/api/core.md#EntityClass)\ * ##### pk: T | PK #### Returns T --- # Source: https://mikro-orm.io/docs/relationships.md # Source: https://mikro-orm.io/docs/guide/relationships.md # Chapter 2: Relationships In this section, we will add more entities, create a common base entity to extend from, and define relationships between them. ## Created and updated timestamps[​](#created-and-updated-timestamps "Direct link to Created and updated timestamps") Before we add more entities, let's refactor our existing `User` entity a bit. We would like to store timestamps of when the entity was created and when it was updated for the last time. To do that, introduce two new properties: user.entity.ts ``` @Property() createdAt = new Date(); @Property({ onUpdate: () => new Date() }) updatedAt = new Date(); ``` The `onUpdate` option here will be executed during the `flush` operation if the ORM detects the entity was updated. For create query, we depend on the property initializers - we already said that the ORM will never call your entity constructor when creating managed entities, so it is safe to use it like this. ## Custom base entity[​](#custom-base-entity "Direct link to Custom base entity") Now let's say we want to have these timestamps on every entity in our app. We can refactor such common properties out to a custom base entity. Put the following into `src/modules/common/base.entity.ts`: base.entity.ts ``` import { PrimaryKey, Property } from '@mikro-orm/core'; export abstract class BaseEntity { @PrimaryKey() id!: number; @Property() createdAt = new Date(); @Property({ onUpdate: () => new Date() }) updatedAt = new Date(); } ``` You can see a base entity looks like any other entity, with one exception - it does not have the `@Entity()` decorator. There are some use cases where you will want to use the decorator even for the base entity, in that case, add `abstract: true` to the decorator options, e.g. `@Entity({ abstract: true })`. Now extend this base entity from the `User` entity and remove the properties it defines: > You can see the import with `.js` extension - this is mandatory for ESM projects. If your project is targeting CommonJS, drop it. user.entity.ts ``` import { Entity, PrimaryKey, Property } from '@mikro-orm/core'; import { BaseEntity } from '../common/base.entity.js'; @Entity() export class User extends BaseEntity { @Property() fullName!: string; @Property() email!: string; @Property() password!: string; @Property({ type: 'text' }) bio = ''; } ``` ## More entities[​](#more-entities "Direct link to More entities") Time to add the `Article` entity, it will have 4 string properties and one relationship - a ManyToOne relation pointing to the `User` entity. As you expected, it will go to the `src/modules/article/article.entity.ts` file. article.entity.ts ``` import { Entity, ManyToOne, Property, t } from '@mikro-orm/core'; import { BaseEntity } from '../common/base.entity.js'; import { User } from '../user/user.entity.js'; @Entity() export class Article extends BaseEntity { @Property({ unique: true }) slug!: string; @Property({ index: true }) title!: string; @Property({ length: 1000 }) description!: string; @Property({ type: t.text, lazy: true }) text!: string; @ManyToOne() author!: User; } ``` Let's break this down, there are some new additions we haven't seen before. * `slug` property is marked as `unique`, this will result in a unique constraint over the column * `title` property is marked as `index`ed * `description` property has a `length` option, the column will result in `varchar(1000)` with most SQL drivers * `text` property uses the `t.text` mapped type, and is marked as `lazy`, meaning it won't be selected automatically * `author` property is our first relationship Default `reflect-metadata` provider The examples here are all based on the `@mikro-orm/reflection` package that helps with advanced type reflection via `ts-morph`, based on TypeScript Compiler API. If you are using the default `reflect-metadata` provider, there are things you will need to add to the decorator options to make things work. Let's say the `author` property is optional, `ts-morph` would infer everything just fine, but with `reflect-metadata` you would have to do this: ``` // with @mikro-orm/reflection package (ts-morph) @ManyToOne() author?: User; // with the default provider (reflect-metadata) @ManyToOne({ entity: () => User, nullable: true }) author?: User; ``` Consult [the docs](https://mikro-orm.io/docs/metadata-providers.md#limitations-and-requirements) for more examples. ## Types of relations[​](#types-of-relations "Direct link to Types of relations") There are 4 types of entity relationships in MikroORM: * ManyToOne: Many instances of the current Entity refer to One instance of the referred Entity. * OneToMany: One instance of the current Entity has Many instances (references) to the referred Entity. * OneToOne: One instance of the current Entity refers to One instance of the referred Entity. * ManyToMany: Many instances of the current Entity refers to Many instances of the referred Entity. Relations can be unidirectional and bidirectional. Unidirectional relation is defined only on one side (the owning side). Bidirectional ones are defined on both sides, while one is owning side (where references are stored), marked by `inversedBy` attribute pointing to the inverse side. On the inversed side we define it with `mappedBy` attribute pointing back to the owner. > When modeling bidirectional relationship, you can also omit the `inversedBy` attribute, defining `mappedBy` on the inverse side is enough as it will be auto-wired. Check the [Modeling Entity Relationships](https://mikro-orm.io/docs/relationships.md) section in the documentation for more details and examples for each of the types. ## Working with relations[​](#working-with-relations "Direct link to Working with relations") Let's get back to the `server.ts` file and try a few things out with our new `Article` entity, namely with its `author` relation. ### Creating entity graph[​](#creating-entity-graph "Direct link to Creating entity graph") So far we used the entity constructor manually to create an entity instance. Sometimes we might want to create the whole entity graph, including relations. You can use [`em.create()`](https://mikro-orm.io/api/core/class/EntityManager.md#create) for that, it is a synchronous method that creates the entity instance for you. It allows you to create a deep entity graph, mapping foreign keys of your relations to entity references of the correct type. This method will also call [`em.persist()`](https://mikro-orm.io/api/core/class/EntityManager.md#persist) on the created entity (unless disabled via `persistOnCreate` option). > You can wipe most of the contents of `server.ts` file and keep only the initial part with ORM init, up to the point where the first `User` entity gets flushed, plus the `orm.close()` call at the end. We won't be using this code going forward, it is just a playground for you. server.ts ``` // create new user entity instance via constructor const user = new User(); user.email = 'foo@bar.com'; user.fullName = 'Foo Bar'; user.password = '123456'; // fork first to have a separate context const em = orm.em.fork(); // first mark the entity with `persist()`, then `flush()` await em.persist(user).flush(); // clear the context to simulate fresh request em.clear(); // create the article instance const article = em.create(Article, { slug: 'foo', title: 'Foo', text: 'Lorem impsum dolor sit amet', description: 'Foo is bar', author: user.id, }); // `em.create` calls `em.persist` automatically, so flush is enough await em.flush(); console.log(article); ``` `em.clear()` If you carefully checked this snippet, you probably found that new mysterious [`em.clear()`](https://mikro-orm.io/api/core/class/EntityManager.md#clear) call. What does it do? It clears the context for the [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md), meaning it will detach all the entities it was managing. It will bring the [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md) to the same state as if you would create a fresh fork via [`em.fork()`](https://mikro-orm.io/api/core/class/EntityManager.md#fork). You won't usually need this in your app, but it is very handy for unit testing, to simulate new requests coming in. You may as well use forks explicitly if you want. But wait, the editor is complaining about something. You probably see this cryptic error: ``` Argument of type '{ slug: string; title: string; description: string; text: string; author: number; }' is not assignable to parameter of type 'RequiredEntityData
'. Type '{ slug: string; title: string; description: string; text: string; author: number; }' is missing the following properties from type '{ slug: string; title: string; description: string; text: string; author: EntityData | { id?: number | null | undefined; fullName?: string | null | undefined; email?: string | ... 1 more ... | undefined; password?: string | ... 1 more ... | undefined; bio?: string | ... 1 more ... | undefined; } | EntityDataPr...': createdAt, updatedAt ts(2345) ``` It's indeed a bit ugly, but if you look carefully, you will see the important details at the very beginning and at the very end. This error tells us the object we are passing into [`em.create()`](https://mikro-orm.io/api/core/class/EntityManager.md#create) is not complete - it is missing two properties, the `createdAt` and `updatedAt` timestamps. But we define the default value for them via property initializer, what's the problem here? The thing is, there is no easy way to tell whether an object property has an initializer or not - for TypeScript our `createdAt` and `updatedAt` properties are both mandatory. To get around this while preserving the strict type checking, you can use the `OptionalProps` symbol. As both of the problematic properties live in the `BaseEntity`, put it there: base.entity.ts ``` import { OptionalProps, PrimaryKey, Property } from '@mikro-orm/core'; export abstract class BaseEntity { [OptionalProps]?: 'createdAt' | 'updatedAt'; @PrimaryKey() id!: number; @Property() createdAt = new Date(); @Property({ onUpdate: () => new Date() }) updatedAt = new Date(); } ``` With this change, you can see the TypeScript error is now gone. Running the `npm start`, you will see the `Article` entity will get persisted and logged to the console: ``` [query] begin [query] insert into `article` (`author_id`, `created_at`, `description`, `slug`, `text`, `title`, `updated_at`) values (1, 1662908804371, 'Foo is bar', 'foo', 'Lorem impsum...', 'Foo', 1662908804371) [took 0 ms] [query] commit Article { id: 1, createdAt: 2022-09-11T15:06:44.371Z, updatedAt: 2022-09-11T15:06:44.371Z, slug: 'foo', title: 'Foo', description: 'Foo is bar', text: 'Lorem impsum...', author: (User) { id: 1 } } ``` Remember the entity references and loaded state we discussed earlier? You can see that here in action, the `Article.author` is an entity reference with just the primary key. It is automatically logged as `(User)` so you can easily tell the loaded state of any entity, but it is in fact the very same `User` entity instance: ``` console.log('it really is a User', article.author instanceof User); // true console.log('but not initialized', wrap(article.author).isInitialized()); // false ``` ### Using entity constructor[​](#using-entity-constructor "Direct link to Using entity constructor") Every `Article` can be identified by a unique slug - a URL fragment that can be used to look up the article. Currently, it is just a regular string property, but we can do better here. The value should be always bound to the article title. For simplicity, we will use the following function: ``` function convertToSlug(text: string) { return text.toLowerCase() .replace(/[^\w ]+/g, '') .replace(/ +/g, '-'); } ``` We want the URL to remain the same after the article gets created, so let's generate the slug inside `Article` constructor. Similarly, you can use the text property and store its first 1000 characters as the description: article.entity.ts ``` import { Entity, ManyToOne, Property, t } from '@mikro-orm/core'; import { BaseEntity } from '../common/base.entity.js'; import { User } from '../user/user.entity.js'; function convertToSlug(text: string) { return text.toLowerCase() .replace(/[^\w ]+/g, '') .replace(/ +/g, '-'); } @Entity() export class Article extends BaseEntity { @Property({ unique: true }) slug: string; @Property({ index: true }) title: string; @Property({ length: 1000 }) description: string; @Property({ type: t.text, lazy: true }) text: string; @ManyToOne() author: User; constructor(title: string, text: string, author: User) { super(); this.title = title; this.text = text; this.author = author; this.slug = convertToSlug(title); this.description = this.text.substring(0, 999) + '…'; } } ``` With this change, the `slug` and `description` properties are optional too - but [`em.create()`](https://mikro-orm.io/api/core/class/EntityManager.md#create) complains about them. You need to add them to the `OptionalProps` definition, as with the timestamps before. But these are the `Article` entity properties, so we should do it in the `Article` entity somehow. Maybe like this? article.entity.ts ``` export class Article extends BaseEntity { [OptionalProps]?: 'slug' | 'description'; } ``` Unfortunately not, you will see TypeScript error like this one: ``` Property '[OptionalProps]' in type 'Article' is not assignable to the same property in base type 'BaseEntity'. Type '"slug" | "description" | undefined' is not assignable to type '"createdAt" | "updatedAt" | undefined'. Type '"slug"' is not assignable to type '"createdAt" | "updatedAt" | undefined'. ts(2416) ``` #### Generics to the rescue\![​](#generics-to-the-rescue "Direct link to Generics to the rescue!") The solution here might not be clear, but it is very simple. Instead of redefining the `OptionalProps` property, we define a generic type argument on the `BaseEntity` class and pass `Article` specific properties down to the base entity. base.entity.ts ``` export abstract class BaseEntity { [OptionalProps]?: 'createdAt' | 'updatedAt' | Optional; // all properties remain the same } ``` We picked the default value of `never` for our type - this is because a union with `never` will always yield the same type, e.g. `string | never` is the same as just `string`. article.entity.ts ``` export class Article extends BaseEntity<'slug' | 'description'> { // all properties remain the same } ``` Now the [`em.create()`](https://mikro-orm.io/api/core/class/EntityManager.md#create) call work even without the `slug` and \`description: ``` const article = em.create(Article, { title: 'Foo is Bar', text: 'Lorem impsum dolor sit amet', author: user.id, }); console.log(article); ``` Running `npm start` we can see the `slug` and `description` populated with generated values: ``` Article { id: 1, createdAt: 2022-09-11T16:08:16.489Z, updatedAt: 2022-09-11T16:08:16.489Z, slug: 'foo-is-bar', title: 'Foo is Bar', description: 'Lorem impsum dolor sit amet…', text: 'Lorem impsum dolor sit amet', author: (User) { id: '1' } } ``` #### Alternative approach with `Opt` type[​](#alternative-approach-with-opt-type "Direct link to alternative-approach-with-opt-type") Another way to make TypeScript aware of what properties are optional is the `Opt` type, you can intersect it with the actual property type. This way the above problem with extending classes is no longer present, as we operate on property level: article.entity.ts ``` export class Article extends BaseEntity { @Property({ unique: true }) slug: string & Opt; @Property({ length: 1000 }) description: Opt; // can be used via generics too // ... } ``` To make a nullable field required in methods like `em.create()` (i.e. you cannot omit the property), use `RequiredNullable` type. Such property needs to be provided explicitly in the `em.create()` method, but will accept a `null` value. article.entity.ts ``` export class Article extends BaseEntity { @Property({ length: 1000 }) description: RequiredNullable; // ... } em.create(Article, { description: "Description!" }); // ok em.create(Article, { description: null }); // ok em.create(Article, {}); // compile error: missing description ``` ## Populating relationships[​](#populating-relationships "Direct link to Populating relationships") What if we want to fetch the `Article` together with the `author` relation? We can use `populate` hints for that: server.ts ``` // clear the context to simulate fresh request em.clear(); // find article by id and populate its author const articleWithAuthor = await em.findOne(Article, article.id, { populate: ['author'] }); console.log(articleWithAuthor); ``` Run the `npm start` as usual: ``` [query] select `a0`.`id`, `a0`.`created_at`, `a0`.`updated_at`, `a0`.`slug`, `a0`.`title`, `a0`.`description`, `a0`.`author_id` from `article` as `a0` where `a0`.`id` = 1 limit 1 [took 1 ms] [query] select `u0`.* from `user` as `u0` where `u0`.`id` in (1) order by `u0`.`id` asc [took 0 ms] Article { id: 1, createdAt: 2022-09-11T16:57:57.941Z, updatedAt: 2022-09-11T16:57:57.941Z, slug: 'foo-is-bar', title: 'Foo is Bar', description: 'Lorem impsum dolor sit amet…', text: undefined, author: User { id: 1, fullName: 'Foo Bar', email: 'foo@bar.com', password: '123456', bio: '' } } ``` ### Lazy scalar properties[​](#lazy-scalar-properties "Direct link to Lazy scalar properties") You can see the `text` property being `undefined` - this is because we marked it as `lazy`, therefore the value is not automatically selected. If we add the `text` to populate hint, we will get the value: server.ts ``` const articleWithAuthor = await em.findOne(Article, article.id, { populate: ['author', 'text'], }); ``` Or if the entity is already loaded, you can use `em.populate()`: server.ts ``` const articleWithAuthor = await em.findOne(Article, article.id, { populate: ['author'], }); await em.populate(articleWithAuthor!, ['text']); ``` ### Loading strategies[​](#loading-strategies "Direct link to Loading strategies") You can see two queries being fired, one for loading the `Article` entity, another loading the `author` relation (so a `User` entity). Why not a single joined query? This is mostly a historic reason, but MikroORM was originally born as a MongoDB-only ORM, and as such, using separate queries for each database table was the best approach to bring such functionality. This default behavior is called `LoadStrategy.SELECT_IN`. If you want to have a single query that will be joining the two tables instead of this, use `LoadStrategy.JOINED`: server.ts ``` const articleWithAuthor = await em.findOne(Article, article.id, { populate: ['author', 'text'], strategy: LoadStrategy.JOINED, }); ``` Which yields: ``` [query] select `a0`.`id`, `a0`.`created_at`, `a0`.`updated_at`, `a0`.`slug`, `a0`.`title`, `a0`.`description`, `a0`.`text`, `a0`.`author_id`, `a1`.`id` as `a1__id`, `a1`.`full_name` as `a1__full_name`, `a1`.`email` as `a1__email`, `a1`.`password` as `a1__password`, `a1`.`bio` as `a1__bio` from `article` as `a0` left join `user` as `a1` on `a0`.`author_id` = `a1`.`id` where `a0`.`id` = 1 [took 1 ms] Article { id: 1, createdAt: 2022-09-11T17:09:10.984Z, updatedAt: 2022-09-11T17:09:10.984Z, slug: 'foo-is-bar', title: 'Foo is Bar', description: 'Lorem impsum dolor sit amet…', text: 'Lorem impsum dolor sit amet', author: User { id: 1, fullName: 'Foo Bar', email: 'foo@bar.com', password: '123456', bio: '' } } ``` > Both approaches have their pros and cons, use the one that suite best the use case at hand. If you want, you can change the loading strategy globally via `loadStrategy` option in the ORM config. ### Serialization[​](#serialization "Direct link to Serialization") What about the password? Seeing the logger `Article` entity with populated `author`, there is something we need to fix. We can see the user's password, in plain text! We will need to hash it and ensure it never leaks to the API response by adding `hidden` serialization flag. Moreover, we can mark it as `lazy`, just like we did with the `Article.text`, as we rarely want to select it. For now, let's use `sha256` algorithm which we can create synchronously, and hash the value inside the constructor: user.entity.ts ``` import crypto from 'crypto'; @Entity() export class User extends BaseEntity<'bio'> { @Property() fullName: string; @Property() email: string; @Property({ hidden: true, lazy: true }) password: string; @Property({ type: 'text' }) bio = ''; constructor(fullName: string, email: string, password: string) { super(); this.fullName = fullName; this.email = email; this.password = User.hashPassword(password); } static hashPassword(password: string) { return crypto.createHmac('sha256', password).digest('hex'); } } ``` Now change the part where we create our `User` entity, as the constructor is now required: ``` const user = new User('Foo Bar', 'foo@bar.com', '123456'); console.log(user); ``` After running `npm start`, you can see that the password is hashed, and later when you load the `Article.author`, the password is no longer selected: ``` User { id: undefined, createdAt: 2022-09-11T17:22:31.619Z, updatedAt: 2022-09-11T17:22:31.619Z, fullName: 'Foo Bar', email: 'foo@bar.com', password: 'b946ccc987465afcda7e45b1715219711a13518d1f1663b8c53b848cb0143441', bio: '' } ``` That should be good enough for the time being. Don't worry, we will improve on this, later on, using `argon2` via lifecycle hooks, but first things first! ## Collections: OneToMany and ManyToMany[​](#collections-onetomany-and-manytomany "Direct link to Collections: OneToMany and ManyToMany") You got the `User` entity opened, let's add one more property to it. You have the `Article.author` property that defines the owning side of this relationship between `Article` and `User` entities. Now define the inverse side—for ManyToOne relation it is the OneToMany kind—represented by a `Collection` of `Article` entities: ``` @Entity() export class User extends BaseEntity<'bio'> { // ... @OneToMany({ mappedBy: 'author' }) articles = new Collection
(this); } ``` MikroORM represents the relation via the `Collection` class. Before we dive into what it means, let's add one more entity to the `Article` module to test the ManyToMany relation too. It will be a `Tag` entity, so we can categorize the article based on some dynamically defined tags. > The `Tag` entity semantically belongs to the `Article` module, so let's put it there, to the `src/modules/article/tag.entity.ts` file. tag.entity.ts ``` import { Collection, Entity, ManyToMany, Property } from '@mikro-orm/core'; import { Article } from './article.entity.js'; import { BaseEntity } from '../common/base.entity.js'; @Entity() export class Tag extends BaseEntity { @Property({ length: 20 }) name!: string; @ManyToMany({ mappedBy: 'tags' }) articles = new Collection
(this); } ``` And we need to define the owning side too, which is `Article.tags`: article.entity.ts ``` @ManyToMany() tags = new Collection(this); ``` It is enough to point to the owning side via `mappedBy` option from the inverse side (or vice versa). If you want to define the relation from owning side, use `inversedBy` option. A ManyToMany relation that does not define any of those two is always considered the owning side. article.entity.ts ``` @ManyToMany({ inversedBy: 'articles' }) tags = new Collection(this); ``` ### Working with collections[​](#working-with-collections "Direct link to Working with collections") The `Collection` class implements the [iterable protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#the_iterable_protocol), so you can use `for of` loop to iterate through it. Another way to access collection items is to use bracket syntax like when we access array items. Keep in mind that this approach will not check if the collection is initialized, while using the `getItems()` method will throw an error in this case. > Note that array access in `Collection` is available only for reading already loaded items, we cannot add new items to `Collection` this way. To get all entities stored in a `Collection`, we can use `getItems()` method. It will throw in case the `Collection` is not initialized. If we want to disable this validation, we can use `getItems(false)`. This will give us the entity instances managed by the identity map. Alternatively, you can use `toArray()` which will serialize the `Collection` to an array of DTOs. Modifying those will have no effect on the actual entity instances. `em.findOneOrFail()` So far we used `em.findOne()` which can return `null` if the entity is not found in the database. This results in extensive usage of the non-null assertion operator in TypeScript, which can get messy. A better solution is to use `em.findOneOrFail()`, which always returns the entity or throws an error, namely an instance of `NotFoundError` provided by the ORM. ``` // clear the context to simulate fresh request em.clear(); // populating User.articles collection const user = await em.findOneOrFail(User, 1, { populate: ['articles'] }); console.log(user); // or you could lazy load the collection later via `init()` method if (!user.articles.isInitialized()) { await user.articles.init(); } // to ensure collection is loaded (but do nothing if it already is), use `loadItems()` method await user.articles.loadItems(); for (const article of user.articles) { console.log(article.title); console.log(article.author.fullName); // the `article.author` is linked automatically thanks to the Identity Map } ``` > `Collection.init()` will always query the database, while `Collection.loadItems()` does only if the collection is not yet initialized, so calling `Collection.loadItems()` is safe without previous `isInitialized()` check. Running this, we get the following: ``` User { id: 1, createdAt: 2022-09-11T18:18:14.376Z, updatedAt: 2022-09-11T18:18:14.376Z, fullName: 'Foo Bar', email: 'foo@bar.com', password: undefined, bio: '', articles: Collection
{ '0': Article { id: 1, createdAt: 2022-09-11T18:18:14.384Z, updatedAt: 2022-09-11T18:18:14.384Z, slug: 'foo-is-bar', title: 'Foo is Bar', description: 'Lorem impsum dolor sit amet…', text: undefined, author: [User], tags: [Collection] }, initialized: true, dirty: false } } ``` Now try to add some tags to the first article: server.ts ``` // create some tags and assign them to the first article const [article] = user.articles; const newTag = em.create(Tag, { name: 'new' }); const oldTag = em.create(Tag, { name: 'old' }); article.tags.add(newTag, oldTag); await em.flush(); console.log(article.tags); ``` And just for the sake of it, try to remove one of the tags: server.ts ``` // to remove items from collection, we first need to initialize it, we can use `init()`, `loadItems()` or `em.populate()` await em.populate(article, ['tags']); // remove 'old' tag by reference article.tags.remove(oldTag); // or via callback article.tags.remove(t => t.id === oldTag.id); await em.flush(); ``` Refer to the [Collections section](https://mikro-orm.io/docs/collections.md) in the docs for more information and examples. # Events and life cycle hooks Time to improve our password hashing. Let's use the `argon2` package, which provides `hash` and `verify` functions. They are both async, so we cannot use them inside the entity constructor like before. Instead, we need to use the lifecycle hooks, namely `@BeforeCreate()` and `@BeforeUpdate()`. > Don't forget to install the `argon2` package via `npm install argon2`. The plan is following: * the password will remain in plaintext when assigned via the constructor * `hashPassword` function will become an event handler, we decorate it with `@BeforeCreate()` and `@BeforeUpdate()` * as such, it will get the `EventArgs` parameter during the flush, we use that to detect if the password property changed * the `args.changeSet` holds the `ChangeSet` object defining the metadata about the entity and its state * `ChangeSet.payload` holds the actual computed difference * we add a new `verifyPassword()` method to the `User` entity to later ``` import { hash, verify } from 'argon2'; export class User extends BaseEntity<'bio'> { // ... constructor(fullName: string, email: string, password: string) { super(); this.fullName = fullName; this.email = email; this.password = password; // keep plain text, will be hashed via hooks } @BeforeCreate() @BeforeUpdate() async hashPassword(args: EventArgs) { // hash only if the password was changed const password = args.changeSet?.payload.password; if (password) { this.password = await hash(password); } } async verifyPassword(password: string) { return verify(this.password, password); } } ``` ## ⛳ Checkpoint 2[​](#-checkpoint-2 "Direct link to ⛳ Checkpoint 2") We added 2 new entities: `Article` and `Tag` and a common `BaseEntity`. You can find working StackBlitz for the current state here: > Due to the nature of how the ESM support in ts-node works, it is not possible to use it inside StackBlitz project - we need to use `node --loader` instead. We also use in-memory database, SQLite feature available via special database name `:memory:`. This is our [`server.ts` file](https://stackblitz.com/edit/mikro-orm-getting-started-guide-cp-2?file=src%2Fserver.ts) after this chapter: --- # Source: https://mikro-orm.io/docs/repositories.md # Entity Repository Entity Repositories are thin layers on top of `EntityManager`. They act as an extension point, so you can add custom methods, or even alter the existing ones. The default `EntityRepository` implementation just forwards the calls to underlying `EntityManager` instance. > `EntityRepository` class carries the entity type, so you do not have to pass it to every `find` or `findOne` calls. ``` const booksRepository = em.getRepository(Book); // same as `em.find(Book, { author: '...' }, { ... })` const books = await booksRepository.find({ author: '...' }, { populate: ['author'], limit: 1, offset: 2, orderBy: { title: QueryOrder.DESC }, }); console.log(books); // Book[] ``` ## Custom Repository[​](#custom-repository "Direct link to Custom Repository") info Since v4, you need to make sure you are working with correctly typed `EntityRepository` to have access to driver specific methods (like `createQueryBuilder()`). Use the one exported from your driver package. To use custom repository, just extend `EntityRepository` class: ``` import { EntityRepository } from '@mikro-orm/mysql'; // or any other driver package export class CustomAuthorRepository extends EntityRepository { // custom methods... public findAndUpdate(...) { // ... } } ``` And register the repository via `@Entity` decorator: ``` @Entity({ repository: () => CustomAuthorRepository }) export class Author { // ... } ``` > `@Repository()` decorator has been removed in v5, use `@Entity({ repository: () => MyRepository })` instead. Note that you need to pass that repository reference inside a callback so you will not run into circular dependency issues when using entity references inside that repository. Now you can access your custom repository via `em.getRepository()` method. ### Inferring custom repository type[​](#inferring-custom-repository-type "Direct link to Inferring custom repository type") To have the `em.getRepository()` method return correctly typed custom repository instead of the generic `EntityRepository`, you can use `EntityRepositoryType` symbol: ``` @Entity({ repository: () => AuthorRepository }) export class Author { [EntityRepositoryType]?: AuthorRepository; } const repo = em.getRepository(Author); // repo has type AuthorRepository ``` > You can also register custom base repository (for all entities where you do not specify `repository`) globally, via `MikroORM.init({ entityRepository: CustomBaseRepository })`. ## Removed methods from `EntityRepository` interface[​](#removed-methods-from-entityrepository-interface "Direct link to removed-methods-from-entityrepository-interface") Following methods are no longer available on the `EntityRepository` instance since v6: * `persist` * `persistAndFlush` * `remove` * `removeAndFlush` * `flush` They were confusing as they gave a false sense of working with a scoped context (e.g. only with a `User` type), while in fact, they were only shortcuts for the same methods of underlying `EntityManager`. You should work with the `EntityManager` directly instead of using a repository when it comes to entity persistence, repositories should be treated as an extension point for custom logic (e.g. wrapping query builder usage). > Alternatively, you can use the `repository.getEntityManager()` method to access those methods directly on the `EntityManager`. If you want to keep those methods on repository level, you can define custom base repository and use it globally: ``` import { EntityManager, EntityRepository, AnyEntity } from '@mikro-orm/mysql'; export class ExtendedEntityRepository extends EntityRepository { persist(entity: AnyEntity | AnyEntity[]): EntityManager { return this.em.persist(entity); } async persistAndFlush(entity: AnyEntity | AnyEntity[]): Promise { await this.em.persistAndFlush(entity); } remove(entity: AnyEntity): EntityManager { return this.em.remove(entity); } async removeAndFlush(entity: AnyEntity): Promise { await this.em.removeAndFlush(entity); } async flush(): Promise { return this.em.flush(); } } ``` And specify it in the ORM config: ``` MikroORM.init({ entityRepository: ExtendedEntityRepository, }) ``` You might as well want to use the `EntityRepositoryType` symbol, possibly in a custom base entity. --- # Source: https://mikro-orm.io/docs/schema-first-guide.md # Schema First Guide Although MikroORM is primarily a "code first" ORM, it can also be used in a "schema first" approach. ## "Code first" vs "Schema first"[​](#code-first-vs-schema-first "Direct link to \"Code first\" vs \"Schema first\"") As the names suggest, in a "code first" approach, you write the entity definitions first, and generate the schema definition out of that code (using the schema generator). As a last step, you execute the migration statements to the database server. In a "schema first" approach, you write the schema definition first (or in the case of migrations, write the migrations first), execute it, and generate the entity definitions out of the database (using the entity generator). Both approaches have some benefits and drawbacks. Code first: * ✅ No need to get familiar with all SQL options for defining tables, columns, indexes and foreign keys. (It helps if you are though) * ✅ Easy to port between different database engines (until you opt into engine-specific features) * ✅ It is trivial to rename tables and columns, as well as add and remove them... As long as you only do one of those three things per entity per migration. * ❌ If you aren’t careful, and do multiple changes to one entity in one go, database migrations can cause data loss. Careful manual review of generated migrations is needed to avoid this. * ❌ Performance may be suboptimal, as many database features are "out of sight, out of mind". * ❌ You may be missing out on possible M :N and 1 :N relations that would in turn make your application logic simpler. * ❌ Hard to port to and from a different ORM, as often times, features that are named the same may actually work differently, and conversely, the same features may be named differently. Schema first: * ✅ No need to get familiar with the ORM's options. (It helps if you are though) * ✅ Easy to port to and from a different ORM (including different versions of the same ORM), even if that ORM is in another language. * ✅ If you’re comfortable with SQL, it is trivial to add new tables, columns and relations, while keeping the entity definitions fully aware of all possible links, and your data safe. * ❌ Renames are a bit more involved, because the regenerated entities aren’t part of the rest of your code. * ❌ Sufficiently complex schemas can end up triggering bugs in entity generation, that you then need to patch in some way, before your application can even build. * ❌ You may be missing out on goodies from the ORM that make application logic simpler. * ❌ Likely harder to port to and from a different database engine, as even relatively "simple" database schemas are likely to end up needing database-specific features, which the entity generator will include where supported by the ORM. If using the database to its full potential, such a migration would be even more challenging. ## What are we building?[​](#what-are-we-building "Direct link to What are we building?") In the rest of this guide, we will be building an application after first having made the database schema. We'll end with the same application that you may have already created by following [the "code first" guide](https://mikro-orm.io/docs/guide.md), but re-create it from scratch again. Reading that guide beforehand is not strictly required, but we will make several references back to it as a point of comparison. To take a peek at the final project we will be building, try cloning the [`mikro-orm/schema-first-guide` GitHub project](https://github.com/mikro-orm/schema-first-guide). ``` git clone https://github.com/mikro-orm/schema-first-guide.git ``` We will use MySQL for this project. Other database engines follow the same process. We are also assuming you already have MySQL itself installed locally and can connect to it via the username "root" and no password. In general, if you're building an application from scratch (as opposed to migrating an existing application), you can use GUI tools (e.g. In the case of MySQL, this includes MySQL Workbench) to make this part of the process easier. Here's the MySQL DDL of our initial application (before later migrations), as dumped by a DB creation tool (in this case, MySQL Workbench Forward Engineering): schema.sql ``` -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; -- ----------------------------------------------------- -- Schema blog -- ----------------------------------------------------- -- ----------------------------------------------------- -- Schema blog -- ----------------------------------------------------- CREATE SCHEMA IF NOT EXISTS `blog` DEFAULT CHARACTER SET utf8 ; USE `blog` ; -- ----------------------------------------------------- -- Table `user` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `user` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `full_name` VARCHAR(255) NOT NULL, `email` VARCHAR(255) NOT NULL, `password` VARCHAR(255) NOT NULL, `bio` TEXT NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `article` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `article` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `slug` VARCHAR(255) NOT NULL, `title` VARCHAR(255) NOT NULL, `description` VARCHAR(1000) NOT NULL, `text` TEXT NOT NULL, `author` INT UNSIGNED NOT NULL, PRIMARY KEY (`id`), UNIQUE INDEX `slug_UNIQUE` (`slug` ASC) VISIBLE, INDEX `fk_article_user1_idx` (`author` ASC) VISIBLE, CONSTRAINT `fk_article_user1` FOREIGN KEY (`author`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `comment` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `comment` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `text` VARCHAR(1000) NOT NULL, `article` INT UNSIGNED NOT NULL, `author` INT UNSIGNED NOT NULL, PRIMARY KEY (`id`), INDEX `fk_comment_article1_idx` (`article` ASC) VISIBLE, INDEX `fk_comment_user1_idx` (`author` ASC) VISIBLE, CONSTRAINT `fk_comment_article1` FOREIGN KEY (`article`) REFERENCES `article` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_comment_user1` FOREIGN KEY (`author`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `tag` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `tag` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `name` VARCHAR(20) NOT NULL, PRIMARY KEY (`id`)) ENGINE = InnoDB; -- ----------------------------------------------------- -- Table `article_tag` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `article_tag` ( `article_id` INT UNSIGNED NOT NULL, `tag_id` INT UNSIGNED NOT NULL, PRIMARY KEY (`article_id`, `tag_id`), INDEX `fk_article_tag_tag1_idx` (`tag_id` ASC) VISIBLE, CONSTRAINT `fk_article_tag_article1` FOREIGN KEY (`article_id`) REFERENCES `article` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_article_tag_tag1` FOREIGN KEY (`tag_id`) REFERENCES `tag` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; ``` But we can place this in an initial migration file, to make our application work on blank MySQL servers as well. We will use MikroORM's migrator to run our migrations, including the initial one. If you were migrating an existing application to MikroORM, you can instead keep doing the migrations in your existing setup, and regenerate your entities on every migration. Once you fully drop your old application, you can generate an initial migration in MikroORM. ## Project setup[​](#project-setup "Direct link to Project setup") ### Install[​](#install "Direct link to Install") We will use a similar setup to [the "code first" guide](https://mikro-orm.io/docs/guide.md). Create a folder and cd into it: ``` mkdir blog-api && cd blog-api ``` Init the project: * npm * Yarn * pnpm * Bun ``` npm init ``` ``` yarn init ``` ``` pnpm init ``` ``` bun init ``` Install the following: * npm * Yarn * pnpm * Bun ``` npm install @mikro-orm/core \ @mikro-orm/mysql \ @mikro-orm/migrations \ fastify ``` ``` yarn add @mikro-orm/core \ @mikro-orm/mysql \ @mikro-orm/migrations \ fastify ``` ``` pnpm add @mikro-orm/core \ @mikro-orm/mysql \ @mikro-orm/migrations \ fastify ``` ``` bun add @mikro-orm/core \ @mikro-orm/mysql \ @mikro-orm/migrations \ fastify ``` and some dev dependencies * npm * Yarn * pnpm * Bun ``` npm install --save-dev @mikro-orm/cli \ @mikro-orm/entity-generator \ typescript \ ts-node \ @types/node \ rimraf \ vitest ``` ``` yarn add --dev @mikro-orm/cli \ @mikro-orm/entity-generator \ typescript \ ts-node \ @types/node \ rimraf \ vitest ``` ``` pnpm add --save-dev @mikro-orm/cli \ @mikro-orm/entity-generator \ typescript \ ts-node \ @types/node \ rimraf \ vitest ``` ``` bun add --dev @mikro-orm/cli \ @mikro-orm/entity-generator \ typescript \ ts-node \ @types/node \ rimraf \ vitest ``` ### ECMAScript Modules[​](#ecmascript-modules "Direct link to ECMAScript Modules") Just [as in the "code first" guide](https://mikro-orm.io/docs/guide/first-entity.md#ecmascript-modules), we'll be using ECMAScript Modules. Make sure you have package.json ``` { "type": "module", ... } ``` in your package.json file. > Note that we don't *have to* use ECMAScript Modules. MikroORM also supports CommonJS. We are using it for the guides, because we are making a new project, in which we *can* use it, as all of our dependencies are ready for ECMAScript Modules. ### Configuring TypeScript[​](#configuring-typescript "Direct link to Configuring TypeScript") We will use almost the same config [as the "code first" guide one](https://mikro-orm.io/docs/guide/first-entity.md#configuring-typescript). As mentioned there, already, adjust this config if you know what you’re doing. We'll include the ts-node config, and add `emitDecoratorMetadata`, because we'll be using the default metadata provider, which requires that of our TypeScript config. tsconfig.json ``` { "compilerOptions": { "module": "NodeNext", "moduleResolution": "NodeNext", "target": "ES2022", "strict": true, "outDir": "dist", "declaration": true, "emitDecoratorMetadata": true, "experimentalDecorators": true }, "include": [ "./src/**/*.ts" ], "ts-node": { "esm": true, "transpileOnly": true } } ``` ### Configuring the CLI[​](#configuring-the-cli "Direct link to Configuring the CLI") Configuring the MikroORM CLI tools is essential for the "schema first" approach. We need the migrator to run our migrations, as well as the entity generator to create our entities out of the schema state. Here's a basic config we'll start with (and later extend to take full advantage of the entity generator's features): src/mikro-orm.config.ts ``` import { defineConfig } from '@mikro-orm/mysql'; import { EntityGenerator } from '@mikro-orm/entity-generator'; import { Migrator } from '@mikro-orm/migrations'; export default defineConfig({ multipleStatements: true, extensions: [EntityGenerator, Migrator], discovery: { // we need to disable validation for no entities, due to the entity generation warnWhenNoEntities: false, }, entities: ['dist/**/*.entity.js'], entitiesTs: ['src/**/*.entity.ts'], host: 'localhost', user: 'root', password: '', dbName: 'blog', // enable debug mode to log SQL queries and discovery information debug: true, migrations: { path: 'dist/migrations', pathTs: 'src/migrations', }, entityGenerator: { save: true, path: 'src/modules', esmImport: true, readOnlyPivotTables: true, outputPurePivotTables: true, bidirectionalRelations: true, customBaseEntityName: 'Base', useCoreBaseEntity: true, }, }); ``` And you can also add to your package.json package.json ``` { "mikro-orm": { "useTsNode": true } } ``` Or alternatively, set the environment variable `MIKRO_ORM_CLI_USE_TS_NODE` to a non-empty value. To keep the example simple, we're having all of our configuration in a single config file, but you may split your config into a shared config and a tool specific config. In that case, you will want to also supply the correct config file for the correct tool upon running it. You will want to wrap those calls in package.json scripts that do that for you. ## Generating initial entities[​](#generating-initial-entities "Direct link to Generating initial entities") We'll first generate and run an initial migration to generate entities out of. We'll need to add the "--blank" option to make it ok for the migration generator that we don't currently have any entities. Run ``` npx mikro-orm-esm migration:create --initial --blank ``` And let's edit it to include the contents of the schema: migrations/Migration00000000000000.ts ``` import { Migration } from '@mikro-orm/migrations'; export class Migration00000000000000 extends Migration { async up(): Promise { await this.execute(` CREATE TABLE IF NOT EXISTS \`user\` ( \`id\` INT UNSIGNED NOT NULL AUTO_INCREMENT, \`created_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \`updated_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, \`full_name\` VARCHAR(255) NOT NULL, \`email\` VARCHAR(255) NOT NULL, \`password\` VARCHAR(255) NOT NULL, \`bio\` TEXT NOT NULL, PRIMARY KEY (\`id\`)) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS \`article\` ( \`id\` INT UNSIGNED NOT NULL AUTO_INCREMENT, \`created_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \`updated_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, \`slug\` VARCHAR(255) NOT NULL, \`title\` VARCHAR(255) NOT NULL, \`description\` VARCHAR(1000) NOT NULL, \`text\` TEXT NOT NULL, \`author\` INT UNSIGNED NOT NULL, PRIMARY KEY (\`id\`), UNIQUE INDEX \`slug_UNIQUE\` (\`slug\` ASC) VISIBLE, INDEX \`fk_article_user1_idx\` (\`author\` ASC) VISIBLE, CONSTRAINT \`fk_article_user1\` FOREIGN KEY (\`author\`) REFERENCES \`user\` (\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS \`comment\` ( \`id\` INT UNSIGNED NOT NULL AUTO_INCREMENT, \`created_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \`updated_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, \`text\` VARCHAR(1000) NOT NULL, \`article\` INT UNSIGNED NOT NULL, \`author\` INT UNSIGNED NOT NULL, PRIMARY KEY (\`id\`), INDEX \`fk_comment_article1_idx\` (\`article\` ASC) VISIBLE, INDEX \`fk_comment_user1_idx\` (\`author\` ASC) VISIBLE, CONSTRAINT \`fk_comment_article1\` FOREIGN KEY (\`article\`) REFERENCES \`article\` (\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT \`fk_comment_user1\` FOREIGN KEY (\`author\`) REFERENCES \`user\` (\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS \`tag\` ( \`id\` INT UNSIGNED NOT NULL AUTO_INCREMENT, \`created_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, \`updated_at\` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, \`name\` VARCHAR(20) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS \`article_tag\` ( \`article_id\` INT UNSIGNED NOT NULL, \`tag_id\` INT UNSIGNED NOT NULL, PRIMARY KEY (\`article_id\`, \`tag_id\`), INDEX \`fk_article_tag_tag1_idx\` (\`tag_id\` ASC) VISIBLE, CONSTRAINT \`fk_article_tag_article1\` FOREIGN KEY (\`article_id\`) REFERENCES \`article\` (\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT \`fk_article_tag_tag1\` FOREIGN KEY (\`tag_id\`) REFERENCES \`tag\` (\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; `); } } ``` Then run the migration with ``` npx mikro-orm-esm migration:up ``` And now, you can generate the initial entities with ``` npx mikro-orm-esm generate-entities --save ``` If all is good to this point, you should be seeing the following directory structure ``` ├── package.json ├── src │ ├── mikro-orm.config.ts │ └── modules │ ├── Article.ts │ ├── ArticleTag.ts │ ├── Base.ts │ ├── Comment.ts │ ├── Tag.ts │ └── User.ts └── tsconfig.json ``` ## Manipulating entity file locations and names[​](#manipulating-entity-file-locations-and-names "Direct link to Manipulating entity file locations and names") You may have noticed that the files aren’t following the `*.entity.ts` suffix we configured initially. Further, they're all under one folder. Both of these are because of the default names the entity generator uses. We can override the `fileName` option in the config to save our files in different locations, and add suffixes: src/mikro-orm.config.ts ``` import { defineConfig } from '@mikro-orm/mysql'; import { EntityGenerator } from '@mikro-orm/entity-generator'; import { Migrator } from '@mikro-orm/migrations'; export default defineConfig({ // rest of the config entityGenerator: { fileName: (entityName) => { switch (entityName) { case 'Article': case 'ArticleTag': case 'Tag': case 'Comment': return `article/${entityName.toLowerCase()}.entity`; case 'User': return `user/${entityName.toLowerCase()}.entity`; default: return `common/${entityName.toLowerCase()}.entity`; } }, // rest of the entity generator config } }); ``` If you first remove all files from the modules folder (or just remove the modules folder itself), and then re-run the entity generator, you should now instead see the following directory structure: ``` ├── package.json ├── src │ ├── mikro-orm.config.ts │ └── modules │ ├── article │ │ ├── article.entity.ts │ │ ├── articletag.entity.ts │ │ ├── tag.entity.ts │ │ └── comment.entity.ts │ ├── common │ │ └── base.entity.ts │ └── user │ └── user.entity.ts └── tsconfig.json ``` When re-generating the entities later, you will want to first remove all files with the suffix ".entity.ts". ``` npx rimraf -g ./src/modules/**/*.entity.ts ``` Because we'll be regenerating entities a lot, and doing so requires removal of the old ones first, let's add a script in package.json for that: package.json ``` "scripts": { "regen": "rimraf -g ./src/modules/**/*.entity.ts && mikro-orm-esm generate-entities --save" } ``` And now, you can call * npm * Yarn * pnpm * Bun ``` npm run regen ``` ``` yarn regen ``` ``` pnpm run regen ``` ``` bun run regen ``` ## Using the generated entities[​](#using-the-generated-entities "Direct link to Using the generated entities") Because the generated entities now match our runtime configuration, we can init the ORM in our application, and they should be picked up. We're going to use a similar approach for our application organization as the one in the "code first" guide. Specifically, our DB wrapper: src/db.ts ``` import { type EntityManager, type EntityRepository, MikroORM, type Options, } from "@mikro-orm/mysql"; import config from "./mikro-orm.config.js"; import { Article } from "./modules/article/article.entity.js"; import { Tag } from "./modules/article/tag.entity.js"; import { User } from "./modules/user/user.entity.js"; import { Comment } from "./modules/article/comment.entity.js"; export interface Services { orm: MikroORM; em: EntityManager; user: EntityRepository; article: EntityRepository
; tag: EntityRepository; comment: EntityRepository; } let cache: Services; export async function initORM(options?: Options): Promise { if (cache) { return cache; } const orm = await MikroORM.init({ ...config, ...options, }); return (cache = { orm, em: orm.em, user: orm.em.getRepository(User), article: orm.em.getRepository(Article), tag: orm.em.getRepository(Tag), comment: orm.em.getRepository(Comment), }); } ``` The app itself: src/app.ts ``` import { RequestContext } from '@mikro-orm/core'; import { fastify } from 'fastify'; import { initORM } from './db.js'; export async function bootstrap(port = 3001, migrate = true) { const db = await initORM({ ensureDatabase: { create: false }, }); if (migrate) { // sync the schema await db.orm.migrator.up(); } const app = fastify(); // register request context hook app.addHook('onRequest', (request, reply, done) => { RequestContext.create(db.em, done); }); // shut down the connection when closing the app app.addHook('onClose', async () => { await db.orm.close(); }); // register routes here app.get('/article', async (request) => { const { limit, offset } = request.query as { limit?: number; offset?: number; }; const [items, total] = await db.article.findAndCount( {}, { limit, offset, } ); return { items, total }; }); const url = await app.listen({ port }); return { app, url }; } ``` And the server entry point: src/server.ts ``` import { bootstrap } from './app.js'; try { const { url } = await bootstrap(); console.log(`server started at ${url}`); } catch (e) { console.error(e); } ``` Finally, let's add a script in package.json to start the application, as well as a script to check our code: package.json ``` { "scripts": { "check": "tsc --noEmit", "start": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/server.ts" } } ``` While you don’t need to run the check script before starting the application, you may find it convenient to check for errors after significant changes. ## ⛳ Checkpoint 1[​](#-checkpoint-1 "Direct link to ⛳ Checkpoint 1") At this point, we have an application similar to the one at ["Checkpoint 3" of the "code first" guide](https://mikro-orm.io/docs/guide/project-setup.md#-checkpoint-3). The application itself can only list articles, which don’t exist yet, unless we manually add them with SQL queries. However, we already defined all the entities we'll use. We'll later do some tweaks on top of the generated entities to showcase the full extent of the entity generator's features in a useful way. However, you're already at a point where you can use the generated entities "as is" in your application code, and code the remaining logic around them. You can verify the application is working ok by starting it, and opening in your browser. ## Making changes to existing tables and columns[​](#making-changes-to-existing-tables-and-columns "Direct link to Making changes to existing tables and columns") Given the current simplicity of our application, we don't have to worry about compatibility. We can just run ``` npx mikro-orm-esm migration:create --blank ``` to create a new empty migration, prepare whatever SQL statements we need to perform in it, run ``` npx mikro-orm-esm migration:up ``` and finally re-generate the entities with * npm * Yarn * pnpm * Bun ``` npm run regen ``` ``` yarn regen ``` ``` pnpm run regen ``` ``` bun run regen ``` This flow gets a bit more complex once your application grows enough that the rest of your code actually references individual entities and properties, meaning you can't remove or rename things without considering these usages. ### Renaming existing tables and columns[​](#renaming-existing-tables-and-columns "Direct link to Renaming existing tables and columns") When you would like to rename a table or a column, or even adjust the names of classes and properties, you should do so in code first. Use your IDE to rename all usages. In the case of class names, you should also rename the file and its imports. Once you’ve done so, you can then continue with the rest of the flow as shown above - create a migration in which you do the rename in the database, run it, and regenerate the entities. Try to rebuild your application immediately after entity regeneration. The old files (that you had edited manually) will be removed, but that is ok, because thanks to the migration, the new ones will now have the correct names already working with the rest of your application. It is possible that entity regeneration will reveal some relations which were also renamed, due to being named after the table/column that you renamed. In that event, your application will fail to build. You will want to restore your earlier entities from version control, and rename the affected relations, before regenerating the entities again, and trying to build again. Note that with such database renames, any running application instance will break, since it will be referring to a now non-existent name. When running in production, you will want to avoid renames, and instead use the "expand, then contract" migration strategy. ### "Expand, then contract" migration strategy[​](#expand-then-contract-migration-strategy "Direct link to \"Expand, then contract\" migration strategy") The way "Expand, then contract" migration strategy works is that you have to do (in this order) the following: 1. Create the new table/column (as a migration + entity regeneration) 2. Make the new version of your app write to both the old and new table/column (in the same deploy as with step 1 if and only if you also execute migrations automatically on run; otherwise, ensure migration from step 1 is executed before app run) 3. Copy over old data from the old table/column into the new table/column (in a second migration that doesn't require entity regeneration or application code changes) 4. Refactor any reads from the old table/column to use the new table/column instead (ideally after old data is already migrated). 5. After ensuring any read references to the old table/column are gone, stop writing to the old table/column (deploy changed application code without related migrations). 6. After ensuring any read and write references to the old table/column are gone, remove the old table/column (as a final migration + entity regeneration). Technically, you can also apply this strategy if you are using a "code first" approach, and in fact, you very much should. Failure to follow this strategy in a "code first" approach may lead to accidental data loss (unless you carefully review generated migrations), as well as downtime. Failure to follow this strategy in a "schema first" approach leads to downtime on production, and build errors during development. ### Naming strategy considerations[​](#naming-strategy-considerations "Direct link to Naming strategy considerations") The names of your tables and properties don’t have to match exactly the names of classes and properties in your application code. This is what the entity generator does by default to minimize surprises, but you can override this. Let's make it so that our tables use the plural form of words, while the entity class names will be singular. In the end, the application code will not need changes, because it is still referring to the singular word "article". First, let's add the package [pluralize](https://www.npmjs.com/package/pluralize), to do the transformation between singular and plural forms automatically. * npm * Yarn * pnpm * Bun ``` npm install --save-dev pluralize @types/pluralize ``` ``` yarn add --dev pluralize @types/pluralize ``` ``` pnpm add --save-dev pluralize @types/pluralize ``` ``` bun add --dev pluralize @types/pluralize ``` Next, let's add a migration to rename our tables: ``` npx mikro-orm-esm migration:create --blank ``` and in it, migrations/Migration00000000000001.ts ``` import { Migration } from '@mikro-orm/migrations'; export class Migration00000000000001 extends Migration { async up(): Promise { await this.execute(` RENAME TABLE \`article\` TO \`articles\`, \`article_tag\` TO \`article_tags\`, \`tag\` TO \`tags\`, \`comment\` TO \`comments\`, \`user\` TO \`users\` `); } async down(): Promise { await this.execute(` RENAME TABLE \`articles\` TO \`article\`, \`article_tags\` TO \`article_tag\`, \`tags\` TO \`tag\`, \`comments\` TO \`comment\`, \`users\` TO \`user\` `); } } ``` If you now just run the migration and regenerate, you will see your entities with plural form. To keep them in singular form, we can override the `getEntityName` method of the UnderscoreNamingStrategy (which is the default naming strategy). src/mikro-orm.config.ts ``` import { UnderscoreNamingStrategy } from "@mikro-orm/core"; import pluralize from 'pluralize'; // rest of imports export default defineConfig({ // rest of the config namingStrategy: class extends UnderscoreNamingStrategy { override getEntityName(tableName: string, schemaName?: string): string { return pluralize.singular(super.getEntityName(tableName, schemaName)); } }, entityGenerator: { // rest of entity generator config } }); ``` With this addition, if you regenerate the entities now, the classes, and the respective file names will now still be in singular form, as they were before. You may notice that the `tableName` option is also added to all entities. That is because there is a separate method in the naming strategy - `classToTableName` - about converting class names back to table names. The entity generator checks if this method produces the correct table, and if not, it adds the `tableName` option to ensure the correct table is used in the end. You may override the `classToTableName` method in the naming strategy if you wish to instead convert the singular form to plural automatically, and thus omit the `tableName` option once again. The entity generator will ensure that any errors made by "pluralize" would be mitigated by an explicit `tableName` entry. Alternatively, you may keep the `classToTableName` method to its default, and keep the `tableName` options around, to make your generated entities code searchable by the table names. There's also the `columnNameToProperty` method, which, as the name suggests, tells the entity generator what property name to produce for a given column name. Similarly, there is `propertyToColumnName` that does the reverse. If there is a mismatch between the two, the options `fieldName` or `fieldNames` will be filled with the names of the columns. ## Adding application level logic to entities[​](#adding-application-level-logic-to-entities "Direct link to Adding application level logic to entities") While there is a lot you can do on DB schema level with foreign key relations, check constraints, unique indexes and generated columns, there are some things that can't be determined by the schema alone. At the same time, in a "schema first" approach, you have to keep your entities able to be regenerated at any time. To bridge the gap between these two seemingly conflicting goals, the entity generator has two callbacks that it calls during the entity generation process. In them, you can manipulate the entity metadata, which will in turn influence the generated code in the end. You should keep your modifications during those hooks as simple as possible, to keep your code as portable as possible. The two configuration options are `onInitialMetadata` and `onProcessedMetadata`. The first is made immediately after getting the raw metadata from your database, and the second is run after the entity generator goes through all the things it normally infers automatically for you from that metadata. Things like M:N relations, inverse sides of relations, base class and more. You can think of `onInitialMetadata` as the place to opt into extra features, and `onProcessedMetadata` as the place to opt out of features that you were otherwise opted into. If you went through the whole "code first" guide before, and now are going over through this guide, you may have noticed that we are missing a few things in the entity definitions. Let's add some of them. First, let's make the "text" of the "article" be lazy. Also, let's make the "password" lazy too, as well as make it "hidden", to avoid accidentally leaking it in responses. We'll do that in the `onInitialMetadata` hook, though these changes in particular can be done in `onProcessedMetadata` just the same. src/mikro-orm.config.ts ``` // rest of imports export default defineConfig({ // rest of the config entityGenerator: { onInitialMetadata: (metadata, platform) => { const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { const passwordProp = userEntity.properties.password; passwordProp.hidden = true; passwordProp.lazy = true; } const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { const textProp = articleEntity.properties.text; textProp.lazy = true; } }, // rest of entity generator config } }); ``` When it comes to handling the password hashing and verification, we could register global hooks to handle the password. That would be similar to what the "code first" guide does, except doing that would not be doing it at the entity, but globally. A current limitation of the entity generator is that you can't add hooks to the entity itself. However, there is an easy workaround that you may in fact find more convenient and ultimately less magical to work with - custom types. That is, we can define a custom type object for the password, which will let us verify the password and hash it automatically on writes. Let's add this type, and make the password prop of the User entity use it. We'll use argon2 as the hashing function, so first, install it with * npm * Yarn * pnpm * Bun ``` npm install argon2 ``` ``` yarn add argon2 ``` ``` pnpm add argon2 ``` ``` bun add argon2 ``` The next step is to create the class that our DB value will be transformed to and from. Let's add it to the "users" module. We'll use the suffix "runtimeType" to make it clear this will be set as the runtime type at an entity. We'll also make the type automatically rehash the password on successful verification if needed. ``` import { hash, verify, needsRehash, Options } from 'argon2'; const hashOptions: Options = { hashLength: 100 }; export class Password { static async fromRaw(raw: string): Promise { return new Password(await hash(raw, hashOptions)); } static fromHash(hash: string): Password { return new Password(hash); } #hash: string; private constructor(hash: string) { this.#hash = hash; } verify(raw: string): Promise { return verify(this.#hash, raw, hashOptions); } needsRehash(): boolean { return needsRehash(this.#hash, hashOptions); } async verifyAndMaybeRehash(raw: string): Promise { const verifyResult = await this.verify(raw); if (verifyResult && this.needsRehash()) { this.#hash = await hash(raw, hashOptions); } return verifyResult; } toString() { return this.#hash; } } ``` and then add the ORM custom type that does the transformation: src/modules/user/password.type.ts ``` import { type Platform, type TransformContext, Type } from '@mikro-orm/core'; import { Password } from './password.runtimeType.js'; export class PasswordType extends Type { convertToJSValue(value: string, platform: Platform): Password { return Password.fromHash(value); } convertToDatabaseValue(value: Password, platform: Platform, context?: TransformContext): string { return `${value}`; } compareAsType() { return 'string'; } } ``` Now, let's modify our `fileName` and `onInitialMetadata` functions to recognize these two new files and associate the password with them. src/mikro-orm.config.ts ``` // rest of imports export default defineConfig({ // rest of the config entityGenerator: { fileName: (entityName) => { switch (entityName) { case 'Article': case 'ArticleTag': case 'Tag': case 'Comment': return `article/${entityName.toLowerCase()}.entity`; case 'User': return `user/${entityName.toLowerCase()}.entity`; case 'Password': return `user/password.runtimeType`; case 'PasswordType': return `user/password.type`; default: return `common/${entityName.toLowerCase()}.entity`; } }, onInitialMetadata: (metadata, platform) => { const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { const passwordProp = userEntity.properties.password; passwordProp.hidden = true; passwordProp.lazy = true; passwordProp.type = 'PasswordType'; passwordProp.runtimeType = 'Password'; } const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { const textProp = articleEntity.properties.text; textProp.lazy = true; } }, // rest of entity generator config } }); ``` After regeneration, you would be able to do the login in app.ts like so: src/app.ts ``` import { RequestContext, EntityData } from '@mikro-orm/core'; import { fastify } from 'fastify'; import { initORM } from './db.js'; import { User } from './modules/user/user.entity.js'; import { Password } from './modules/user/password.runtimeType.js'; const emptyHash = await Password.fromRaw(''); //... // register new user app.post('/sign-up', async request => { const body = request.body as EntityData; if (!body.email || !body.fullName || !body.password) { throw new Error('One of required fields is missing: email, fullName, password'); } if ((await db.user.count({ email: body.email })) > 0) { throw new Error('This email is already registered, maybe you want to sign in?'); } const user = db.user.create({ fullName: body.fullName, email: body.email, password: await Password.fromRaw(body.password), bio: body.bio ?? '', }); await db.em.persist(user).flush(); // after flush, we have the `user.id` set console.log(`User ${user.id} created`); return user; }); app.post('/sign-in', async request => { const { email, password } = request.body as { email: string; password: string }; const err = new Error('Invalid combination of email and password'); if (password === '' || email === '') { throw err; } const user = await db.user.findOne({ email }, { populate: ['password'], // password is a lazy property, we need to populate it }) // On failure, we return a pseudo user with an empty password hash. // This approach minimizes the effectiveness of timing attacks ?? { password: emptyHash }; if (await user.password.verifyAndMaybeRehash(password)) { await db.em.flush(); return user;//password is a hidden property, so it won't be returned, even on success. } throw err; }); ``` ### Naming strategy vs metadata hooks[​](#naming-strategy-vs-metadata-hooks "Direct link to Naming strategy vs metadata hooks") It may look like the naming strategy is a more specialized version of the metadata hooks, but there is also one critical difference between changing the name from one vs the other. With a naming strategy, all references are also updated with the new name. With a metadata hook, changing the "original" does not update any references to it. You may update the references yourself, but doing so is less efficient than just overriding the naming strategy. But efficiency aside, this "loophole" can in fact be beneficial. We can use mapped superclasses. To do that, rename an entity via the application hooks, and then create a class with the original name, to take the place of the original class. The new "manual" class should inherit from the generated class. This approach can be used to mitigate any shortcoming of the entity generator. Most notably, it is useful to create constructor functions and other helper methods, as the generator doesn’t give you any means to add such. Let's extend the article in this fashion. First, let's adjust our config. We should use a different suffix from ".entity" for our custom entity class, so that we don't wipe it upon regeneration. We'll also need to recognize these new suffixes as entities too. Let's use the suffix ".customEntity". We'll also need to adjust the fileName to give the proper paths, and do the rename of the original "Article" entity to something else in `onInitialMetadata`. Let's say we'll make it a convention for this project to prefix such class names with "\_". src/mikro-orm.config.ts ``` // rest of imports export default defineConfig({ // rest of the config entities: ['dist/**/*.customEntity.js', 'dist/**/*.entity.js'], entitiesTs: ['src/**/*.customEntity.ts', 'src/**/*.entity.ts'], // rest of the config entityGenerator: { fileName: (entityName) => { switch (entityName) { case '_Article': return `article/article.entity`; case 'Article': return `article/article.customEntity`; case 'ArticleTag': case 'Tag': case 'Comment': return `article/${entityName.toLowerCase()}.entity`; case 'User': return `user/${entityName.toLowerCase()}.entity`; case 'Password': return `user/password.runtimeType`; case 'PasswordType': return `user/password.type`; default: return `common/${entityName.toLowerCase()}.entity`; } }, onInitialMetadata: (metadata, platform) => { const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { const passwordProp = userEntity.properties.password; passwordProp.hidden = true; passwordProp.lazy = true; passwordProp.type = 'PasswordType'; passwordProp.runtimeType = 'Password'; } const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { articleEntity.className = '_Article'; articleEntity.abstract = true; const textProp = articleEntity.properties.text; textProp.lazy = true; } }, // rest of entity generator config } }); ``` And try to regenerate the entities... Oops, you'll crash the entity generator. What happened? The "Article" entity is involved in a M:N relationship, and upon trying to connect it on the Users end, it was not found, which is not OK. This is now a case where we need to bring in `onProcessedMetadata`, so that we only swap our the class after the M:N discovery has already happened. Change the config to: src/mikro-orm.config.ts ``` // rest of imports export default defineConfig({ // rest of the config entities: ['dist/**/*.entity.js', 'dist/**/*.customEntity.js'], entitiesTs: ['src/**/*.entity.ts', 'src/**/*.customEntity.ts'], // rest of the config entityGenerator: { fileName: (entityName) => { switch (entityName) { case '_Article': return `article/article.entity`; case 'Article': return `article/article.customEntity`; case 'ArticleTag': case 'Tag': case 'Comment': return `article/${entityName.toLowerCase()}.entity`; case 'User': return `user/${entityName.toLowerCase()}.entity`; case 'Password': return `user/password.runtimeType`; case 'PasswordType': return `user/password.type`; default: return `common/${entityName.toLowerCase()}.entity`; } }, onInitialMetadata: (metadata, platform) => { const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { const passwordProp = userEntity.properties.password; passwordProp.hidden = true; passwordProp.lazy = true; passwordProp.type = 'PasswordType'; passwordProp.runtimeType = 'Password'; } const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { const textProp = articleEntity.properties.text; textProp.lazy = true; } }, onProcessedMetadata: (metadata, platform) => { const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { articleEntity.className = '_Article'; articleEntity.abstract = true; } }, // rest of entity generator config } }); ``` Regenerating the entities should now work. However, the code doesn't build for now. To fix this, first, let's add the actual custom entity class. We'll add a slug function as part of the custom constructor. src/modules/article/article.customEntity.ts ``` import { Entity, type Rel } from '@mikro-orm/core'; import { _Article } from './article.entity.js'; import { User } from '../user/user.entity.js'; function convertToSlug(text: string) { return text .toLowerCase() .replace(/[^\w ]+/g, '') .replace(/ +/g, '-'); } @Entity({ tableName: 'articles' }) export class Article extends _Article { constructor(title: string, text: string, author: Rel) { super(); this.title = title; this.text = text; this.author = author; this.slug = convertToSlug(title); this.description = this.text.substring(0, 999) + '…'; } } ``` And finally, let's edit "db.ts" to reference the proper import. The top should read: src/db.ts ``` import { type EntityManager, type EntityRepository, MikroORM, type Options } from "@mikro-orm/mysql"; import config from "./mikro-orm.config.js"; - import { Article } from "./modules/article/article.entity.js"; + import { Article } from "./modules/article/article.customEntity.js"; import { Tag } from "./modules/article/tag.entity.js"; import { User } from "./modules/user/user.entity.js"; import { Comment } from "./modules/article/comment.entity.js"; ``` However, this approach is one you may want to avoid in a "schema first" flow, because your custom class is now outside the entity generator's reach. Renaming the database table requires the extra step of renaming the tableName option in the custom class. Changing any property used in the constructor may break builds. In other words, the custom class requires the same care as the rest of your application code does when it accesses entity classes and properties. Custom types, like what we did for the password, are also technically outside the entity generator's reach. However, they’re self-contained - they can still exist even if the entity changes shape entirely, and the entity may have a custom type swapped out during a regeneration. Since we did introduce this in our code base though, we should also address another problem this creates. Try to regenerate the entities again. You will notice there's now an error. The error happens because MikroORM is trying to import the ".customEntity" files, but that file can't run without the generated entity already being present. To fix the problem, we'll need to rename our overrides before regeneration (so that MikroORM doesn't recognize them during entity generation), and restore their names after regeneration. To do this, install renamer: * npm * Yarn * pnpm * Bun ``` npm install --save-dev renamer ``` ``` yarn add --dev renamer ``` ``` pnpm add --save-dev renamer ``` ``` bun add --dev renamer ``` and adjust the `regen` script to: package.json ``` "regen": "rimraf -g ./src/**/*.entity.ts && renamer --silent --find /\\.customEntity\\.ts$/ --replace .customEntity.ts.bak ./src/** && mikro-orm-esm generate-entities --save && renamer --silent --find /\\.customEntity\\.ts\\.bak$/ --replace .customEntity.ts ./src/**", ``` ### Adding virtual properties[​](#adding-virtual-properties "Direct link to Adding virtual properties") Let's continue re-implementing more of the "code first" guide's application. We'll add JWT authentication to our endpoints, in a similar fashion to the way the "code first" guide does it - via a virtual property that holds the user's JWT. First, let's add the property. Inside `onInitialMetadata`, for the user entity, we need to call the `addProperty()` method with an object representing the new property. The entity generator is optimized to work with objects that are pre-filled with the entire database metadata, and does very few checks for custom properties. So to ensure the generator doesn't crash, we should include the same type of information as if this was a real column, but with the added "persist" option set to "false". In our case, a nullable `varchar(255)` column mapped to a regular string type is what we need. src/mikro-orm.config.ts ``` const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { userEntity.addProperty({ persist: false, name: 'token', nullable: true, default: null, defaultRaw: 'null', fieldNames: [platform.getConfig().getNamingStrategy().propertyToColumnName('token')], columnTypes: ['varchar(255)'], type: 'string', runtimeType: 'string', }); const passwordProp = userEntity.properties.password; passwordProp.hidden = true; passwordProp.lazy = true; passwordProp.type = 'PasswordType'; passwordProp.runtimeType = 'Password'; } ``` Regenerating the entities now will add this property in the entity. You don't even need to perform a migration here, since there is no "real" database change involved. From here, we still need to do the same things we had to do in the "code first" guide. Install fastify JWT: * npm * Yarn * pnpm * Bun ``` npm install @fastify/jwt ``` ``` yarn add @fastify/jwt ``` ``` pnpm add @fastify/jwt ``` ``` bun add @fastify/jwt ``` Then register it at the top of app.ts, and add jwt verify request hook after the ORM hook (to enable JWT verification to use the DB): src/app.ts ``` import fastifyJWT from '@fastify/jwt'; // ... const app = fastify(); // register JWT plugin app.register(fastifyJWT, { secret: process.env.JWT_SECRET ?? '12345678', // fallback for testing }); // register request context hook app.addHook('onRequest', (request, reply, done) => { RequestContext.create(db.em, done); }); // register auth hook after the ORM one to use the context app.addHook('onRequest', async (request) => { try { const ret = await request.jwtVerify<{ id: number }>(); request.user = await db.user.findOneOrFail(ret.id); } catch (e) { app.log.error(e); // ignore token errors, we validate the request.user exists only where needed } }); // ... ``` And also add JWT signing to the login and register endpoints, to enable the client to see the signed JWT: src/app.ts ``` // ... app.post('/sign-up', async request => { // ... await db.em.persist(user).flush(); // after flush, we have the `user.id` set console.log(`User ${user.id} created`); user.token = app.jwt.sign({ id: user.id }); return user; }); app.post('/sign-in', async request => { // ... const user = await db.user.findOne({ email }, { populate: ['password'], // password is a lazy property, we need to populate it }) // On failure, we return a pseudo user with an empty password hash. // This approach minimizes the effectiveness of timing attacks ?? { password: emptyHash, id: 0, token: undefined }; if (await user.password.verifyAndMaybeRehash(password)) { await db.em.flush(); user.token = app.jwt.sign({ id: user.id }); return user; } throw err; }); ``` And let's also now add a "/profile" endpoint, to show us the user currently logged in: src/app.ts ``` app.get('/profile', async request => { if (!request.user) { throw new Error('Please provide your token via Authorization header'); } return request.user as User; }); ``` ## ⛳ Checkpoint 2[​](#-checkpoint-2 "Direct link to ⛳ Checkpoint 2") Our application now has JWT authentication and profile view. Meanwhile, we also did a full DB change cycle. Before we move onto more entity generation features, let's do some refactoring to make the big app.ts file more manageable, and add some tests. This will make the final version of our application, complete with its additional features, easier to reason about. If you wanted to "manually" verify the application at this stage, you would need to issue the POST requests using curl, Postman or other similar tools. Or alternatively, use fetch() from a browser console or a separate Node REPL. Like to register: ``` await fetch(new Request('/sign-up', { method: 'POST', headers: { 'Content-Type': 'application/json; charset=utf-8' }, body: JSON.stringify({ fullName: 'test', email: 'test@example.com', password: '1234' }) })); ``` and then to login: ``` await fetch(new Request('/sign-in', { method: 'POST', headers: { 'Content-Type': 'application/json; charset=utf-8' }, body: JSON.stringify({ email: 'test@example.com', password: '1234' }) })); ``` ## Application refactor[​](#application-refactor "Direct link to Application refactor") ### Move routes into the modules[​](#move-routes-into-the-modules "Direct link to Move routes into the modules") Let's first move the routes in app.ts into the appropriate module folders, and connect them back with app.ts. For each `*.routes.ts` file, we'll export a fastify async plugin, and register our routes. Each route file will be imported with a prefix, to allow them to define whatever routes they like, without conflicting with other `*.routes.ts` files. Our basic boilerplate for `*.routes.ts` files: ``` import { type FastifyPluginAsync } from 'fastify'; import { type Services } from '../../db.js'; export default (async (app, { db }) => { //routes here }) as FastifyPluginAsync<{ db: Services }>; ``` And specifically: src/modules/user/user.routes.ts ``` import { type FastifyPluginAsync } from 'fastify'; import { type Services } from '../../db.js'; import { User } from './user.entity.js'; import { Password } from './password.runtimeType.js'; import { type EntityData } from '@mikro-orm/mysql'; const emptyHash = await Password.fromRaw(''); export default (async (app, { db }) => { // register new user app.post('/sign-up', async request => { const body = request.body as EntityData; if (!body.email || !body.fullName || !body.password) { throw new Error('One of required fields is missing: email, fullName, password'); } if ((await db.user.count({ email: body.email })) > 0) { throw new Error('This email is already registered, maybe you want to sign in?'); } const user = db.user.create({ fullName: body.fullName, email: body.email, password: await Password.fromRaw(body.password), bio: body.bio ?? '', }); await db.em.persist(user).flush(); // after flush, we have the `user.id` set console.log(`User ${user.id} created`); user.token = app.jwt.sign({ id: user.id }); return user; }); app.post('/sign-in', async request => { const { email, password } = request.body as { email: string; password: string }; const err = new Error('Invalid combination of email and password'); if (password === '' || email === '') { throw err; } const user = await db.user.findOne({ email }, { populate: ['password'], // password is a lazy property, we need to populate it }) // On failure, we return a pseudo user with an empty password hash. // This approach minimizes the effectiveness of timing attacks ?? { password: emptyHash, id: 0, token: undefined }; if (await user.password.verifyAndMaybeRehash(password)) { await db.em.flush(); user.token = app.jwt.sign({ id: user.id }); return user;//password is a hidden property, so it won't be returned, even on success. } throw err; }); app.get('/profile', async request => { if (!request.user) { throw new Error('Please provide your token via Authorization header'); } return request.user as User; }); }) as FastifyPluginAsync<{ db: Services }>; ``` and also src/modules/article/article.routes.ts ``` import { type FastifyPluginAsync } from 'fastify'; import { type Services } from '../../db.js'; export default (async (app, { db }) => { app.get('/', async (request) => { const { limit, offset } = request.query as { limit?: number; offset?: number; }; const [items, total] = await db.article.findAndCount( {}, { limit, offset, } ); return { items, total }; }); }) as FastifyPluginAsync<{ db: Services }>; ``` and let's also move out the hooks too. These would require we wrap them with `fastify-plugin` instead, since we want these hooks across all prefixes. src/modules/common/hooks.ts ``` import { fastifyPlugin } from 'fastify-plugin'; import { type Services } from '../../db.js'; import { RequestContext } from '@mikro-orm/mysql'; export default fastifyPlugin<{db: Services}>(async (app, { db }) => { // register request context hook app.addHook('onRequest', (request, reply, done) => { RequestContext.create(db.em, done); }); // register auth hook after the ORM one to use the context app.addHook('onRequest', async (request) => { try { const ret = await request.jwtVerify<{ id: number }>(); request.user = await db.user.findOneOrFail(ret.id); } catch (e) { app.log.error(e); // ignore token errors, we validate the request.user exists only where needed } }); // shut down the connection when closing the app app.addHook('onClose', async () => { await db.orm.close(); }); }); ``` Which leaves our app.ts like: src/app.ts ``` import { fastify } from 'fastify'; import fastifyJWT from '@fastify/jwt'; import { initORM } from './db.js'; import hooks from './modules/common/hooks.js'; import userRoutes from './modules/user/user.routes.js'; import articleRoutes from './modules/article/article.routes.js'; export async function bootstrap(port = 3001, migrate = true) { const db = await initORM({ ensureDatabase: { create: false }, }); if (migrate) { // sync the schema await db.orm.migrator.up(); } const app = fastify(); // register JWT plugin app.register(fastifyJWT, { secret: process.env.JWT_SECRET ?? '12345678', // fallback for testing }); await app.register(hooks, { db }); // register routes here app.register(articleRoutes, { db, prefix: 'article' }); app.register(userRoutes, { db, prefix: 'user' }); const url = await app.listen({ port }); return { app, url }; } ``` which is much nicer. Our URL endpoints are now "/article", "/user/sign-up", "/user/sign-in", "/user/profile". ### Making the config env dependent[​](#making-the-config-env-dependent "Direct link to Making the config env dependent") We mentioned earlier that you could split your config files if you need tool-specific configs. However, more generally, you will at least want a dev vs prod config, with "dev" basically being "when running the MikroORM CLI", while "prod" would basically be "when the application is running". We can detect whether we're running in the MikroORM CLI based on the arguments, and act accordingly. And although we don't *require* a tool-specific config, there is one annoying thing about entity generation that we can tackle with a config adjustment specifically to the entity generator. Because of the renames that we have to do for our entity regeneration after our mapped superclass was introduced, you may have seen your IDE fail to recognize the mapped superclass. And it stays like that until you restart your IDE's typescript server, or cut and paste the mapped superclass reference to force a re-check. We can avoid this annoyance by adjusting our config to not feature the entities at all, but only when running the regenerate-entities command from the MikroORM CLI. src/mikro-orm.config.ts ``` import { defineConfig, type MikroORMOptions, } from '@mikro-orm/mysql'; import { UnderscoreNamingStrategy } from '@mikro-orm/core'; import { Migrator } from '@mikro-orm/migrations'; import pluralize from 'pluralize'; import { join } from 'node:path'; const isInMikroOrmCli = process.argv[1]?.endsWith(join('@mikro-orm', 'cli', 'esm')) ?? false; const isRunningGenerateEntities = isInMikroOrmCli && process.argv[2] === 'generate-entities'; const mikroOrmExtensions: MikroORMOptions['extensions'] = [Migrator]; if (isInMikroOrmCli) { mikroOrmExtensions.push((await import('@mikro-orm/entity-generator')).EntityGenerator); } export default defineConfig({ extensions: mikroOrmExtensions, multipleStatements: isInMikroOrmCli, discovery: { warnWhenNoEntities: !isInMikroOrmCli, }, entities: isRunningGenerateEntities ? [] : ['dist/**/*.customEntity.js', 'dist/**/*.entity.js'], entitiesTs: isRunningGenerateEntities ? [] : ['src/**/*.customEntity.ts', 'src/**/*.entity.ts'], // rest of the config }); ``` And with that in place, we can revert the changes we made before to the entity generation process, i.e. package.json ``` - "regen": "rimraf -g ./src/**/*.entity.ts && renamer --silent --find /\\.customEntity\\.ts$/ --replace .customEntity.ts.bak ./src/** && mikro-orm-esm generate-entities --save && renamer --silent --find /\\.customEntity\\.ts\\.bak$/ --replace .customEntity.ts ./src/**", + "regen": "rimraf -g ./src/**/*.entity.ts && mikro-orm-esm generate-entities --save", ``` and * npm * Yarn * pnpm * Bun ``` npm uninstall renamer ``` ``` yarn remove renamer ``` ``` pnpm remove renamer ``` ``` bun remove renamer ``` We should further make it so that migrations run in a separate connection where `multipleStatements` is enabled, while it is disabled for everything else, for the sake of security. Let's make app.ts be like: src/app.ts ``` import { fastify } from 'fastify'; import fastifyJWT from '@fastify/jwt'; import { initORM } from './db.js'; import hooks from './modules/common/hooks.js'; import userRoutes from './modules/user/user.routes.js'; import articleRoutes from './modules/article/article.routes.js'; export async function bootstrap(port = 3001, migrate = true) { const db = await initORM(migrate ? { multipleStatements: true, ensureDatabase: { create: false } } : {}); if (migrate) { // sync the schema await db.orm.migrator.up(); await db.orm.reconnect({ multipleStatements: false }); } const app = fastify(); // register JWT plugin await app.register(fastifyJWT, { secret: process.env.JWT_SECRET ?? '12345678', // fallback for testing }); await app.register(hooks, { db }); // register routes here app.register(articleRoutes, { db, prefix: 'article' }); app.register(userRoutes, { db, prefix: 'user' }); const url = await app.listen({ port }); return { app, url }; } ``` ### Testing the endpoints[​](#testing-the-endpoints "Direct link to Testing the endpoints") So far, when we've checked the resulting app, we've been doing so "manually". Let's add some tests, so that we can repeatedly check that everything is working as we make further changes and additions. In a "code first" approach, you can let the schema generator create the test database's schema for you, based on your entity definitions. While you *could* do the same in a "schema first" approach, if your database schema is sufficiently complex, you may end up in a situation where the schema generator will produce something slightly different from your true schema (which may be because of bugs originating in the entity generator not producing the correct/complete code, or because your schema includes features that MikroORM does not track yet in general, like triggers and routines), which will in turn make your test results be off, particularly when said differences are being relied on by your application. The best way to avoid issues like this is to simply run your migrations at the start of the test suite. If you have too many migrations, you may consider occasionally doing a database DDL dump using a tool native to your database engine (e.g. "mysqldump" in the case of MySQL) + a data dump of the MikroORM migrations table. Then execute these before running the rest of the migrations that were created after that dump. To keep this guide simple, we will just run the migrations. Let's create a test util to init our test database: test/utils.ts ``` import { bootstrap } from '../src/app.js'; import { initORM } from '../src/db.js'; export async function initTestApp(port: number) { // this will create all the ORM services and cache them await initORM({ // no need for debug information, it would only pollute the logs debug: false, // we will use a dynamic name, based on port. This way we can easily parallelize our tests dbName: `blog_test_${port}`, // create the schema so we can use the database ensureDatabase: { create: false }, // required for the migrations multipleStatements: true, }); const { app } = await bootstrap(port); return app; } ``` and add a test for our "/article" endpoint: test/article.test.ts ``` import { afterAll, beforeAll, expect, test } from 'vitest'; import { FastifyInstance } from 'fastify'; import { initTestApp } from './utils.js'; let app: FastifyInstance; beforeAll(async () => { // we use different ports to allow parallel testing app = await initTestApp(30001); }); afterAll(async () => { // we close only the fastify app - it will close the database connection via onClose hook automatically await app.close(); }); test('list all articles', async () => { // mimic the http request via `app.inject()` const res = await app.inject({ method: 'get', url: '/article', }); // assert it was successful response expect(res.statusCode).toBe(200); // with expected shape expect(res.json()).toMatchObject({ items: [], total: 0, }); }); ``` If you've previously gone through the "code first" guide, you know this breaks with the error message like ``` FAIL test/article.test.ts [ test/article.test.ts ] TypeError: Unknown file extension ".ts" for /blog-api/src/modules/article/article.entity.ts ``` and to fix it, we need to adjust the config to add a dynamic import: test/utils.ts ``` import { bootstrap } from '../src/app.js'; import { initORM } from '../src/db.js'; export async function initTestApp(port: number) { // this will create all the ORM services and cache them await initORM({ // no need for debug information, it would only pollute the logs debug: false, // we will use a dynamic name, based on port. This way we can easily parallelize our tests dbName: `blog_test_${port}`, // create the schema so we can use the database ensureDatabase: { create: false }, // required for the migrations multipleStatements: true, + // required for vitest + dynamicImportProvider: id => import(id), }); const { app } = await bootstrap(port); return app; } ``` And now, trying to run it again... you should see a different error: ``` Error: Please provide either 'type' or 'entity' attribute in User.id. If you are using decorators, ensure you have 'emitDecoratorMetadata' enabled in your tsconfig.json. ``` But we did add `emitDecoratorMetadata` in our `tsconfig.json`, right? Yes, but vitest uses ESBuild to transpile the sources, and ESBuild doesn’t support this out of the box. There are several solutions to this problem. We may either 1. Use `@mikro-orm/reflection` to analyze the sources in a different fashion that doesn't rely on `emitDecoratorMetadata`. 2. Swap out ESBuild for SWC, and [configure SWC to support decorators](https://mikro-orm.io/docs/usage-with-transpilers.md#swc). 3. Install `@anatine/esbuild-decorators` and add it to the vitest config. 4. Adjust the entity generator to always output the "type" property, thus bypassing the need to infer the type in the first place. Option 1 is what the "code first" guide does, and that is a great solution if you are writing the entity definitions manually. Options 2 and 3 are a different alternative you may go for if you need `emitDecoratorMetadata` for other purposes as well. For this guide, we'll go with option 4, because it is the easiest to do. Add to your config src/mikro-orm.config.ts ``` entityGenerator: { scalarTypeInDecorator: true, // rest of entity generator config } ``` and regenerate the entities. You can now run the test without an error. You may also remove `emitDecoratorMetadata` from `tsconfig.json` at this point, unless you need it for another library. Now that we have the article test working, let's also add tests for the user endpoint. We'll register a user, try to log in with them, see their profile, and remove the user at the end, to keep the test repeatable. test/user.test.ts ``` import { FastifyInstance } from 'fastify'; import { afterAll, beforeAll, expect, test } from 'vitest'; import { initTestApp } from './utils.js'; import { EntityData } from '@mikro-orm/core'; import { User } from '../src/modules/user/user.entity.js'; import { initORM } from '../src/db.js'; let app: FastifyInstance; beforeAll(async () => { // we use different ports to allow parallel testing app = await initTestApp(30002); }); afterAll(async () => { const db = await initORM(); try { const fork = db.em.fork(); await fork.removeAndFlush(await fork.findOneOrFail(User, { email: 'foo@bar.com' })); } catch (e: unknown) { console.error(e); } // we close only the fastify app - it will close the database connection via onClose hook automatically await app.close(); }); test('full flow', async () => { const res1 = await app.inject({ method: 'post', url: '/user/sign-up', payload: { fullName: 'Foo Bar', email: 'foo@bar.com', password: 'password123', }, }); expect(res1.statusCode).toBe(200); expect(res1.json()).toMatchObject({ fullName: 'Foo Bar', }); const res1dup = await app.inject({ method: 'post', url: '/user/sign-up', payload: { fullName: 'Foo Bar', email: 'foo@bar.com', password: 'password123', }, }); expect(res1dup.statusCode).toBe(500); expect(res1dup.json()).toMatchObject({ message: 'This email is already registered, maybe you want to sign in?', }); const res2 = await app.inject({ method: 'post', url: '/user/sign-in', payload: { email: 'foo@bar.com', password: 'password123', }, }); expect(res2.statusCode).toBe(200); expect(res2.json()).toMatchObject({ fullName: 'Foo Bar', }); const res3 = await app.inject({ method: 'post', url: '/user/sign-in', payload: { email: 'foo@bar.com', password: 'password456', }, }); expect(res3.statusCode).toBe(500); expect(res3.json()).toMatchObject({ message: 'Invalid combination of email and password' }); const res4 = await app.inject({ method: 'get', url: '/user/profile', headers: { 'Authorization': `Bearer ${res2.json().token}` } }); expect(res4.statusCode).toBe(200); expect(res2.json()).toMatchObject(res4.json()); }); ``` This test should also pass with no errors. If all is good, we can move on to a few more application refactorings. ### Adding better error handling[​](#adding-better-error-handling "Direct link to Adding better error handling") Let's adjust the application so that it returns appropriate status codes, rather than just show status code 500 on any error. Add a dedicated error class file. As our own convention, let's say we'll be placing custom error classes in files with ".error.ts" suffix. There is no technical reason for this. It's purely organizational. src/modules/common/auth.error.ts ``` export class AuthError extends Error {} ``` And then let's make it so that we return status 401 for this error. Add this handler to `hooks.ts`: src/modules/common/hooks.ts ``` import { fastifyPlugin } from 'fastify-plugin'; import { type Services } from '../../db.js'; import { NotFoundError, RequestContext } from '@mikro-orm/mysql'; import { AuthError } from './auth.error.js'; export default fastifyPlugin<{db: Services}>(async (app, { db }) => { // rest of the code // register global error handler to process 404 errors from `findOneOrFail` calls app.setErrorHandler((error, request, reply) => { if (error instanceof AuthError) { return reply.status(401).send(error); } // we also handle not found errors automatically // `NotFoundError` is an error thrown by the ORM via `em.findOneOrFail()` method if (error instanceof NotFoundError) { return reply.status(404).send(error); } app.log.error(error); reply.status(500).send(error); }); }); ``` And finally, let's actually throw that error on auth failures. Modify `user.routes.ts`: src/modules/user.routes.ts ``` ... import { type EntityData } from '@mikro-orm/mysql'; + import { AuthError } from '../common/auth.error.js'; ... app.post('/sign-in', async request => { const { email, password } = request.body as { email: string; password: string }; - const err = new Error('Invalid combination of email and password'); + const err = new AuthError('Invalid combination of email and password'); ... app.get('/profile', async request => { if (!request.user) { - throw new Error('Please provide your token via Authorization header'); + throw new AuthError('Please provide your token via Authorization header'); } ... ``` If you try to re-run the tests now, you should see a test failure at the status code check. Let's modify the test too, to reflect our new intended behavior: test/user.test.ts ``` - expect(res3.statusCode).toBe(500); + expect(res3.statusCode).toBe(401); ``` And now, the test passes again. ### Adding repositories[​](#adding-repositories "Direct link to Adding repositories") Let's move some of the user logic into a custom repository. First, let's define the repository. We'll include a method to check if an email exists, and to login users: src/modules/user/user.repository.ts ``` import { EntityRepository } from '@mikro-orm/mysql'; import { User } from './user.entity.js'; import { AuthError } from '../common/auth.error.js'; import { Password } from './password.runtimeType.js'; const emptyHash = await Password.fromRaw(''); export class UserRepository extends EntityRepository { async exists(email: string) { return (await this.count({ email })) > 0; } async login(email: string, password: string) { const err = new AuthError('Invalid combination of email and password'); if (password === '' || email === '') { throw err; } const user = await this.findOne({ email }, { populate: ['password'], // password is a lazy property, we need to populate it }) // On failure, we return a pseudo user with an empty password hash. // This approach minimizes the effectiveness of timing attacks ?? { password: emptyHash, id: 0, token: undefined }; if (await user.password.verifyAndMaybeRehash(password)) { await this.getEntityManager().flush(); return user;//password is a hidden property, so it won't be returned, even on success. } throw err; } } ``` Next, we'll need to associate this repository with the user entity on the entity's side. To do that in a "schema first" approach, you need to fill in the `repositoryClass` property in extension hooks. src/mikro-orm.config.ts ``` + case 'UserRepository': + return `user/user.repository`; case 'User': return `user/${entityName.toLowerCase()}.entity`; ... const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { + userEntity.repositoryClass = 'UserRepository'; ... ``` and regenerate the entities. The entity's options will now include a factory for the repository class, as well as a TypeScript hint. To use the custom repository class when available, and fallback to the default ones when not, we should modify our database wrapper to use the `GetRepository` type, like so: src/db.ts ``` import { type EntityManager, type EntityRepository, + type GetRepository, MikroORM, type Options } from "@mikro-orm/mysql"; ... export interface Services { orm: MikroORM; em: EntityManager; - user: EntityRepository; - article: EntityRepository
; - tag: EntityRepository; - comment: EntityRepository; + user: GetRepository>; + article: GetRepository>; + tag: GetRepository>; + comment: GetRepository>; } ... ``` The second type argument to the `GetRepository` type is a fallback class, in case the entity does not define a type hint. That fallback should match the class defined in the config as a default repository. We're using MikroORM's default, so we're just specifying that. Now that we have the repository defined and available, we can use it in `user.routes.ts`, like so: src/modules/user/user.routes.ts ``` ... -const emptyHash = await Password.fromRaw(''); ... app.post('/sign-up', async request => { const body = request.body as EntityData; if (!body.email || !body.fullName || !body.password) { throw new Error('One of required fields is missing: email, fullName, password'); } - if ((await db.user.count({ email: body.email })) > 0) { + if (await db.user.exists(body.email)) { throw new Error('This email is already registered, maybe you want to sign in?'); } ... app.post('/sign-in', async request => { const { email, password } = request.body as { email: string; password: string }; - const err = new AuthError('Invalid combination of email and password'); - if (password === '' || email === '') { - throw err; - } - - const user = await db.user.findOne({ email }, { - populate: ['password'], // password is a lazy property, we need to populate it - }) - // On failure, we return a pseudo user with an empty password hash. - // This approach minimizes the effectiveness of timing attacks - ?? { password: emptyHash, id: 0, token: undefined }; - - if (await user.password.verifyAndMaybeRehash(password)) { - await db.em.flush(); - user.token = app.jwt.sign({ id: user.id }); - return user;//password is a hidden property, so it won't be returned, even on success. - } - - throw err; + const user = await db.user.login(email, password); + user.token = app.jwt.sign({ id: user.id }); + return user; }); ``` ### Adding input runtime validation via Zod[​](#adding-input-runtime-validation-via-zod "Direct link to Adding input runtime validation via Zod") Every time we do `as` on something from `request`, we are effectively telling TypeScript we know what the user input will be shaped like. In reality, nothing is stopping the user from submitting something not conforming to that shape, or not even inputting JSON in the first place. We should validate all user input (which in our case means anything from "request") before passing it further along in our logic. One good way to do that is using Zod. Let's add such validation. Install Zod: * npm * Yarn * pnpm * Bun ``` npm install zod ``` ``` yarn add zod ``` ``` pnpm add zod ``` ``` bun add zod ``` First off, let's deal with the sign-in endpoint. src/modules/user.routes.ts ``` ... +import { z } from 'zod'; + ... + const signInPayload = z.object({ + email: z.string().min(1), + password: z.string().min(1), + }); + app.post('/sign-in', async request => { - const { email, password } = request.body as { email: string; password: string }; + const { email, password } = signInPayload.parse(request.body); ... ``` Zod includes a validator for syntax validity of email, but we don't need it during sign-in. As long as the email is not empty, we can search it. If the email is not valid, it won't exist in the database to begin with. We'll make sure of that during the sign-up. Let's do that now, and while we're at it, let's automatically hash the password after validation, to simplify the call to the `create()` method: src/modules/user.routes.ts ``` ... + const signUpPayload = z.object({ + email: z.string().email(), + password: z + .string() + .min(1) + .transform(async (raw) => Password.fromRaw(raw)), + fullName: z.string().min(1), + bio: z.string().optional().default(''), + }); + app.post('/sign-up', async request => { - const body = request.body as EntityData; - - if (!body.email || !body.fullName || !body.password) { - throw new Error('One of required fields is missing: email, fullName, password'); - } - - if ((await db.user.count({ email: body.email })) > 0) { - throw new Error('This email is already registered, maybe you want to sign in?'); - } - - const user = db.user.create({ - fullName: body.fullName, - email: body.email, - password: await Password.fromRaw(body.password), - bio: body.bio ?? '', - }); + const body = await signUpPayload.parseAsync(request.body); + + if (await db.user.exists(body.email)) { + throw new Error('This email is already registered, maybe you want to sign in?'); + } + + const user = db.user.create(body); ... ``` You could add a check constraint for that instead (or in addition to Zod), but the check constraint would be applied later, after we spend time to hash the new password. To save time and server resources on long creation procedures like that, you should include as much validation as you can, as early as you can, like we did here. Finally, let's add some validation for the query string in `article.routes.ts`. Unlike our sign-up and sign-in validator, there's a high chance we'll want to do paging in multiple places (e.g. in a list of users), so we should define our validator in a dedicated file. src/common/validators.ts ``` import { z } from 'zod'; export const pagingParams = z.object({ limit: z.number().int().positive().optional(), offset: z.number().int().nonnegative().optional(), }); ``` And now let's use it at the "/article" endpoint: src/modules/article/article.routes.ts ``` import { type Services } from '../../db.js'; +import { pagingParams } from '../common/validators.js'; export default (async (app, { db }) => { app.get('/', async (request) => { - const { limit, offset } = request.query as { - limit?: number; - offset?: number; - }; + const { limit, offset } = pagingParams.parse(request.query); ... ``` ## Making backwards compatible changes to the database[​](#making-backwards-compatible-changes-to-the-database "Direct link to Making backwards compatible changes to the database") Near the end there, you may have noticed that we still had to check whether the user's email exists before adding them to the database. On a busy server however, it's possible for a user to be added right in between our check and the flush of the new user. Further, if we had many users, we would need to do a linear search on the table, as there's no index on the email column. We can add one, and we should make it unique to prevent double insertion on a busy server. Let's try to generate a new migration for that. src/migrations/Migration00000000000002.ts ``` import { Migration } from '@mikro-orm/migrations'; export class Migration00000000000002 extends Migration { async up(): Promise { await this.execute(` ALTER TABLE \`blog\`.\`users\` ADD UNIQUE INDEX \`email_UNIQUE\` (\`email\` ASC) VISIBLE; `); } async down(): Promise { await this.execute(` ALTER TABLE \`blog\`.\`users\` DROP INDEX \`email_UNIQUE\` ; `); } } ``` Because this migration is fully backwards compatible, and we are automatically running migrations during startup, we could deploy our code without regenerating the entities even. However, we should do that anyway, since the entity definitions have changed as a result of this. After this migration is executed, we may now output a custom error when that unique constraint is violated. Note that we should still keep the application level check, performed before the `create` attempt. Attempting to insert will consume the auto increment ID even on unique constraint violations, so to prevent its early exhaustion, we should check in advance as well. Let's add that custom error class first: src/modules/user/duplicate.error.ts ``` export class DuplicateUserError extends Error {} ``` And then wrap violations of the unique constraint on sign-up: src/modules/user/user.routes.ts ``` ... +import { DuplicateUserError } from './duplicate.error.js'; ... // register new user app.post('/sign-up', async request => { const body = await signUpValidator.parseAsync(request.body); if (await db.user.exists(body.email)) { - throw new Error('This email is already registered, maybe you want to sign in?'); + throw new DuplicateUserError('This email is already registered, maybe you want to sign in?'); } const user = db.user.create(body); - await db.em.persist(user).flush(); - - // after flush, we have the `user.id` set - console.log(`User ${user.id} created`); - - user.token = app.jwt.sign({ id: user.id }); + try { + await db.em.persist(user).flush(); + + // after flush, we have the `user.id` set + console.log(`User ${user.id} created`); + + user.token = app.jwt.sign({ id: user.id }); + + return user; + } catch (e: unknown) { + if (e instanceof UniqueConstraintViolationException) { + throw new DuplicateUserError( + 'This email is already registered, maybe you want to sign in?', + { cause: e }, + ); + } + throw e; + } }); ... ``` And finally, we can return a different status code on this error again. Status `409 Conflict` seems like the most appropriate. src/modules/common/hooks.ts ``` ... import { AuthError } from './auth.error.js'; +import { DuplicateUserError } from '../user/duplicate.error.js'; ... app.setErrorHandler((error, request, reply) => { if (error instanceof AuthError) { return reply.status(401).send(error); } // we also handle not found errors automatically // `NotFoundError` is an error thrown by the ORM via `em.findOneOrFail()` method if (error instanceof NotFoundError) { return reply.status(404).send(error); } + + if (error instanceof DuplicateUserError) { + return reply.status(409).send(error); + } ... ``` We can now adjust our test accordingly: test/user.test.ts ``` ... - expect(res1dup.statusCode).toBe(500); + expect(res1dup.statusCode).toBe(409); expect(res1dup.json()).toMatchObject({ message: 'This email is already registered, maybe you want to sign in?', }); ... ``` Exercise You can try to generalize this to work for any unique constraint violation by analyzing the `sqlMessage` property of `UniqueConstraintViolationException` and searching the metadata based on the parsing results. You can then produce error messages that point the client to the one or multiple properties that causes a duplicate entry. Doing so will tie you to your SQL driver, and possibly even database engine version, so if you go on this route, you should do so with care. Do unit tests for your parsing in addition to your error conditions themselves, and make sure to run all tests after an upgrade of the database. If the error messages have changed, you will want to support parsing both forms until your production database is updated. ### Reusing the user authentication check[​](#reusing-the-user-authentication-check "Direct link to Reusing the user authentication check") We have the "/profile" endpoint, where we check whether the user is authenticated and return it if it is. For the sake of other endpoints that need to be authenticated, we should extract this into a function that will either give us the current user, or throw. src/modules/common/utils.ts ``` import { FastifyRequest } from 'fastify'; import { type User } from '../user/user.entity.js'; import { AuthError } from './auth.error.ts'; export function getUserFromToken(req: FastifyRequest): User { if (!req.user) { throw new AuthError('Please provide your token via Authorization header'); } return req.user as User; } ``` and we can already adjust the `user.routes.ts` file to use it: src/modules/user/user.routes.ts ``` ... -import { AuthError } from '../common/auth.error.js'; +import { getUserFromToken } from '../common/utils.js'; ... app.get('/profile', async request => { - if (!request.user) { - throw new AuthError('Please provide your token via Authorization header'); - } - - return request.user as User; + return getUserFromToken(request); }); ``` ### Modularizing the configuration[​](#modularizing-the-configuration "Direct link to Modularizing the configuration") Our `mikro-orm.config.ts` file has already grown quite a lot, and grew a bit even between "Checkpoint 2" and now. As the number of your entities and the number of modifications you may wish to do grows, you may need to put related modifications into dedicated files, and just let `mikro-orm.config.ts` collect and apply them. Exactly how you do that depends on your project and your needs. We will implement an organization similar to what we have been doing so far, and create files per module with all module related modifications, under a suffix to denote its purpose. Let's use the suffix `*.gen.ts`. Each such file will have a default export that is of type `GenerateOptions`. For each method, we will apply that method, if defined. We'll add a special case the empty string return value of `fileName` from our files to mean "Don't use this result, try next". If we were to do that in the main config, the entity generator will happily create a file with no name and `.ts` extension in the base folder, but we know we don't need that. So, let's add src/modules/user/user.gen.ts ``` import type { GenerateOptions } from "@mikro-orm/core"; const settings: GenerateOptions = { fileName: (entityName) => { switch (entityName) { case 'UserRepository': return `user/user.repository`; case 'User': return `user/${entityName.toLowerCase()}.entity`; case 'Password': return `user/password.runtimeType`; case 'PasswordType': return `user/password.type`; } return ''; }, onInitialMetadata: (metadata, platform) => { const userEntity = metadata.find(meta => meta.className === 'User'); if (userEntity) { userEntity.repositoryClass = 'UserRepository'; userEntity.addProperty({ persist: false, name: 'token', nullable: true, default: null, defaultRaw: 'null', fieldNames: [platform.getConfig().getNamingStrategy().propertyToColumnName('token')], columnTypes: ['varchar(255)'], type: 'string', runtimeType: 'string', }); const passwordProp = userEntity.properties.password; passwordProp.hidden = true; passwordProp.lazy = true; passwordProp.type = 'PasswordType'; passwordProp.runtimeType = 'Password'; } } }; export default settings; ``` and src/modules/article/article.gen.ts ``` import type { GenerateOptions } from "@mikro-orm/core"; const settings: GenerateOptions = { fileName: (entityName) => { switch (entityName) { case '_Article': return `article/article.entity`; case 'Article': return `article/article.customEntity`; case 'ArticleTag': case 'Tag': case 'Comment': return `article/${entityName.toLowerCase()}.entity`; } return ''; }, onInitialMetadata: (metadata, platform) => { const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { const textProp = articleEntity.properties.text; textProp.lazy = true; } }, onProcessedMetadata: (metadata, platform) => { const articleEntity = metadata.find(meta => meta.className === 'Article'); if (articleEntity) { articleEntity.className = '_Article'; articleEntity.abstract = true; } }, }; export default settings; ``` And finally, let's hook them up in our config. We'll use `globby` to match all `*.gen.ts` files relative to the config itself. We're using `globby`, because it is already present - it is what MikroORM uses when searching for entities by a path. We'll pre-filter the results at the top, so that the actual entity processing is faster. Our full config is thus: src/mikro-orm.config.ts ``` import { defineConfig, type MikroORMOptions, } from '@mikro-orm/mysql'; import { UnderscoreNamingStrategy, type GenerateOptions } from '@mikro-orm/core'; import { Migrator } from '@mikro-orm/migrations'; import pluralize from 'pluralize'; import { join, dirname } from 'node:path'; import { sync } from 'globby'; import { fileURLToPath } from 'node:url'; const isInMikroOrmCli = process.argv[1]?.endsWith(join('@mikro-orm', 'cli', 'esm')) ?? false; const isRunningGenerateEntities = isInMikroOrmCli && process.argv[2] === 'generate-entities'; const mikroOrmExtensions: MikroORMOptions['extensions'] = [Migrator]; const fileNameFunctions: NonNullable[] = []; const onInitialMetadataFunctions: NonNullable[] = []; const onProcessedMetadataFunctions: NonNullable[] = []; if (isInMikroOrmCli) { mikroOrmExtensions.push((await import('@mikro-orm/entity-generator')).EntityGenerator); if (isRunningGenerateEntities) { const fileDir = dirname(fileURLToPath(import.meta.url)); const genExtensionFiles = sync('./modules/**/*.gen.ts', { cwd: fileDir }); for (const file of genExtensionFiles) { const genExtension = (await import(file)).default as GenerateOptions; if (genExtension.fileName) { fileNameFunctions.push(genExtension.fileName); } if (genExtension.onInitialMetadata) { onInitialMetadataFunctions.push(genExtension.onInitialMetadata); } if (genExtension.onProcessedMetadata) { onProcessedMetadataFunctions.push(genExtension.onProcessedMetadata); } } } } export default defineConfig({ extensions: mikroOrmExtensions, multipleStatements: isInMikroOrmCli, discovery: { warnWhenNoEntities: !isInMikroOrmCli, }, entities: isRunningGenerateEntities ? [] : ['dist/**/*.customEntity.js', 'dist/**/*.entity.js'], entitiesTs: isRunningGenerateEntities ? [] : ['src/**/*.customEntity.ts', 'src/**/*.entity.ts'], host: 'localhost', user: 'root', password: '', dbName: 'blog', // enable debug mode to log SQL queries and discovery information debug: true, migrations: { path: 'dist/migrations', pathTs: 'src/migrations', }, namingStrategy: class extends UnderscoreNamingStrategy { override getEntityName(tableName: string, schemaName?: string): string { return pluralize.singular(super.getEntityName(tableName, schemaName)); } }, entityGenerator: { scalarTypeInDecorator: true, fileName: (entityName) => { for (const f of fileNameFunctions) { const r = f(entityName); if (r === '') { continue; } return r; } return `common/${entityName.toLowerCase()}.entity`; }, onInitialMetadata: (metadata, platform) => { return Promise.all(onInitialMetadataFunctions.map(f => f(metadata, platform))).then(); }, onProcessedMetadata: (metadata, platform) => { return Promise.all(onProcessedMetadataFunctions.map(f => f(metadata, platform))).then(); }, save: true, path: 'src/modules', esmImport: true, outputPurePivotTables: true, readOnlyPivotTables: true, bidirectionalRelations: true, customBaseEntityName: 'Base', useCoreBaseEntity: true, }, }); ``` Regeneration at this point should produce results no different from what we've had so far. But you can now add extra `*.gen.ts` files, each modifying some aspect of some entities. Exercise You can try to implement a different pattern for handling the `*.gen.ts` files, such as accepting the metadata of a given entity based on the table name, and register file name entries as needed during those extensions. By the time `fileName` is first called, `onInitialMetadata` and `onProcessedMetadata` have already finished executing, so they can determine its behavior. Doing this is probably overkill for most cases, but it may be helpful if you have extensions that you want to apply on different schemas, not just one you are fully in control of. ## ⛳ Checkpoint 3[​](#-checkpoint-3 "Direct link to ⛳ Checkpoint 3") Our application is now structured like an enterprise level application, ready for further modules or further additions to the existing modules. We even made another migration along the way. We are now ready to add more features. ## Completing the project[​](#completing-the-project "Direct link to Completing the project") ### Add the remaining article endpoints[​](#add-the-remaining-article-endpoints "Direct link to Add the remaining article endpoints") Let's add the remaining article endpoints. Let's start with one about viewing an article by slug and adding a comment: src/modules/article/article.routes.ts ``` // rest of the code const articleBySlugParams = z.object({ slug: z.string().min(1), }); app.get('/:slug', async request => { const { slug } = articleBySlugParams.parse(request.params); return db.article.findOneOrFail({ slug }, { populate: ['author', 'commentCollection.author', 'text'], }); }); const articleCommentPayload = z.object({ text: z.string().min(1), }); app.post('/:slug/comment', async request => { const { slug } = articleBySlugParams.parse(request.params); const { text } = articleCommentPayload.parse(request.body); const author = getUserFromToken(request); const article = await db.article.findOneOrFail({ slug }); const comment = db.comment.create({ author, article, text }); // We can add the comment to `article.comments` collection, // but in fact it is a no-op, as it will be automatically // propagated by setting Comment.author property. article.commentCollection.add(comment); // mention we don't need to persist anything explicitly await db.em.flush(); return comment; }); // rest of the code ``` If you compare the code with the equivalent from the "code first" guide, you will notice that we've added Zod for some basic validation. Also, the generator used the name "commentCollection" to represent the relation to the "comments" table. The default is formed from the entity name, combined with the suffix "Collection" for 1:N relations, or "Inverse" for M:N relations. We could adjust that in the naming strategy by overriding `inverseSideName` if we'd like (e.g. by taking the entity name and converting it to plural with pluralize), but to avoid potential conflicts with properties defined in the table itself, let's keep it as is. We're more likely to name a column with the plural form of an entity than we are to name it with "\_collection" or "\_inverse" at the end, making conflicts less likely in their current form. Next, let's try to add the article creation endpoint: src/modules/article/article.routes.ts ``` // rest of the code above const newArticlePayload = z.object({ title: z.string().min(1), text: z.string().min(1), description: z.string().min(1).optional(), }); app.post('/', async request => { const { title, text, description } = newArticlePayload.parse(request.body); const author = getUserFromToken(request); const article = db.article.create({ title, text, author, description, }); await db.em.flush(); return article; }); // rest of the code ``` You should be seeing a type error. This is because our entity declares slug and description as required properties. There are three solutions here. The first possible solution is to use the article constructor directly and persist the new entity. The second is to create a custom entity repository for article, in which we override the create method or add a custom one that calls the constructor and persists the new entity. We'll skip showing these solutions. Exercise Try to implement these solutions as well. Step back as soon as you can build the application. And the third one is to declare those properties as optional. The best way to do that is to declare them as optional in our mapped superclass. src/modules/article/article.customEntity.ts ``` -import { Entity, type Rel } from '@mikro-orm/core'; +import { Entity, OptionalProps, type Rel } from '@mikro-orm/core'; import { _Article } from './article.entity.js'; import { User } from '../user/user.entity.js'; function convertToSlug(text: string) { return text .toLowerCase() .replace(/[^\w ]+/g, '') .replace(/ +/g, '-'); } @Entity({ tableName: 'articles' }) export class Article extends _Article { + + [OptionalProps]?: 'slug' | 'description'; constructor(title: string, text: string, author: Rel) { super(); this.title = title; this.text = text; this.author = author; this.slug = convertToSlug(title); this.description = this.text.substring(0, 999) + '…'; } } ``` Technically, we could declare them as optional in the base class by modifying that in `onInitialMetadata` or `onProcessedMetadata`, but if we ever want to bypass the superclass for whatever reason, we will be prone to errors from the missing slug and description. After the modifications to the mapped superclass, the code now compiles again. For our next two endpoints, we'll want to ensure only the author of an article can update and delete it. The check itself is trivial, but let's make it so that we throw a separate error that results in `403 Forbidden` if the user is different from the author of an article. Let's add the error: src/modules/common/disallowed.error.ts ``` export class DisallowedError extends Error {} ``` And add handling for it in `hooks.ts`: src/modules/common/hooks.ts ``` ... import { AuthError } from './auth.error.js'; +import { DisallowedError } from './disallowed.error.js'; ... app.setErrorHandler((error, request, reply) => { if (error instanceof AuthError) { return reply.status(401).send(error); } + if (error instanceof DisallowedError) { + return reply.status(403).send(error); + } ... ``` And we're now ready to add the article endpoints to update and remove and article by ID: src/modules/article/article.routes.ts ``` // rest of the imports import { DisallowedError } from '../common/disallowed.error.js'; import { wrap } from '@mikro-orm/mysql'; // rest of the code const articleByIdParams = z.object({ id: z.coerce.number().int().positive() }); const updateArticlePayload = newArticlePayload.partial().extend({ slug: z.string().min(1).optional(), }); app.patch('/:id', async request => { const user = getUserFromToken(request); const { id } = articleByIdParams.parse(request.params); const article = await db.article.findOneOrFail(id); if (article.author !== user) { throw new DisallowedError('Only the author of an article is allowed to update it'); } wrap(article).assign(updateArticlePayload.parse(request.body)); await db.em.flush(); return article; }); app.delete('/:id', async request => { const user = getUserFromToken(request); const { id } = articleByIdParams.parse(request.params); const article = await db.article.findOneOrFail(id); if (article.author !== user) { throw new DisallowedError('Only the author of an article is allowed to delete it'); } // mention `nativeDelete` alternative if we don't care about validations much await db.em.remove(article).flush(); return { success: true }; }); // rest of the code ``` Thanks to MikroORM's identity map, we can compare the objects like how we've done above. Let's also add an endpoint to update our user profile: src/modules/user/user.routes.ts ``` ... -import { UniqueConstraintViolationException } from '@mikro-orm/mysql'; +import { UniqueConstraintViolationException, wrap } from '@mikro-orm/mysql'; ... + const profileUpdatePayload = signUpPayload.partial(); + + app.patch('/profile', async (request) => { + const user = getUserFromToken(request); + wrap(user).assign(profileUpdatePayload.parse(request.body)); + await db.em.flush(); + return user; + }); ``` Exercise Add unit tests for those new endpoints. ### Embeddable entities[​](#embeddable-entities "Direct link to Embeddable entities") MikroORM offers embeddable objects, which can serve one of two purposes. 1. Group related columns in a table under a property. 2. Provide a more entity-like experience to querying JSON columns. The entity generator is powerful enough to output such entities, when they are encoded in the metadata. However, we need to heavily alter the metadata to add new embeddable entities and add references to them. It is also perfectly valid to write embeddable entities manually, and just add references to them during entity generation. We'll explore both types of embeddables and both ways of generating them. #### Embeddable as a group of columns[​](#embeddable-as-a-group-of-columns "Direct link to Embeddable as a group of columns") First, for the grouping of columns. In most of our entities, we have "created\_at" and "updated\_at" columns, but not quite all of them (case in point: the pivot tables). Let's make it a policy to add an optional "\_track" property to any entity with such columns. That property will be an embeddable object having those two fields. We'll also remove them from their original properties, keeping only the copy in the embeddable object. For simplicity, we'll assume the type and defaults of all such columns are correct. Normally, embeddable objects map to a column formed by using the property as a prefix. In our case, that would be "track\_created\_at" and "track\_updated\_at". We don't want that, so we will set the `prefix` option to `false`, so that in the end, we still map to `created_at` and `updated_at`. src/modules/common/track.gen.ts ``` import { EntityMetadata, ReferenceKind, type GenerateOptions } from '@mikro-orm/core'; const settings: GenerateOptions = { onInitialMetadata: (metadata, platform) => { for (const meta of metadata) { if ( typeof meta.properties.createdAt !== 'undefined' && typeof meta.properties.updatedAt !== 'undefined' ) { meta.removeProperty('createdAt', false); meta.removeProperty('updatedAt', false); meta.addProperty( { name: '_track', kind: ReferenceKind.EMBEDDED, optional: true, nullable: true, type: 'Track', runtimeType: 'Track', prefix: false, object: false, }, false, ); meta.sync(); } } const trackClass = new EntityMetadata({ className: 'Track', tableName: 'track', embeddable: true, relations: [], }); trackClass.addProperty( { name: 'createdAt', fieldNames: ['created_at'], columnTypes: ['datetime'], type: 'datetime', runtimeType: 'Date', defaultRaw: 'CURRENT_TIMESTAMP', }, false, ); trackClass.addProperty( { name: 'updatedAt', fieldNames: ['updated_at'], columnTypes: ['datetime'], type: 'datetime', runtimeType: 'Date', defaultRaw: 'CURRENT_TIMESTAMP', }, false, ); trackClass.sync(); metadata.push(trackClass); }, }; export default settings; ``` If you regenerate the entities now, you'll see "src/modules/common/track.entity.ts" created, and other classes are now referencing it. Since we are creating the class dynamically, we can keep it saved with an `*.entity.ts` extension. warning When working on bigger projects and doing similar modifications, you should do extra checks on the column type, nullability, and default value. Take action to group columns only when all of their metadata lines up with what you have in the embeddable. Otherwise, leave the properties alone. Mistakes can happen during the authoring of migrations. Your entity generation extensions can (and should) be made resilient towards such mistakes. Not getting the modification in the output when you expect it will alert you that there is such a mistake. #### Embeddable as a type of JSON column[​](#embeddable-as-a-type-of-json-column "Direct link to Embeddable as a type of JSON column") We explored custom types already, and can use them for JSON columns as well. But doing so means you opt out from MikroORM assisted queries to properties within the JSON. With a custom type, the JSON column is just a random object as far as MikroORM is concerned, and you only get to deal with it as an object after having fetched it. You can always write queries to JSON properties, of course (it's still a JSON column), but there will be no auto complete for object member names in your IDE within MikroORM calls. Not so with embeddable properties. Our schema is currently lacking any JSON properties. Let's add one. We can use one to store social media accounts of users, for example. Let's start by adding migration and regenerating our entities to include the "social" property. src/migrations/Migration00000000000003.ts ``` import { Migration } from '@mikro-orm/migrations'; export class Migration00000000000003 extends Migration { async up(): Promise { await this.execute(` ALTER TABLE \`users\` ADD COLUMN \`social\` JSON NULL DEFAULT NULL AFTER \`bio\`; `); } async down(): Promise { await this.execute(` ALTER TABLE \`users\` DROP COLUMN \`social\`; `); } } ``` Execute the migration and regenerate the entities. You should see the "social" column defined with runtime type "any". OK, time to add the embeddable. We can define the embeddable class manually: src/modules/user/social.customEntity.ts ``` import { Embeddable, Property, type Opt } from "@mikro-orm/mysql"; @Embeddable() export class Social { @Property({ type: 'string' }) twitter!: string & Opt; @Property({ type: 'string' }) facebook!: string & Opt; @Property({ type: 'string' }) linkedin!: string & Opt; } ``` In fairness, this class is simple enough that we may as well define it dynamically. But if you'd like to add helper methods (e.g. for getting the full link, our of just a username), you may want to define it manually. Now, let's modify our `user.gen.ts` to reference the embeddable: src/modules/user/user.gen.ts ``` -import { type GenerateOptions } from "@mikro-orm/core"; +import { ReferenceKind, type GenerateOptions } from "@mikro-orm/core"; ... case 'PasswordType': return `user/password.type`; + case 'Social': + return `user/social.customEntity`; ... passwordProp.runtimeType = 'Password'; + + const socialProp = userEntity.properties.social; + socialProp.kind = ReferenceKind.EMBEDDED; + socialProp.type = 'Social'; + socialProp.prefix = false; + socialProp.object = true; ... ``` Regenerating the entities again, we now have the embeddable representing the contents of the JSON column. Just as with column groups, there is a prefix for the related JSON properties, but by setting "prefix" to "false", we can ensure the props in our entities map to the same properties in the JSON column. And the "object" option being set to "true" is how we set that property to represent a JSON column, rather than a group of columns. Exercise Try to add a check constraint to the JSON column too. The embeddable helps ensure your application won't get exposed to unknown properties, or be able to enter unknown properties into the database. However, direct queries to your database may insert objects that won't have the required shape. Worse still, they may set the same properties, but with a different data type inside. That may ultimately crash your application if read out. A check constraint that at least checks the known properties will remove any possibility of that. We should update our user endpoints to accept this new property: src/modules/user/user.routes.ts ``` const signUpPayload = z.object({ email: z.string().email(), password: z .string() .min(1) .transform(async (raw) => Password.fromRaw(raw)), fullName: z.string().min(1), bio: z.string().optional().default(''), + social: z + .object({ + twitter: z.string().min(1).optional(), + facebook: z.string().min(1).optional(), + linkedin: z.string().min(1).optional(), + }) + .optional(), }); ``` ### Formula properties[​](#formula-properties "Direct link to Formula properties") Sometimes, you want to include some dynamic data per row. Generated columns can help when all the data you need is in the row, but what about when you want to include something non-deterministic (like the current time) or something from other tables (an aggregation perhaps) as the value? In SQL, this can be done with a subquery in your `SELECT` clause. MikroORM allows you to define such subqueries as `@Formula` decorated properties. These are not inferred from the database, but you can add such with `onInitialMetadata` and `onProcessedMetadata`. Let's add a count of comments to the article listing in that fashion. We'll make the property lazy, so that we don't necessarily compute it every time we get an article. src/modules/article/article.gen.ts ``` ... textProp.lazy = true; + + articleEntity.addProperty({ + name: 'commentsCount', + fieldNames: ['comments_count'], + columnTypes: ['INT'], + unsigned: true, + optional: true, + type: 'integer', + runtimeType: 'number', + default: 0, + lazy: true, + formula: (alias) => `(SELECT COUNT(*) FROM comments WHERE article = ${alias}.id)`, + }); ... ``` And let's regenerate the entities. Lastly, let's ensure we add it to the listing: src/modules/article/article.routes.ts ``` ... const [items, total] = await db.article.findAndCount( {}, { + populate: ['commentsCount'], limit, offset, }, ); ... ``` ## Using the query builder during entity generation[​](#using-the-query-builder-during-entity-generation "Direct link to Using the query builder during entity generation") Notice that we had to write the full query as a string. So what happens if we rename the columns in the future? No entity generation or build errors of any kind. We would only get an error at runtime, if we populate the property. That's not good. We can remedy that by constructing the query dynamically based on the metadata, and do the final replacement of the alias at the end. This will ensure we get errors during entity generation if we've renamed the involved table or columns. src/modules/article/article.gen.ts ``` import type { GenerateOptions } from '@mikro-orm/core'; +import { type SqlEntityManager, Utils } from '@mikro-orm/mysql'; ... textProp.lazy = true; + const commentEntity = metadata.find((meta) => meta.className === 'Comment'); + if (!commentEntity) { + return; + } + const em = (platform.getConfig().getDriver().createEntityManager() as SqlEntityManager); + const qb = em.getKnex().queryBuilder().count().from(commentEntity.tableName).where( + commentEntity.properties.article.fieldNames[0], + '=', + em.getKnex().raw('??.??', [em.getKnex().raw('??'), commentEntity.properties.id.fieldNames[0]]) + ); + const formula = Utils.createFunction( + new Map(), + `return (alias) => ${JSON.stringify(`(${qb.toSQL().sql})`)}.replaceAll('??', alias)` + ); + articleEntity.addProperty({ name: 'commentsCount', fieldNames: ['comments_count'], columnTypes: ['INT'], unsigned: true, optional: true, type: 'integer', runtimeType: 'number', default: 0, lazy: true, - formula: (alias) => `(SELECT COUNT(*) FROM comments WHERE article = ${alias}.id)`, + formula, }); ``` If you regenerate the entities now, you'll see a slightly different function in the output from what we had before, but it still does the same job. With this in place, if we rename the involved columns from `articles` or `comments`, the entity generator would error. If we delete or rename the `Comment` entity, generation would skip the commentsCount property, which would in turn create build errors if we were to reference it. ## Deployment[​](#deployment "Direct link to Deployment") ### Running without ts-node[​](#running-without-ts-node "Direct link to Running without ts-node") We have already added a "check" script to check our code without emitting anything. Let's actually emit our output, and run it with node rather than ts-node: package.json ``` "scripts": { "build": "tsc --build", "start:prod": "node ./dist/server.js", ... } ``` Because we already have "type" annotated everywhere, the application just works without further modifications. If you were to use a bundler instead of `tsc`, you may need to do additional config. If the bundler is mangling your class names and property names (e.g. NextJS projects do that by default), you may adjust your naming strategy to always generate `tableName` and `fieldNames` options (e.g. by unconditionally returning an empty string in `classToTableName` and `propertyToColumnName`), and regenerate your entities. This will ensure that no matter how the JS identifiers end up as in the production bundle, they will map to the correct tables and columns in your database. ## ⛳ Checkpoint 4[​](#-checkpoint-4 "Direct link to ⛳ Checkpoint 4") Our application is fully ready to be deployed. You can always add more features, optimize performance in some areas, make error handling nicer, use "as" even less, and so on. --- # Source: https://mikro-orm.io/docs/schema-generator.md # Schema Generator > SchemaGenerator can do harm to your database. It will drop or alter tables, indexes, sequences and such. Please use this tool with caution in development and not on a production server. It is meant for helping you develop your Database Schema, but NOT with migrating schema from A to B in production. A safe approach would be generating the SQL on development server and saving it into SQL Migration files that are executed manually on the production server. > SchemaGenerator assumes your project uses the given database on its own. Update and Drop commands will mess with other tables if they are not related to the current project that is using MikroORM. Please be careful! To generate schema from your entity metadata, you can use `SchemaGenerator` helper. You can use it via CLI: > To work with the CLI, first install `@mikro-orm/cli` package locally. The version needs to be aligned with the `@mikro-orm/core` package. ``` npx mikro-orm schema:create --dump # Dumps create schema SQL npx mikro-orm schema:update --dump # Dumps update schema SQL npx mikro-orm schema:drop --dump # Dumps drop schema SQL ``` > You can also use `--run` flag to fire all queries, but be careful as it might break your database. Be sure to always check the generated SQL first before executing. Do not use `--run` flag in production! `schema:create` will automatically create the database if it does not exist. `schema:update` drops all unknown tables by default, you can use `--no-drop-tables` to get around it. There is also `--safe` flag that will disable both table dropping and column dropping. `schema:drop` will by default drop all database tables. You can use `--drop-db` flag to drop the whole database instead. ``` npx mikro-orm schema:fresh --run # !WARNING! Drops the database schema and recreates it ``` This command can be run with the `--seed` option to seed the database after it has been created again. ``` npx mikro-orm schema:fresh --run --seed # seed the database with the default database seeder npx mikro-orm schema:fresh --run --seed=UsersSeeder # seed the database with the UsersSeeder ``` > You can specify the default database seeder in the orm config with the key `config.seeder.defaultSeeder` ## Configuration[​](#configuration "Direct link to Configuration") We can configure the schema generator globally via the ORM config: ``` const orm = await MikroORM.init({ // default values: schemaGenerator: { disableForeignKeys: true, createForeignKeyConstraints: true, ignoreSchema: [], skipTables: [], skipColumns: {}, }, }); ``` ### Available options[​](#available-options "Direct link to Available options") | Option | Description | | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `disableForeignKeys: boolean` | Whether to wrap schema statements with `set foreign_key_checks = 0` or equivalent. Defaults to `true`. This disables foreign key checks during schema operations to avoid constraint violations during table creation/modification. | | `createForeignKeyConstraints: boolean` | Whether to generate foreign key constraints. Defaults to `true`. When set to `false`, foreign key relationships will not create database-level constraints. | | `ignoreSchema: string[]` | Array of schema names to ignore during schema diffing. Useful when working with databases that have multiple schemas and you want to exclude certain schemas from being managed by MikroORM. | | `skipTables: (string \| RegExp)[]` | Array of table names and patterns to exclude from schema generation. Accepts exact table names (case-insensitive) and RegExp patterns. Can include schema-qualified names like `'schema.table'`. Tables matching these names or patterns will be completely ignored during schema operations. | | `skipColumns: Dictionary<(string \| RegExp)[]>` | Object mapping table names to arrays of column names and patterns to exclude from schema generation. Keys can be table names or schema-qualified table names (e.g., `'auth.users'`). Values are arrays of exact column names (case-insensitive) or RegExp patterns. Columns matching these names or patterns will be ignored during schema operations for the specified tables. | | `managementDbName: string` | Name of the management database to use for operations that require administrative privileges (like creating databases). Platform-specific option mainly used by SQL Server. | ### Example configuration[​](#example-configuration "Direct link to Example configuration") ``` const orm = await MikroORM.init({ schemaGenerator: { disableForeignKeys: false, createForeignKeyConstraints: true, ignoreSchema: ['information_schema', 'performance_schema'], skipTables: ['auth_sessions', 'audit_log', /^temp_/], skipColumns: { 'auth.users': ['encrypted_password', 'email_confirm_token'], users: ['internal_notes', /^system_/], }, }, }); ``` > Note that if we disable FK constraints and current schema is using them, the schema diffing will try to remove those that already exist. ## Skipping tables and columns[​](#skipping-tables-and-columns "Direct link to Skipping tables and columns") When working with databases that have existing schema (like Supabase auth schema or legacy systems), you might want to skip certain tables or columns during schema generation: ``` const orm = await MikroORM.init({ schemaGenerator: { // Skip entire tables during schema generation skipTables: ['posts', 'comments', /audit_.*/], // Skip specific columns in certain tables skipColumns: { users: ['password', 'internal_id'], 'auth.sessions': ['data', /^internal_/], }, }, }); ``` Both `skipTables` and `skipColumns` support: * **String names**: exact table/column name matches (case-insensitive) * **RegExp patterns**: flexible pattern matching * **Schema-qualified names**: use `schema.table` format for specific schemas This is particularly useful when: * Working with third-party database schemas (e.g., Supabase auth schema) * Managing legacy database tables that shouldn't be modified * Excluding audit or system tables from your application schema Example for Supabase integration: ``` const orm = await MikroORM.init({ entities: [User], // Your User entity maps to auth.users schemaGenerator: { // Skip all auth schema tables except users skipTables: [ 'auth.sessions', 'auth.refresh_tokens', 'auth.audit_log_entries', // ... other auth tables you don't need ], // Skip sensitive columns in auth.users if needed skipColumns: { 'auth.users': ['encrypted_password', 'email_confirm_token'], }, }, }); ``` ## Using SchemaGenerator programmatically[​](#using-schemagenerator-programmatically "Direct link to Using SchemaGenerator programmatically") Or you can create simple script where you initialize MikroORM like this: ./create-schema.ts ``` import { MikroORM } from '@mikro-orm/core'; (async () => { const orm = await MikroORM.init({ entities: [Author, Book, ...], dbName: 'your-db-name', // ... }); const generator = orm.schema; const dropDump = await generator.getDropSchemaSQL(); console.log(dropDump); const createDump = await generator.getCreateSchemaSQL(); console.log(createDump); const updateDump = await generator.getUpdateSchemaSQL(); console.log(updateDump); // there is also `generate()` method that returns drop + create queries const dropAndCreateDump = await generator.generate(); console.log(dropAndCreateDump); // or you can run those queries directly, but be sure to check them first! await generator.dropSchema(); await generator.createSchema(); await generator.updateSchema(); // in tests it can be handy to use those: await generator.refreshDatabase(); // ensure db exists and is fresh await generator.clearDatabase(); // removes all data await orm.close(true); })(); ``` Then run this script via `ts-node` (or compile it to plain JS and use `node`): ``` $ ts-node create-schema ``` ## Ignoring specific column changes[​](#ignoring-specific-column-changes "Direct link to Ignoring specific column changes") When using generated columns, we'll get a perpetual diff on every `SchemaGenerator` run unless we set `ignoreSchemaChanges` to ignore changes to `type` and `extra`. See the [SQL Generated columns](https://mikro-orm.io/docs/defining-entities.md#sql-generated-columns) section for more details. ## Limitations of SQLite[​](#limitations-of-sqlite "Direct link to Limitations of SQLite") There are limitations of SQLite database because of which it behaves differently than other SQL drivers. Namely, it is not possible to: * create foreign key constraints when altering columns * create empty tables without columns * alter column requires nullability Because of this, you can end up with different schema with SQLite, so it is not suggested to use SQLite for integration tests of your application. ## Debugging[​](#debugging "Direct link to Debugging") Sometimes the schema diffing might not work as expected and will produce unwanted queries. Often this is a problem with how you set up the `columnType` or `default/defaultRaw` options of your properties. You can use `MIKRO_ORM_CLI_VERBOSE` env var to enable verbose logging of the CLI, which in turn enables both the underlying queries used to extract the current schema, and logs in the `SchemaComparator` which should help you understand why the ORM sees two columns as different (and what particular options are different). ``` $ MIKRO_ORM_CLI_VERBOSE=1 npx mikro-orm schema:update --dump ``` --- # Source: https://mikro-orm.io/search.md [Skip to main content](#__docusaurus_skipToContent_fallback) ⭐️ If you like MikroORM, give it a star on [GitHub](https://github.com/mikro-orm/mikro-orm) and consider [sponsoring](https://github.com/sponsors/mikro-orm) its development! ⭐️ [![MikroORM](/img/logo.svg)![MikroORM](/img/logo.svg)](https://mikro-orm.io/index.md) [****](https://mikro-orm.io/index.md) [6.6](https://mikro-orm.io/docs/quick-start.md) * [7.0 (next)](https://mikro-orm.io/docs/next/quick-start) * [6.6](https://mikro-orm.io/docs/quick-start.md) * [5.9](https://mikro-orm.io/docs/5.9/installation) [Docs](https://mikro-orm.io/docs/quick-start.md)[API](https://mikro-orm.io/api.md)[FAQ](https://mikro-orm.io/docs/faq.md)[Blog](https://mikro-orm.io/blog.md)[Changelog](https://mikro-orm.io/api/core/changelog.md) [latest: v6.6.4](https://mikro-orm.io/versions.md)[Discord](https://discord.gg/w8bjxFHS7X "Chat on Discord")[GitHub](https://github.com/mikro-orm/mikro-orm "View on GitHub")[Twitter](https://twitter.com/MikroORM "Twitter") Search # Search the documentation Type your search here 7.0 (next) (current) Powered by[](https://www.algolia.com/) #### Docs * [Quick Start](https://mikro-orm.io/docs/quick-start.md) * [Getting Started](https://mikro-orm.io/docs/guide.md) * [Migration from v5 to v6](https://mikro-orm.io/docs/upgrading-v5-to-v6.md) * [Version 5.9 docs](https://mikro-orm.io/docs/5.9/installation) #### Community * [Discord](https://discord.gg/w8bjxFHS7X) * [Slack](https://join.slack.com/t/mikroorm/shared_invite/enQtNTM1ODYzMzM4MDk3LWM4ZDExMjU5ZDhmNjA2MmM3MWMwZmExNjhhNDdiYTMwNWM0MGY5ZTE3ZjkyZTMzOWExNDgyYmMzNDE1NDI5NjA) * [Stack Overflow](https://stackoverflow.com/questions/ask?tags=mikro-orm) #### Social * [Blog](https://mikro-orm.io/blog.md) * [Twitter](https://twitter.com/MikroORM) * [GitHub](https://github.com/mikro-orm/mikro-orm) * [Sponsor B4nan](https://ghbtns.com/github-btn.html?user=mikro-orm\&type=sponsor) ![MikroORM](/img/logo-header.svg) Copyright © 2018-2026 Martin Adámek. Built with Docusaurus. Icons made by [surang](https://www.flaticon.com/authors/surang "surang") and [Skyclick](https://www.flaticon.com/authors/skyclick "Skyclick"). --- # Source: https://mikro-orm.io/docs/seeding.md # Seeding When initializing your application or testing it can be exhausting to create sample data for your database. The solution is to use seeding. Create factories for your entities and use them in the seed script or combine multiple seed scripts. info To use seeder, you need to first install `@mikro-orm/seeder`, and register the `SeedManager` extension in your ORM config. mikro-orm.config.ts ``` import { SeedManager } from '@mikro-orm/seeder'; export default defineConfig({ // ... extensions: [SeedManager], }) ``` ## Configuration[​](#configuration "Direct link to Configuration") > `seeder.path` and `seeder.pathTs` works the same way as `entities` and `entitiesTs` in entity discovery. The seeder has a few default settings that can be changed easily through the MikroORM config. Underneath, you find the configuration options with their defaults. ``` MikroORM.init({ seeder: { path: './seeders', // path to the folder with seeders pathTs: undefined, // path to the folder with TS seeders (if used, you should put path to compiled files in `path`) defaultSeeder: 'DatabaseSeeder', // default seeder class name glob: '!(*.d).{js,ts}', // how to match seeder files (all .js and .ts files, but not .d.ts) emit: 'ts', // seeder generation mode fileName: (className: string) => className, // seeder file naming convention }, }); ``` You can also override those options using the [environment variables](https://mikro-orm.io/docs/configuration.md#using-environment-variables): * `MIKRO_ORM_SEEDER_PATH` * `MIKRO_ORM_SEEDER_PATH_TS` * `MIKRO_ORM_SEEDER_EMIT` * `MIKRO_ORM_SEEDER_GLOB` * `MIKRO_ORM_SEEDER_DEFAULT_SEEDER` ## Seeders[​](#seeders "Direct link to Seeders") A seeder class contains one method `run`. This method is called when you use the command `npx mikro-orm seeder:run`. In the `run` method you define how and what data you want to insert into the database. You can create entities using the [EntityManager](http://mikro-orm.io/docs/entity-manager) or you can use [Factories](#using-entity-factories). You can create your own seeder classes using the following CLI command: ``` npx mikro-orm seeder:create DatabaseSeeder # generates the class DatabaseSeeder npx mikro-orm seeder:create test # generates the class TestSeeder npx mikro-orm seeder:create project-names # generates the class ProjectNamesSeeder ``` This creates a new seeder class. By default, it will be generated in the `./seeders/` directory. You can configure the directory in the config with the key `seeder.path` or using the [environment variable](https://mikro-orm.io/docs/configuration.md#using-environment-variables) `MIKRO_ORM_SEEDER_PATH`. You are allowed to call the `seeder:create` command with a name, class name or hyphenated name. As an example, let's look at a very basic seeder. > Note that the `EntityManager` available in seeders will have `persistOnCreate` enabled (even if you explicitly disable it in the ORM config), hence calling `em.create()` will automatically call `em.persist()` on the created entity. If you use entity constructor instead, you need to call `em.persist()` explicitly. ./database/seeder/database.seeder.ts ``` import { EntityManager } from '@mikro-orm/core'; import { Seeder } from '@mikro-orm/seeder'; import { Author } from './author' export class DatabaseSeeder extends Seeder { async run(em: EntityManager): Promise { // will get persisted automatically const author = em.create(Author, { name: 'John Snow', email: 'snow@wall.st' }); // but if you would do `const author = new Author()` instead, // you would need to call `em.persist(author)` explicitly. } } ``` > Running a seeder from the command line or programmatically will automatically call `flush` and `clear` after the `run` method has completed. ### Using entity factories[​](#using-entity-factories "Direct link to Using entity factories") Instead of specifying all the attributes for every entity, you can also use [entity factories](#entity-factories). These can be used to generate large amounts of database records. Please read the [documentation on how to define factories](#entity-factories) to learn how to define your factories. In the following example, we generate 10 author entities. ``` import { EntityManager } from '@mikro-orm/core'; import { Seeder } from '@mikro-orm/seeder'; import { AuthorFactory } from '../factories/author.factory' export class DatabaseSeeder extends Seeder { async run(em: EntityManager): Promise { new AuthorFactory(em).make(10); } } ``` ### Calling additional seeders[​](#calling-additional-seeders "Direct link to Calling additional seeders") Inside the `run` method you can specify other seeder classes. You can use the `call` method to break up the database seeder into multiple files to prevent a seeder file from becoming too large. The `call` method requires an `em` and an array of seeder classes. ``` import { EntityManager } from '@mikro-orm/core'; import { Seeder } from '@mikro-orm/seeder'; import { AuthorSeeder, BookSeeder } from '../seeders' export class DatabaseSeeder extends Seeder { run(em: EntityManager): Promise { return this.call(em, [ AuthorSeeder, BookSeeder, ]); } } ``` ### Shared context[​](#shared-context "Direct link to Shared context") Often you might want to generate entities that are referencing other entities, created by other seeders. For that you can use the shared context object provided in the second parameter or `run` method. It is automatically created when using `this.call()` and passed down to each seeder's `run` method. Let's see how the `AuthorSeeder` and `BookSeeder` from previous example could look like: ``` export class AuthorSeeder extends Seeder { async run(em: EntityManager, context: Dictionary): Promise { // save the entity to the context context.author = em.create(Author, { name: '...', email: '...', }); } } ``` ``` export class BookSeeder extends Seeder { async run(em: EntityManager, context: Dictionary): Promise { em.create(Book, { title: '...', author: context.author, // use the entity from context }); } } ``` ## Entity factories[​](#entity-factories "Direct link to Entity factories") When testing you may insert entities in the database before starting a test. Instead of specifying every attribute of every entity by hand, you could also use a `Factory` to define a set of default attributes for an entity using entity factories. Let's have a look at an example factory for an [Author entity](http://mikro-orm.io/docs/defining-entities). ``` import { Factory } from '@mikro-orm/seeder'; import { faker } from '@faker-js/faker'; import { Author } from './entities/author.entity'; export class AuthorFactory extends Factory { model = Author; definition(): Partial { return { name: faker.person.findName(), email: faker.internet.email(), age: faker.random.number(18, 99), }; } } ``` Here we extend the base `Factory` class, define a `model` property and a `definition` method. The `model` defines for which entity the factory generates entity instances. The `definition` method returns the default set of attribute values that should be applied when creating an entity using the factory. In this example, we use a library called [Faker](https://github.com/faker-js/faker), which allows you to conveniently generate various kinds of random data for testing. > Since v6, Faker is no longer re-exported from the seeder package and needs to be installed separately. ### Creating entities using factories[​](#creating-entities-using-factories "Direct link to Creating entities using factories") Once you define your factories, you can use them to generate entities. Import the factory, instantiate it and call the `makeOne` method: ``` const author = new AuthorFactory(orm.em).makeOne(); ``` #### Generate multiple entities[​](#generate-multiple-entities "Direct link to Generate multiple entities") Generate multiple entities by calling the `make` method. The parameter of the `make` method is the number of entities you generate. ``` // Generate 5 authors const authors = new AuthorFactory(orm.em).make(5); ``` #### Overriding attributes[​](#overriding-attributes "Direct link to Overriding attributes") If you would like to override some of the default values of your factories, you may pass an object to the `make` method. Only the specified attributes will be replaced while the rest of the attributes remain set to their default values as specified by the factory. ``` // Make a single author const author = new AuthorFactory(orm.em).makeOne({ name: 'John Snow', }); // Make 5 authors const authors = new AuthorFactory(orm.em).make(5, { name: 'John Snow', }); ``` ### Persisting entities[​](#persisting-entities "Direct link to Persisting entities") The `create` method instantiates entities and persists them to the database using the `persistAndFlush` method of the EntityManager. ``` // Make and persist a single author const author = await new AuthorFactory(orm.em).createOne(); // Make and persist 5 authors const authors = await new AuthorFactory(orm.em).create(5); ``` You can override the default values of your factories by passing an object to the `create` method. ``` // Make and persist a single author const author = await new AuthorFactory(orm.em).createOne({ name: 'John Snow', }); // Make and persist a 5 authors const authors = await new AuthorFactory(orm.em).create(5, { name: 'John Snow', }); ``` ### Factory relationships[​](#factory-relationships "Direct link to Factory relationships") It is nice to create large quantities of data for one entity, but most of the time you will want to create data for multiple entities and also have relations between them. #### Defining relations via `.each()`[​](#defining-relations-via-each "Direct link to defining-relations-via-each") For that you can use the `each` method which can be chained on a factory. The `each` method can be called with a function that transforms output entity from the factory before returning it. Let's look at some examples of the different relations. #### ManyToOne and OneToOne relations[​](#manytoone-and-onetoone-relations "Direct link to ManyToOne and OneToOne relations") ``` const books: Book[] = new BookFactory(orm.em).each(book => { book.author = new AuthorFactory(orm.em).makeOne(); }).make(5); ``` #### OneToMany and ManyToMany[​](#onetomany-and-manytomany "Direct link to OneToMany and ManyToMany") ``` const books: Book[] = new BookFactory(orm.em).each(book => { book.owners.set(new OwnerFactory(orm.em).make(5)); }).make(5); ``` #### Defining relations via `.definition()`[​](#defining-relations-via-definition "Direct link to defining-relations-via-definition") Alternatively you can build the nested entities inside of the `definition` method. If needed, this method can accept additional params that need not to be a part of the entity schema. ``` export class AuthorFactory extends Factory< AuthorEntity, EntityData & { booksCount?: number } > { model = AuthorEntity; async definition( params?: EntityData & { booksCount?: number } ): EntityData { const name = params.name ?? faker.person.findName(); const books = params.books ?? ( [...Array(params?.booksCount ?? 0)].map((v, i) => new BookFactory(this.em).makeEntity({ title: `${name} Trilogy - Part ${i + 1}` }) ) ); return { ...params, name, books }; } } // Finally new AuthorFactory(em).createOne({ booksCount: 4 }) ``` ## Use with CLI[​](#use-with-cli "Direct link to Use with CLI") You may execute the `seeder:run` MikroORM CLI command to seed your database. By default, the `seeder:run` command runs the `DatabaseSeeder` class, which may in turn invoke other seed classes. You can configure the default seeder using the key `seeder.defaultSeeder` or using the [environment variable](https://mikro-orm.io/docs/configuration.md#using-environment-variables) `MIKRO_ORM_SEEDER_DEFAULT_SEEDER`. You can also use the `--class` option to specify a seeder class: ``` npx mikro-orm seeder:run npx mikro-orm seeder:run --class=BookSeeder ``` You may also seed your database using the [`migrate:fresh`](https://mikro-orm.io/docs/migrations.md#using-via-cli) or [`schema:fresh`](https://mikro-orm.io/docs/schema-generator.md) command in combination with the `--seed` option, which will drop all tables and re-run all of your migrations or generate the database based on the current entities. This command is useful for completely re-building your database: ``` npx mikro-orm migration:fresh --seed # will drop the database, run all migrations and the DatabaseSeeder class npx mikro-orm schema:fresh --seed # will recreate the database and run the DatabaseSeeder class ``` If you do not want to run the `DatabaseSeeder` class you can either specify what the default seeder class should be. This can be done by changing the [default settings](https://mikro-orm.io/docs/configuration.md#seeder). Another option is to explicitly define the seeder class you want to run. ``` npx mikro-orm migration:fresh --seed TestSeeder # will drop the database, run all migrations and the TestSeeder class npx mikro-orm schema:fresh --seed ProjectsSeeder # will recreate the database and run the ProjectsSeeder class ``` ## Use in tests[​](#use-in-tests "Direct link to Use in tests") Now you know how to create seeders and factories, but how can you effectively use them in tests? Let's take a look at the following example: ``` let orm: MikroORM; beforeAll(async () => { // Initialize the ORM orm = await MikroORM.init({ ... }); // Refresh the database to start clean await orm.schema.refreshDatabase(); // And run the seeder afterwards await orm.seeder.seed(DatabaseSeeder); }); test(() => { // Do tests }); afterAll(async () => { // Close connection await orm.close(); }); ``` ## Running seeder in production[​](#running-seeder-in-production "Direct link to Running seeder in production") In a production environment, you might want to use compiled seeder files. All you need to do is to configure the seeder path accordingly in your ORM config: ``` import { MikroORM, Utils } from '@mikro-orm/core'; await MikroORM.init({ seeder: { path: 'dist/seeders', pathTs: 'src/seeders', }, // or alternatively // seeder: { // path: Utils.detectTsNode() ? 'src/seeders' : 'dist/seeders', // }, // ... }); ``` This should allow using CLI to generate TS seeder files (as in CLI we probably have TS support enabled), while using compiled JS files in production, where ts-node is not registered. --- # Source: https://mikro-orm.io/api/core/function/serialize.md # serialize Converts entity instance to POJO, converting the `Collection`s to arrays and unwrapping the `Reference` wrapper, while respecting the serialization options. This method accepts either a single entity or an array of entities, and returns the corresponding POJO or an array of POJO. To serialize a single entity, you can also use `wrap(entity).serialize()` which handles a single entity only. ``` const dtos = serialize([user1, user, ...], { exclude: ['id', 'email'], forceObject: true }); const [dto2, dto3] = serialize([user2, user3], { exclude: ['id', 'email'], forceObject: true }); const dto1 = serialize(user, { exclude: ['id', 'email'], forceObject: true }); const dto2 = wrap(user).serialize({ exclude: ['id', 'email'], forceObject: true }); ``` ### Callable * ****serialize**\(entity, options): Naked extends object\[] ? [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, Populate>, CleanTypeConfig\>\[] : [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, CleanTypeConfig\> *** * Converts entity instance to POJO, converting the `Collection`s to arrays and unwrapping the `Reference` wrapper, while respecting the serialization options. This method accepts either a single entity or an array of entities, and returns the corresponding POJO or an array of POJO. To serialize a single entity, you can also use `wrap(entity).serialize()` which handles a single entity only. ``` const dtos = serialize([user1, user, ...], { exclude: ['id', 'email'], forceObject: true }); const [dto2, dto3] = serialize([user2, user3], { exclude: ['id', 'email'], forceObject: true }); const dto1 = serialize(user, { exclude: ['id', 'email'], forceObject: true }); const dto2 = wrap(user).serialize({ exclude: ['id', 'email'], forceObject: true }); ``` *** #### Parameters * ##### entity: Entity * ##### optionaloptions: Config & [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md)<[UnboxArray](https://mikro-orm.io/api/core.md#UnboxArray)\, Populate, Exclude> #### Returns Naked extends object\[] ? [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, Populate>, CleanTypeConfig\>\[] : [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO)<[Loaded](https://mikro-orm.io/api/core.md#Loaded)\, CleanTypeConfig\> --- # Source: https://mikro-orm.io/docs/serializing.md # Serializing By default, the ORM will define a `toJSON` method on all of your entity prototypes during discovery. This means that when you try to serialize your entity via `JSON.stringify()`, the ORM serialization will kick in automatically. The default implementation uses `EntityTransformer.toObject()` method, which converts an entity instance into a POJO. During this process, ORM specific constructs like the `Reference` or `Collection` wrappers are converted to their underlying values. ## Hidden Properties[​](#hidden-properties "Direct link to Hidden Properties") If you want to omit some properties from serialized result, you can mark them with `hidden` flag on `@Property()` decorator. To have this information available on the type level, you also need to use the `HiddenProps` symbol: ``` @Entity() class Book { // we use the `HiddenProps` symbol to define hidden properties on type level [HiddenProps]?: 'hiddenField' | 'otherHiddenField'; @Property({ hidden: true }) hiddenField = Date.now(); @Property({ hidden: true, nullable: true }) otherHiddenField?: string; } const book = new Book(...); console.log(wrap(book).toObject().hiddenField); // undefined // @ts-expect-error accessing `hiddenField` will fail to compile thanks to the `HiddenProps` symbol console.log(wrap(book).toJSON().hiddenField); // undefined ``` Alternatively, you can use the `Hidden` type. It works the same as the `Opt` type (an alternative for `OptionalProps` symbol), and can be used in two ways: * with generics: `hiddenField?: Hidden;` * with intersections: `hiddenField?: string & Hidden;` Both will work the same, and can be combined with the `HiddenProps` symbol approach. ``` @Entity() class Book { @Property({ hidden: true }) hiddenField: Hidden = Date.now(); @Property({ hidden: true, nullable: true }) otherHiddenField?: string & Hidden; } ``` ## Shadow Properties[​](#shadow-properties "Direct link to Shadow Properties") The opposite situation where you want to define a property that lives only in memory (is not persisted into database) can be solved by defining your property as `persist: false`. Such property can be assigned via one of `Entity.assign()`, `em.create()` and `em.merge()`. It will be also part of serialized result. This can be handled when dealing with additional values selected via `QueryBuilder` or MongoDB's aggregations. ``` @Entity() class Book { @Property({ persist: false }) count?: number; } const book = new Book(...); wrap(book).assign({ count: 123 }); console.log(wrap(book).toObject().count); // 123 console.log(wrap(book).toJSON().count); // 123 ``` ## Property Serializers[​](#property-serializers "Direct link to Property Serializers") As an alternative to custom `toJSON()` method, we can also use property serializers. They allow to specify a callback that will be used when serializing a property: ``` @Entity() class Book { @ManyToOne({ serializer: value => value.name, serializedName: 'authorName' }) author: Author; } const author = new Author('God') const book = new Book(author); console.log(wrap(book).toJSON().authorName); // 'God' ``` ## Implicit serialization[​](#implicit-serialization "Direct link to Implicit serialization") Implicit serialization means calling `toObject()` or `toJSON()` on the entity, as opposed to explicitly using the `serialize()` helper. Since v6, it works entirely based on `populate` hints. This means that, unless you explicitly marked some entity as populated via `wrap(entity).populated()`, it will be part of the serialized form only if it was part of the `populate` hint: ``` // let's say both Author and Book entity has a m:1 relation to Publisher entity // we only populate the publisher relation of the Book entity const user = await em.findOneOrFail(Author, 1, { populate: ['books.publisher'], }); const dto = wrap(user).toObject(); console.log(dto.publisher); // only the FK, e.g. `123` console.log(dto.books[0].publisher); // populated, e.g. `{ id: 123, name: '...' }` ``` Moreover, the implicit serialization now respects the partial loading hints too. Previously, all loaded properties were serialized, partial loading worked only on the database query level. Since v6, we also prune the data on runtime. This means that unless the property is part of the partial loading hint (`fields` option), it won't be part of the DTO. Main difference here is the primary and foreign keys, that are often automatically selected as they are needed to build the entity graph, but will no longer be part of the DTO. ``` const user = await em.findOneOrFail(Author, 1, { fields: ['books.publisher.name'], }); const dto = wrap(user).toObject(); // only the publisher's name will be available + primary keys // `{ id: 1, books: [{ id: 2, publisher: { id: 3, name: '...' } }] }` ``` **This also works for embeddables, including nesting and object mode.** Primary keys are automatically included. If you want to hide them, you have two options: * use `hidden: true` in the property options * use `serialization: { includePrimaryKeys: false }` in the ORM config ### Foreign keys and `forceObject`[​](#foreign-keys-and-forceobject "Direct link to foreign-keys-and-forceobject") Unpopulated relations are serialized as foreign key values, e.g. `{ author: 1 }`, if you want to enforce objects, e.g. `{ author: { id: 1 } }`, use `serialization: { forceObject: true }` in your ORM config. For strict typings to respect the global config option, you need to define it on your entity class via `Config` symbol: ``` import { Config, Entity, ManyToOne, PrimaryKey, Ref, wrap } from '@mikro-orm/core'; @Entity() class Book { [Config]?: DefineConfig<{ forceObject: true }>; @PrimaryKey() id!: number; @ManyToOne(() => User, { ref: true }) author!: Ref; } const book = await em.findOneOrFail(Book, 1); const dto = wrap(book).toObject(); const identityId = dto.author.id; // without the Config symbol, `dto.identity` would resolve to number ``` ## Explicit serialization[​](#explicit-serialization "Direct link to Explicit serialization") The serialization process is normally driven by the `populate` hints. If you want to take control over this, you can use the `serialize()` helper: ``` import { serialize } from '@mikro-orm/core'; const dtos = serialize([user1, user2]); // [ // { name: '...', books: [1, 2, 3], identity: 123 }, // { name: '...', ... }, // ] const [dto] = serialize(user1); // always returns an array // { name: '...', books: [1, 2, 3], identity: 123 } // for a single entity instance we can as well use `wrap(e).serialize()` const dto2 = wrap(user1).serialize(); // { name: '...', books: [1, 2, 3], identity: 123 } ``` By default, every relation is considered as not populated - this will result in the foreign key values to be present. Loaded collections will be represented as arrays of the foreign keys. To control the shape of the serialized response we can use the second `options` parameter: ``` interface SerializeOptions { /** Specify which relation should be serialized as populated and which as a FK. */ populate?: AutoPath[] | boolean; /** Specify which properties should be omitted. */ exclude?: AutoPath[]; /** Enforce unpopulated references to be returned as objects, e.g. `{ author: { id: 1 } }` instead of `{ author: 1 }`. */ forceObject?: boolean; /** Ignore custom property serializers. */ ignoreSerializers?: boolean; /** Include properties marked as `hidden`. */ includeHidden?: boolean; /** Skip properties with `null` value. */ skipNull?: boolean; /** Only include properties for a specific group. If a property does not specify any group, it will be included, otherwise only properties with a matching group are included. */ groups?: string[]; } ``` Here is a more complex example: ``` import { wrap } from '@mikro-orm/core'; const dto = wrap(author).serialize({ populate: ['books.author', 'books.publisher', 'favouriteBook'], // populate some relations exclude: ['books.author.email'], // skip property of some relation forceObject: true, // not populated or not initialized relations will result in object, e.g. `{ author: { id: 1 } }` skipNull: true, // properties with `null` value won't be part of the result }); ``` If you try to populate a relation that is not initialized, it will have same effect as the `forceObject` option - the value will be represented as object with just the primary key available. ### Serialization groups[​](#serialization-groups "Direct link to Serialization groups") Every property can specify its serialization groups, which are then used with explicit serialization. > Properties without the `groups` option are always included. Let's consider the following entity: ``` @Entity() class User { @PrimaryKey() id!: number; @Property() username!: string; @Property({ groups: ['public', 'private'] }) name!: string; @Property({ groups: ['private'] }) email!: string; } ``` Now when you call `serialize()`: * without the `groups` option, you get all the properties * with `groups: ['public']` you get `id`, `username` and `name` properties * with `groups: ['private']` you get `id`, `username`, `name` and `email` properties * with `groups: []` you get only the `id` and `username` properties (those without groups) ``` const dto1 = serialize(user); // User { id: 1, username: 'foo', name: 'Jon', email: 'jon@example.com' } const dto2 = serialize(user, { groups: ['public'] }); // User { id: 1, username: 'foo', name: 'Jon' } ``` ## Caching and `toPOJO`[​](#caching-and-topojo "Direct link to caching-and-topojo") While `toObject` and `serialize` are often enough for serializing your entities, there is one use case where they often fall short, which is caching. When caching an entity, you usually want to ignore things like custom serializers or hidden properties. Once you try to load this entity from cache, it needs to have all the properties just like if you load it again. Imagine the following scenario: you have a `User` entity that has a `password` property, which is `hidden: true`. Calling `toObject()` or `serialize()` would omit this hidden `password` property, while `toPOJO()` would keep it. If you want to cache such an entity, you want to have all the properties, not just those that are visible. > The `toPOJO` method will also ignore serialization hints (`populate` and `fields`) and will expand all relations unless they form a cycle. ## Custom `toJSON` method[​](#custom-tojson-method "Direct link to custom-tojson-method") You can provide custom implementation for `toJSON`, while using `toObject` for initial serialization: ``` @Entity() class Book { // ... toJSON(strict = true, strip = ['id', 'email'], ...args: any[]): { [p: string]: any } { const o = wrap(this, true).toObject(...args); // do not forget to pass rest params here if (strict) { strip.forEach(k => delete o[k]); } return o; } } ``` > Do not forget to pass rest params when calling `toObject(...args)`, otherwise the results might not be stable. --- # Source: https://mikro-orm.io/api/core/function/sql.md # Source: https://mikro-orm.io/blog/tags/sql.md ## [MikroORM 6.6](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) · 6 min read [![Martin Adámek](https://avatars1.githubusercontent.com/u/615580?s=460\&v=4)](https://github.com/B4nan) [Martin Adámek](https://github.com/B4nan) Author of MikroORM [MikroORM v6.6](https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.0) is out. This release builds on top of the [previous version](https://mikro-orm.io/blog/mikro-orm-6-5-released), improving the configurability of the filters on relations and adding more features to the entity generator. **Tags:** * [typescript](https://mikro-orm.io/blog/tags/typescript.md) * [javascript](https://mikro-orm.io/blog/tags/javascript.md) * [node](https://mikro-orm.io/blog/tags/node.md) * [sql](https://mikro-orm.io/blog/tags/sql.md) [**Read More**](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) --- # Source: https://mikro-orm.io/api/sqlite.md # @mikro-orm/sqlite ## Index[**](#Index) ### References * [**AbstractNamingStrategy](https://mikro-orm.io/api/sqlite.md#AbstractNamingStrategy) * [**AbstractSchemaGenerator](https://mikro-orm.io/api/sqlite.md#AbstractSchemaGenerator) * [**AbstractSqlConnection](https://mikro-orm.io/api/sqlite.md#AbstractSqlConnection) * [**AbstractSqlDriver](https://mikro-orm.io/api/sqlite.md#AbstractSqlDriver) * [**AbstractSqlPlatform](https://mikro-orm.io/api/sqlite.md#AbstractSqlPlatform) * [**AfterCreate](https://mikro-orm.io/api/sqlite.md#AfterCreate) * [**AfterDelete](https://mikro-orm.io/api/sqlite.md#AfterDelete) * [**AfterUpdate](https://mikro-orm.io/api/sqlite.md#AfterUpdate) * [**AfterUpsert](https://mikro-orm.io/api/sqlite.md#AfterUpsert) * [**Alias](https://mikro-orm.io/api/sqlite.md#Alias) * [**AnyEntity](https://mikro-orm.io/api/sqlite.md#AnyEntity) * [**AnyString](https://mikro-orm.io/api/sqlite.md#AnyString) * [**ARRAY\_OPERATORS](https://mikro-orm.io/api/sqlite.md#ARRAY_OPERATORS) * [**ArrayCollection](https://mikro-orm.io/api/sqlite.md#ArrayCollection) * [**ArrayType](https://mikro-orm.io/api/sqlite.md#ArrayType) * [**assign](https://mikro-orm.io/api/sqlite.md#assign) * [**AssignOptions](https://mikro-orm.io/api/sqlite.md#AssignOptions) * [**AutoPath](https://mikro-orm.io/api/sqlite.md#AutoPath) * [**BaseEntity](https://mikro-orm.io/api/sqlite.md#BaseEntity) * [**BaseSqliteConnection](https://mikro-orm.io/api/sqlite.md#BaseSqliteConnection) * [**BaseSqlitePlatform](https://mikro-orm.io/api/sqlite.md#BaseSqlitePlatform) * [**BaseSqliteSchemaHelper](https://mikro-orm.io/api/sqlite.md#BaseSqliteSchemaHelper) * [**BeforeCreate](https://mikro-orm.io/api/sqlite.md#BeforeCreate) * [**BeforeDelete](https://mikro-orm.io/api/sqlite.md#BeforeDelete) * [**BeforeUpdate](https://mikro-orm.io/api/sqlite.md#BeforeUpdate) * [**BeforeUpsert](https://mikro-orm.io/api/sqlite.md#BeforeUpsert) * [**BetterSqliteKnexDialect](https://mikro-orm.io/api/sqlite.md#BetterSqliteKnexDialect) * [**BigIntType](https://mikro-orm.io/api/sqlite.md#BigIntType) * [**BlobType](https://mikro-orm.io/api/sqlite.md#BlobType) * [**BooleanType](https://mikro-orm.io/api/sqlite.md#BooleanType) * [**CacheAdapter](https://mikro-orm.io/api/sqlite.md#CacheAdapter) * [**Cascade](https://mikro-orm.io/api/sqlite.md#Cascade) * [**Cast](https://mikro-orm.io/api/sqlite.md#Cast) * [**ChangeSet](https://mikro-orm.io/api/sqlite.md#ChangeSet) * [**ChangeSetComputer](https://mikro-orm.io/api/sqlite.md#ChangeSetComputer) * [**ChangeSetPersister](https://mikro-orm.io/api/sqlite.md#ChangeSetPersister) * [**ChangeSetType](https://mikro-orm.io/api/sqlite.md#ChangeSetType) * [**CharacterType](https://mikro-orm.io/api/sqlite.md#CharacterType) * [**Check](https://mikro-orm.io/api/sqlite.md#Check) * [**CheckCallback](https://mikro-orm.io/api/sqlite.md#CheckCallback) * [**CheckConstraintViolationException](https://mikro-orm.io/api/sqlite.md#CheckConstraintViolationException) * [**CheckDef](https://mikro-orm.io/api/sqlite.md#CheckDef) * [**CheckOptions](https://mikro-orm.io/api/sqlite.md#CheckOptions) * [**ClearDatabaseOptions](https://mikro-orm.io/api/sqlite.md#ClearDatabaseOptions) * [**Collection](https://mikro-orm.io/api/sqlite.md#Collection) * [**Column](https://mikro-orm.io/api/sqlite.md#Column) * [**ColumnDifference](https://mikro-orm.io/api/sqlite.md#ColumnDifference) * [**compareArrays](https://mikro-orm.io/api/sqlite.md#compareArrays) * [**compareBooleans](https://mikro-orm.io/api/sqlite.md#compareBooleans) * [**compareBuffers](https://mikro-orm.io/api/sqlite.md#compareBuffers) * [**compareObjects](https://mikro-orm.io/api/sqlite.md#compareObjects) * [**Config](https://mikro-orm.io/api/sqlite.md#Config) * [**Configuration](https://mikro-orm.io/api/sqlite.md#Configuration) * [**Connection](https://mikro-orm.io/api/sqlite.md#Connection) * [**ConnectionConfig](https://mikro-orm.io/api/sqlite.md#ConnectionConfig) * [**ConnectionException](https://mikro-orm.io/api/sqlite.md#ConnectionException) * [**ConnectionOptions](https://mikro-orm.io/api/sqlite.md#ConnectionOptions) * [**ConnectionType](https://mikro-orm.io/api/sqlite.md#ConnectionType) * [**ConstraintViolationException](https://mikro-orm.io/api/sqlite.md#ConstraintViolationException) * [**Constructor](https://mikro-orm.io/api/sqlite.md#Constructor) * [**CountOptions](https://mikro-orm.io/api/sqlite.md#CountOptions) * [**CountQueryBuilder](https://mikro-orm.io/api/sqlite.md#CountQueryBuilder) * [**CreateContextOptions](https://mikro-orm.io/api/sqlite.md#CreateContextOptions) * [**CreateOptions](https://mikro-orm.io/api/sqlite.md#CreateOptions) * [**CreateRequestContext](https://mikro-orm.io/api/sqlite.md#CreateRequestContext) * [**CreateSchemaOptions](https://mikro-orm.io/api/sqlite.md#CreateSchemaOptions) * [**createSqlFunction](https://mikro-orm.io/api/sqlite.md#createSqlFunction) * [**Cursor](https://mikro-orm.io/api/sqlite.md#Cursor) * [**CursorError](https://mikro-orm.io/api/sqlite.md#CursorError) * [**DatabaseDriver](https://mikro-orm.io/api/sqlite.md#DatabaseDriver) * [**DatabaseObjectExistsException](https://mikro-orm.io/api/sqlite.md#DatabaseObjectExistsException) * [**DatabaseObjectNotFoundException](https://mikro-orm.io/api/sqlite.md#DatabaseObjectNotFoundException) * [**DataloaderType](https://mikro-orm.io/api/sqlite.md#DataloaderType) * [**DataloaderUtils](https://mikro-orm.io/api/sqlite.md#DataloaderUtils) * [**DateTimeType](https://mikro-orm.io/api/sqlite.md#DateTimeType) * [**DateType](https://mikro-orm.io/api/sqlite.md#DateType) * [**DeadlockException](https://mikro-orm.io/api/sqlite.md#DeadlockException) * [**DecimalType](https://mikro-orm.io/api/sqlite.md#DecimalType) * [**DeepPartial](https://mikro-orm.io/api/sqlite.md#DeepPartial) * [**DefaultLogger](https://mikro-orm.io/api/sqlite.md#DefaultLogger) * [**DeferMode](https://mikro-orm.io/api/sqlite.md#DeferMode) * [**DefineConfig](https://mikro-orm.io/api/sqlite.md#DefineConfig) * [**defineEntity](https://mikro-orm.io/api/sqlite.md#defineEntity) * [**DefineEntityHooks](https://mikro-orm.io/api/sqlite.md#DefineEntityHooks) * [**DeleteOptions](https://mikro-orm.io/api/sqlite.md#DeleteOptions) * [**DeleteQueryBuilder](https://mikro-orm.io/api/sqlite.md#DeleteQueryBuilder) * [**Dictionary](https://mikro-orm.io/api/sqlite.md#Dictionary) * [**DoubleType](https://mikro-orm.io/api/sqlite.md#DoubleType) * [**DriverException](https://mikro-orm.io/api/sqlite.md#DriverException) * [**DriverMethodOptions](https://mikro-orm.io/api/sqlite.md#DriverMethodOptions) * [**DropSchemaOptions](https://mikro-orm.io/api/sqlite.md#DropSchemaOptions) * [**DynamicPassword](https://mikro-orm.io/api/sqlite.md#DynamicPassword) * [**EagerProps](https://mikro-orm.io/api/sqlite.md#EagerProps) * [**Edge](https://mikro-orm.io/api/sqlite.md#Edge) * [**Embeddable](https://mikro-orm.io/api/sqlite.md#Embeddable) * [**EmbeddableOptions](https://mikro-orm.io/api/sqlite.md#EmbeddableOptions) * [**Embedded](https://mikro-orm.io/api/sqlite.md#Embedded) * [**EmbeddedOptions](https://mikro-orm.io/api/sqlite.md#EmbeddedOptions) * [**EmbeddedPrefixMode](https://mikro-orm.io/api/sqlite.md#EmbeddedPrefixMode) * [**EmptyOptions](https://mikro-orm.io/api/sqlite.md#EmptyOptions) * [**EnsureDatabaseOptions](https://mikro-orm.io/api/sqlite.md#EnsureDatabaseOptions) * [**EnsureRequestContext](https://mikro-orm.io/api/sqlite.md#EnsureRequestContext) * [**Entity](https://mikro-orm.io/api/sqlite.md#Entity) * [**EntityAssigner](https://mikro-orm.io/api/sqlite.md#EntityAssigner) * [**EntityCaseNamingStrategy](https://mikro-orm.io/api/sqlite.md#EntityCaseNamingStrategy) * [**EntityClass](https://mikro-orm.io/api/sqlite.md#EntityClass) * [**EntityClassGroup](https://mikro-orm.io/api/sqlite.md#EntityClassGroup) * [**EntityComparator](https://mikro-orm.io/api/sqlite.md#EntityComparator) * [**EntityData](https://mikro-orm.io/api/sqlite.md#EntityData) * [**EntityDataValue](https://mikro-orm.io/api/sqlite.md#EntityDataValue) * [**EntityDictionary](https://mikro-orm.io/api/sqlite.md#EntityDictionary) * [**EntityDTO](https://mikro-orm.io/api/sqlite.md#EntityDTO) * [**EntityFactory](https://mikro-orm.io/api/sqlite.md#EntityFactory) * [**EntityField](https://mikro-orm.io/api/sqlite.md#EntityField) * [**EntityKey](https://mikro-orm.io/api/sqlite.md#EntityKey) * [**EntityLoader](https://mikro-orm.io/api/sqlite.md#EntityLoader) * [**EntityLoaderOptions](https://mikro-orm.io/api/sqlite.md#EntityLoaderOptions) * [**EntityManager](https://mikro-orm.io/api/sqlite.md#EntityManager) * [**EntityManagerType](https://mikro-orm.io/api/sqlite.md#EntityManagerType) * [**EntityMetadata](https://mikro-orm.io/api/sqlite.md#EntityMetadata) * [**EntityName](https://mikro-orm.io/api/sqlite.md#EntityName) * [**EntityOptions](https://mikro-orm.io/api/sqlite.md#EntityOptions) * [**EntityProperty](https://mikro-orm.io/api/sqlite.md#EntityProperty) * [**EntityProps](https://mikro-orm.io/api/sqlite.md#EntityProps) * [**EntityRef](https://mikro-orm.io/api/sqlite.md#EntityRef) * [**EntityRepository](https://mikro-orm.io/api/sqlite.md#EntityRepository) * [**EntityRepositoryType](https://mikro-orm.io/api/sqlite.md#EntityRepositoryType) * [**EntitySchema](https://mikro-orm.io/api/sqlite.md#EntitySchema) * [**EntitySchemaMetadata](https://mikro-orm.io/api/sqlite.md#EntitySchemaMetadata) * [**EntitySchemaProperty](https://mikro-orm.io/api/sqlite.md#EntitySchemaProperty) * [**EntitySerializer](https://mikro-orm.io/api/sqlite.md#EntitySerializer) * [**EntityTransformer](https://mikro-orm.io/api/sqlite.md#EntityTransformer) * [**EntityType](https://mikro-orm.io/api/sqlite.md#EntityType) * [**EntityValidator](https://mikro-orm.io/api/sqlite.md#EntityValidator) * [**EntityValue](https://mikro-orm.io/api/sqlite.md#EntityValue) * [**Enum](https://mikro-orm.io/api/sqlite.md#Enum) * [**EnumArrayType](https://mikro-orm.io/api/sqlite.md#EnumArrayType) * [**EnumOptions](https://mikro-orm.io/api/sqlite.md#EnumOptions) * [**EnumType](https://mikro-orm.io/api/sqlite.md#EnumType) * [**equals](https://mikro-orm.io/api/sqlite.md#equals) * [**EventArgs](https://mikro-orm.io/api/sqlite.md#EventArgs) * [**EventManager](https://mikro-orm.io/api/sqlite.md#EventManager) * [**EventSubscriber](https://mikro-orm.io/api/sqlite.md#EventSubscriber) * [**EventType](https://mikro-orm.io/api/sqlite.md#EventType) * [**EventTypeMap](https://mikro-orm.io/api/sqlite.md#EventTypeMap) * [**ExceptionConverter](https://mikro-orm.io/api/sqlite.md#ExceptionConverter) * [**ExecuteOptions](https://mikro-orm.io/api/sqlite.md#ExecuteOptions) * [**ExpandHint](https://mikro-orm.io/api/sqlite.md#ExpandHint) * [**ExpandProperty](https://mikro-orm.io/api/sqlite.md#ExpandProperty) * [**ExpandQuery](https://mikro-orm.io/api/sqlite.md#ExpandQuery) * [**ExpandScalar](https://mikro-orm.io/api/sqlite.md#ExpandScalar) * [**FactoryOptions](https://mikro-orm.io/api/sqlite.md#FactoryOptions) * [**Field](https://mikro-orm.io/api/sqlite.md#Field) * [**FileCacheAdapter](https://mikro-orm.io/api/sqlite.md#FileCacheAdapter) * [**Filter](https://mikro-orm.io/api/sqlite.md#Filter) * [**FilterItemValue](https://mikro-orm.io/api/sqlite.md#FilterItemValue) * [**FilterKey](https://mikro-orm.io/api/sqlite.md#FilterKey) * [**FilterObject](https://mikro-orm.io/api/sqlite.md#FilterObject) * [**FilterOptions](https://mikro-orm.io/api/sqlite.md#FilterOptions) * [**FilterQuery](https://mikro-orm.io/api/sqlite.md#FilterQuery) * [**FilterValue](https://mikro-orm.io/api/sqlite.md#FilterValue) * [**FindAllOptions](https://mikro-orm.io/api/sqlite.md#FindAllOptions) * [**FindByCursorOptions](https://mikro-orm.io/api/sqlite.md#FindByCursorOptions) * [**FindOneOptions](https://mikro-orm.io/api/sqlite.md#FindOneOptions) * [**FindOneOrFailOptions](https://mikro-orm.io/api/sqlite.md#FindOneOrFailOptions) * [**FindOptions](https://mikro-orm.io/api/sqlite.md#FindOptions) * [**FlatQueryOrderMap](https://mikro-orm.io/api/sqlite.md#FlatQueryOrderMap) * [**FloatType](https://mikro-orm.io/api/sqlite.md#FloatType) * [**FlushEventArgs](https://mikro-orm.io/api/sqlite.md#FlushEventArgs) * [**FlushMode](https://mikro-orm.io/api/sqlite.md#FlushMode) * [**ForeignKey](https://mikro-orm.io/api/sqlite.md#ForeignKey) * [**ForeignKeyConstraintViolationException](https://mikro-orm.io/api/sqlite.md#ForeignKeyConstraintViolationException) * [**ForkOptions](https://mikro-orm.io/api/sqlite.md#ForkOptions) * [**Formula](https://mikro-orm.io/api/sqlite.md#Formula) * [**FormulaOptions](https://mikro-orm.io/api/sqlite.md#FormulaOptions) * [**FromEntityType](https://mikro-orm.io/api/sqlite.md#FromEntityType) * [**GeneratedCacheAdapter](https://mikro-orm.io/api/sqlite.md#GeneratedCacheAdapter) * [**GenerateOptions](https://mikro-orm.io/api/sqlite.md#GenerateOptions) * [**GetReferenceOptions](https://mikro-orm.io/api/sqlite.md#GetReferenceOptions) * [**GetRepository](https://mikro-orm.io/api/sqlite.md#GetRepository) * [**GroupOperator](https://mikro-orm.io/api/sqlite.md#GroupOperator) * [**Hidden](https://mikro-orm.io/api/sqlite.md#Hidden) * [**HiddenProps](https://mikro-orm.io/api/sqlite.md#HiddenProps) * [**Highlighter](https://mikro-orm.io/api/sqlite.md#Highlighter) * [**Hydrator](https://mikro-orm.io/api/sqlite.md#Hydrator) * [**IConfiguration](https://mikro-orm.io/api/sqlite.md#IConfiguration) * [**ICriteriaNode](https://mikro-orm.io/api/sqlite.md#ICriteriaNode) * [**ICriteriaNodeProcessOptions](https://mikro-orm.io/api/sqlite.md#ICriteriaNodeProcessOptions) * [**IDatabaseDriver](https://mikro-orm.io/api/sqlite.md#IDatabaseDriver) * [**IdentityMap](https://mikro-orm.io/api/sqlite.md#IdentityMap) * [**IEntityGenerator](https://mikro-orm.io/api/sqlite.md#IEntityGenerator) * [**IMigrationGenerator](https://mikro-orm.io/api/sqlite.md#IMigrationGenerator) * [**IMigrator](https://mikro-orm.io/api/sqlite.md#IMigrator) * [**ImportsResolver](https://mikro-orm.io/api/sqlite.md#ImportsResolver) * [**Index](https://mikro-orm.io/api/sqlite.md#Index) * [**IndexCallback](https://mikro-orm.io/api/sqlite.md#IndexCallback) * [**IndexDef](https://mikro-orm.io/api/sqlite.md#IndexDef) * [**IndexOptions](https://mikro-orm.io/api/sqlite.md#IndexOptions) * [**InferEntity](https://mikro-orm.io/api/sqlite.md#InferEntity) * [**InferEntityFromProperties](https://mikro-orm.io/api/sqlite.md#InferEntityFromProperties) * [**InferPrimaryKey](https://mikro-orm.io/api/sqlite.md#InferPrimaryKey) * [**InitCollectionOptions](https://mikro-orm.io/api/sqlite.md#InitCollectionOptions) * [**InsertQueryBuilder](https://mikro-orm.io/api/sqlite.md#InsertQueryBuilder) * [**IntegerType](https://mikro-orm.io/api/sqlite.md#IntegerType) * [**IntervalType](https://mikro-orm.io/api/sqlite.md#IntervalType) * [**InvalidFieldNameException](https://mikro-orm.io/api/sqlite.md#InvalidFieldNameException) * [**IPrimaryKey](https://mikro-orm.io/api/sqlite.md#IPrimaryKey) * [**IQueryBuilder](https://mikro-orm.io/api/sqlite.md#IQueryBuilder) * [**ISchemaGenerator](https://mikro-orm.io/api/sqlite.md#ISchemaGenerator) * [**ISeedManager](https://mikro-orm.io/api/sqlite.md#ISeedManager) * [**IsolationLevel](https://mikro-orm.io/api/sqlite.md#IsolationLevel) * [**IsSubset](https://mikro-orm.io/api/sqlite.md#IsSubset) * [**IsUnknown](https://mikro-orm.io/api/sqlite.md#IsUnknown) * [**IType](https://mikro-orm.io/api/sqlite.md#IType) * [**IWrappedEntity](https://mikro-orm.io/api/sqlite.md#IWrappedEntity) * [**JoinOptions](https://mikro-orm.io/api/sqlite.md#JoinOptions) * [**JoinType](https://mikro-orm.io/api/sqlite.md#JoinType) * [**JSON\_KEY\_OPERATORS](https://mikro-orm.io/api/sqlite.md#JSON_KEY_OPERATORS) * [**JsonProperty](https://mikro-orm.io/api/sqlite.md#JsonProperty) * [**JsonType](https://mikro-orm.io/api/sqlite.md#JsonType) * [**KnexStringRef](https://mikro-orm.io/api/sqlite.md#KnexStringRef) * [**LibSqlKnexDialect](https://mikro-orm.io/api/sqlite.md#LibSqlKnexDialect) * [**LoadCountOptions](https://mikro-orm.io/api/sqlite.md#LoadCountOptions) * [**Loaded](https://mikro-orm.io/api/sqlite.md#Loaded) * [**LoadedCollection](https://mikro-orm.io/api/sqlite.md#LoadedCollection) * [**LoadedReference](https://mikro-orm.io/api/sqlite.md#LoadedReference) * [**LoadHint](https://mikro-orm.io/api/sqlite.md#LoadHint) * [**LoadReferenceOptions](https://mikro-orm.io/api/sqlite.md#LoadReferenceOptions) * [**LoadReferenceOrFailOptions](https://mikro-orm.io/api/sqlite.md#LoadReferenceOrFailOptions) * [**LoadStrategy](https://mikro-orm.io/api/sqlite.md#LoadStrategy) * [**LockMode](https://mikro-orm.io/api/sqlite.md#LockMode) * [**LockOptions](https://mikro-orm.io/api/sqlite.md#LockOptions) * [**LockWaitTimeoutException](https://mikro-orm.io/api/sqlite.md#LockWaitTimeoutException) * [**LogContext](https://mikro-orm.io/api/sqlite.md#LogContext) * [**Logger](https://mikro-orm.io/api/sqlite.md#Logger) * [**LoggerNamespace](https://mikro-orm.io/api/sqlite.md#LoggerNamespace) * [**LoggerOptions](https://mikro-orm.io/api/sqlite.md#LoggerOptions) * [**LoggingOptions](https://mikro-orm.io/api/sqlite.md#LoggingOptions) * [**ManyToMany](https://mikro-orm.io/api/sqlite.md#ManyToMany) * [**ManyToManyOptions](https://mikro-orm.io/api/sqlite.md#ManyToManyOptions) * [**ManyToOne](https://mikro-orm.io/api/sqlite.md#ManyToOne) * [**ManyToOneOptions](https://mikro-orm.io/api/sqlite.md#ManyToOneOptions) * [**MariaDbKnexDialect](https://mikro-orm.io/api/sqlite.md#MariaDbKnexDialect) * [**MatchingOptions](https://mikro-orm.io/api/sqlite.md#MatchingOptions) * [**MaybePromise](https://mikro-orm.io/api/sqlite.md#MaybePromise) * [**MediumIntType](https://mikro-orm.io/api/sqlite.md#MediumIntType) * [**MemoryCacheAdapter](https://mikro-orm.io/api/sqlite.md#MemoryCacheAdapter) * [**MergeLoaded](https://mikro-orm.io/api/sqlite.md#MergeLoaded) * [**MergeOptions](https://mikro-orm.io/api/sqlite.md#MergeOptions) * [**MergeSelected](https://mikro-orm.io/api/sqlite.md#MergeSelected) * [**MetadataDiscovery](https://mikro-orm.io/api/sqlite.md#MetadataDiscovery) * [**MetadataDiscoveryOptions](https://mikro-orm.io/api/sqlite.md#MetadataDiscoveryOptions) * [**MetadataError](https://mikro-orm.io/api/sqlite.md#MetadataError) * [**MetadataProcessor](https://mikro-orm.io/api/sqlite.md#MetadataProcessor) * [**MetadataProvider](https://mikro-orm.io/api/sqlite.md#MetadataProvider) * [**MetadataStorage](https://mikro-orm.io/api/sqlite.md#MetadataStorage) * [**MigrateOptions](https://mikro-orm.io/api/sqlite.md#MigrateOptions) * [**MigrationDiff](https://mikro-orm.io/api/sqlite.md#MigrationDiff) * [**MigrationObject](https://mikro-orm.io/api/sqlite.md#MigrationObject) * [**MigrationResult](https://mikro-orm.io/api/sqlite.md#MigrationResult) * [**MigrationRow](https://mikro-orm.io/api/sqlite.md#MigrationRow) * [**MigrationsOptions](https://mikro-orm.io/api/sqlite.md#MigrationsOptions) * [**MigratorEvent](https://mikro-orm.io/api/sqlite.md#MigratorEvent) * [**MikroORMOptions](https://mikro-orm.io/api/sqlite.md#MikroORMOptions) * [**ModifyContext](https://mikro-orm.io/api/sqlite.md#ModifyContext) * [**ModifyHint](https://mikro-orm.io/api/sqlite.md#ModifyHint) * [**MongoNamingStrategy](https://mikro-orm.io/api/sqlite.md#MongoNamingStrategy) * [**MonkeyPatchable](https://mikro-orm.io/api/sqlite.md#MonkeyPatchable) * [**MsSqlKnexDialect](https://mikro-orm.io/api/sqlite.md#MsSqlKnexDialect) * [**MySqlConnection](https://mikro-orm.io/api/sqlite.md#MySqlConnection) * [**MySqlExceptionConverter](https://mikro-orm.io/api/sqlite.md#MySqlExceptionConverter) * [**MySqlIncrementOptions](https://mikro-orm.io/api/sqlite.md#MySqlIncrementOptions) * [**MySqlKnexDialect](https://mikro-orm.io/api/sqlite.md#MySqlKnexDialect) * [**MySqlPlatform](https://mikro-orm.io/api/sqlite.md#MySqlPlatform) * [**MySqlSchemaHelper](https://mikro-orm.io/api/sqlite.md#MySqlSchemaHelper) * [**MySqlTableBuilder](https://mikro-orm.io/api/sqlite.md#MySqlTableBuilder) * [**NamingStrategy](https://mikro-orm.io/api/sqlite.md#NamingStrategy) * [**NativeDeleteOptions](https://mikro-orm.io/api/sqlite.md#NativeDeleteOptions) * [**NativeInsertUpdateManyOptions](https://mikro-orm.io/api/sqlite.md#NativeInsertUpdateManyOptions) * [**NativeInsertUpdateOptions](https://mikro-orm.io/api/sqlite.md#NativeInsertUpdateOptions) * [**New](https://mikro-orm.io/api/sqlite.md#New) * [**Node](https://mikro-orm.io/api/sqlite.md#Node) * [**NodeState](https://mikro-orm.io/api/sqlite.md#NodeState) * [**NoInfer](https://mikro-orm.io/api/sqlite.md#NoInfer) * [**NonUniqueFieldNameException](https://mikro-orm.io/api/sqlite.md#NonUniqueFieldNameException) * [**NotFoundError](https://mikro-orm.io/api/sqlite.md#NotFoundError) * [**NotNullConstraintViolationException](https://mikro-orm.io/api/sqlite.md#NotNullConstraintViolationException) * [**NullCacheAdapter](https://mikro-orm.io/api/sqlite.md#NullCacheAdapter) * [**NullHighlighter](https://mikro-orm.io/api/sqlite.md#NullHighlighter) * [**ObjectBindingPattern](https://mikro-orm.io/api/sqlite.md#ObjectBindingPattern) * [**ObjectHydrator](https://mikro-orm.io/api/sqlite.md#ObjectHydrator) * [**ObjectQuery](https://mikro-orm.io/api/sqlite.md#ObjectQuery) * [**OneToMany](https://mikro-orm.io/api/sqlite.md#OneToMany) * [**OneToManyOptions](https://mikro-orm.io/api/sqlite.md#OneToManyOptions) * [**OneToOne](https://mikro-orm.io/api/sqlite.md#OneToOne) * [**OneToOneOptions](https://mikro-orm.io/api/sqlite.md#OneToOneOptions) * [**OnInit](https://mikro-orm.io/api/sqlite.md#OnInit) * [**OnLoad](https://mikro-orm.io/api/sqlite.md#OnLoad) * [**Opt](https://mikro-orm.io/api/sqlite.md#Opt) * [**OptimisticLockError](https://mikro-orm.io/api/sqlite.md#OptimisticLockError) * [**OptionalProps](https://mikro-orm.io/api/sqlite.md#OptionalProps) * [**OrderDefinition](https://mikro-orm.io/api/sqlite.md#OrderDefinition) * [**p](https://mikro-orm.io/api/sqlite.md#p) * [**parseJsonSafe](https://mikro-orm.io/api/sqlite.md#parseJsonSafe) * [**PlainObject](https://mikro-orm.io/api/sqlite.md#PlainObject) * [**Platform](https://mikro-orm.io/api/sqlite.md#Platform) * [**PoolConfig](https://mikro-orm.io/api/sqlite.md#PoolConfig) * [**Populate](https://mikro-orm.io/api/sqlite.md#Populate) * [**PopulateHint](https://mikro-orm.io/api/sqlite.md#PopulateHint) * [**PopulateOptions](https://mikro-orm.io/api/sqlite.md#PopulateOptions) * [**PopulatePath](https://mikro-orm.io/api/sqlite.md#PopulatePath) * [**PostgreSqlKnexDialect](https://mikro-orm.io/api/sqlite.md#PostgreSqlKnexDialect) * [**Primary](https://mikro-orm.io/api/sqlite.md#Primary) * [**PrimaryKey](https://mikro-orm.io/api/sqlite.md#PrimaryKey) * [**PrimaryKeyOptions](https://mikro-orm.io/api/sqlite.md#PrimaryKeyOptions) * [**PrimaryKeyProp](https://mikro-orm.io/api/sqlite.md#PrimaryKeyProp) * [**Property](https://mikro-orm.io/api/sqlite.md#Property) * [**PropertyOptions](https://mikro-orm.io/api/sqlite.md#PropertyOptions) * [**QBField](https://mikro-orm.io/api/sqlite.md#QBField) * [**QBField2](https://mikro-orm.io/api/sqlite.md#QBField2) * [**QBFilterQuery](https://mikro-orm.io/api/sqlite.md#QBFilterQuery) * [**QBQueryOrderMap](https://mikro-orm.io/api/sqlite.md#QBQueryOrderMap) * [**QueryBuilder](https://mikro-orm.io/api/sqlite.md#QueryBuilder) * [**QueryFlag](https://mikro-orm.io/api/sqlite.md#QueryFlag) * [**QueryOperator](https://mikro-orm.io/api/sqlite.md#QueryOperator) * [**QueryOrder](https://mikro-orm.io/api/sqlite.md#QueryOrder) * [**QueryOrderKeys](https://mikro-orm.io/api/sqlite.md#QueryOrderKeys) * [**QueryOrderKeysFlat](https://mikro-orm.io/api/sqlite.md#QueryOrderKeysFlat) * [**QueryOrderMap](https://mikro-orm.io/api/sqlite.md#QueryOrderMap) * [**QueryOrderNumeric](https://mikro-orm.io/api/sqlite.md#QueryOrderNumeric) * [**QueryResult](https://mikro-orm.io/api/sqlite.md#QueryResult) * [**QueryType](https://mikro-orm.io/api/sqlite.md#QueryType) * [**quote](https://mikro-orm.io/api/sqlite.md#quote) * [**raw](https://mikro-orm.io/api/sqlite.md#raw) * [**RawQueryFragment](https://mikro-orm.io/api/sqlite.md#RawQueryFragment) * [**ReadOnlyException](https://mikro-orm.io/api/sqlite.md#ReadOnlyException) * [**ref](https://mikro-orm.io/api/sqlite.md#ref) * [**Ref](https://mikro-orm.io/api/sqlite.md#Ref) * [**Reference](https://mikro-orm.io/api/sqlite.md#Reference) * [**ReferenceKind](https://mikro-orm.io/api/sqlite.md#ReferenceKind) * [**ReferenceOptions](https://mikro-orm.io/api/sqlite.md#ReferenceOptions) * [**ReflectMetadataProvider](https://mikro-orm.io/api/sqlite.md#ReflectMetadataProvider) * [**RefreshDatabaseOptions](https://mikro-orm.io/api/sqlite.md#RefreshDatabaseOptions) * [**RegisterOptions](https://mikro-orm.io/api/sqlite.md#RegisterOptions) * [**rel](https://mikro-orm.io/api/sqlite.md#rel) * [**Rel](https://mikro-orm.io/api/sqlite.md#Rel) * [**RequestContext](https://mikro-orm.io/api/sqlite.md#RequestContext) * [**RequiredEntityData](https://mikro-orm.io/api/sqlite.md#RequiredEntityData) * [**RequiredNullable](https://mikro-orm.io/api/sqlite.md#RequiredNullable) * [**RunQueryBuilder](https://mikro-orm.io/api/sqlite.md#RunQueryBuilder) * [**Scalar](https://mikro-orm.io/api/sqlite.md#Scalar) * [**SCALAR\_TYPES](https://mikro-orm.io/api/sqlite.md#SCALAR_TYPES) * [**ScalarRef](https://mikro-orm.io/api/sqlite.md#ScalarRef) * [**ScalarReference](https://mikro-orm.io/api/sqlite.md#ScalarReference) * [**SchemaComparator](https://mikro-orm.io/api/sqlite.md#SchemaComparator) * [**SchemaDifference](https://mikro-orm.io/api/sqlite.md#SchemaDifference) * [**SchemaGenerator](https://mikro-orm.io/api/sqlite.md#SchemaGenerator) * [**SchemaHelper](https://mikro-orm.io/api/sqlite.md#SchemaHelper) * [**SeederOptions](https://mikro-orm.io/api/sqlite.md#SeederOptions) * [**Selected](https://mikro-orm.io/api/sqlite.md#Selected) * [**SelectQueryBuilder](https://mikro-orm.io/api/sqlite.md#SelectQueryBuilder) * [**SerializationContext](https://mikro-orm.io/api/sqlite.md#SerializationContext) * [**serialize](https://mikro-orm.io/api/sqlite.md#serialize) * [**SerializedPrimaryKey](https://mikro-orm.io/api/sqlite.md#SerializedPrimaryKey) * [**SerializedPrimaryKeyOptions](https://mikro-orm.io/api/sqlite.md#SerializedPrimaryKeyOptions) * [**SerializeOptions](https://mikro-orm.io/api/sqlite.md#SerializeOptions) * [**ServerException](https://mikro-orm.io/api/sqlite.md#ServerException) * [**Settings](https://mikro-orm.io/api/sqlite.md#Settings) * [**SimpleColumnMeta](https://mikro-orm.io/api/sqlite.md#SimpleColumnMeta) * [**SimpleLogger](https://mikro-orm.io/api/sqlite.md#SimpleLogger) * [**SmallIntType](https://mikro-orm.io/api/sqlite.md#SmallIntType) * [**sql](https://mikro-orm.io/api/sqlite.md#sql) * [**SqlEntityManager](https://mikro-orm.io/api/sqlite.md#SqlEntityManager) * [**SqlEntityRepository](https://mikro-orm.io/api/sqlite.md#SqlEntityRepository) * [**SqliteKnexDialect](https://mikro-orm.io/api/sqlite.md#SqliteKnexDialect) * [**SqliteTableCompiler](https://mikro-orm.io/api/sqlite.md#SqliteTableCompiler) * [**SqlSchemaGenerator](https://mikro-orm.io/api/sqlite.md#SqlSchemaGenerator) * [**StringType](https://mikro-orm.io/api/sqlite.md#StringType) * [**SyncCacheAdapter](https://mikro-orm.io/api/sqlite.md#SyncCacheAdapter) * [**SyntaxErrorException](https://mikro-orm.io/api/sqlite.md#SyntaxErrorException) * [**t](https://mikro-orm.io/api/sqlite.md#t) * [**Table](https://mikro-orm.io/api/sqlite.md#Table) * [**TableDifference](https://mikro-orm.io/api/sqlite.md#TableDifference) * [**TableExistsException](https://mikro-orm.io/api/sqlite.md#TableExistsException) * [**TableNotFoundException](https://mikro-orm.io/api/sqlite.md#TableNotFoundException) * [**TextType](https://mikro-orm.io/api/sqlite.md#TextType) * [**TimeType](https://mikro-orm.io/api/sqlite.md#TimeType) * [**TinyIntType](https://mikro-orm.io/api/sqlite.md#TinyIntType) * [**Transaction](https://mikro-orm.io/api/sqlite.md#Transaction) * [**Transactional](https://mikro-orm.io/api/sqlite.md#Transactional) * [**TransactionContext](https://mikro-orm.io/api/sqlite.md#TransactionContext) * [**TransactionEventArgs](https://mikro-orm.io/api/sqlite.md#TransactionEventArgs) * [**TransactionEventBroadcaster](https://mikro-orm.io/api/sqlite.md#TransactionEventBroadcaster) * [**TransactionEventType](https://mikro-orm.io/api/sqlite.md#TransactionEventType) * [**TransactionManager](https://mikro-orm.io/api/sqlite.md#TransactionManager) * [**TransactionOptions](https://mikro-orm.io/api/sqlite.md#TransactionOptions) * [**TransactionPropagation](https://mikro-orm.io/api/sqlite.md#TransactionPropagation) * [**TransactionStateError](https://mikro-orm.io/api/sqlite.md#TransactionStateError) * [**TransformContext](https://mikro-orm.io/api/sqlite.md#TransformContext) * [**TruncateQueryBuilder](https://mikro-orm.io/api/sqlite.md#TruncateQueryBuilder) * [**Type](https://mikro-orm.io/api/sqlite.md#Type) * [**TypeConfig](https://mikro-orm.io/api/sqlite.md#TypeConfig) * [**types](https://mikro-orm.io/api/sqlite.md#types) * [**Uint8ArrayType](https://mikro-orm.io/api/sqlite.md#Uint8ArrayType) * [**UmzugMigration](https://mikro-orm.io/api/sqlite.md#UmzugMigration) * [**UnboxArray](https://mikro-orm.io/api/sqlite.md#UnboxArray) * [**UnderscoreNamingStrategy](https://mikro-orm.io/api/sqlite.md#UnderscoreNamingStrategy) * [**Unique](https://mikro-orm.io/api/sqlite.md#Unique) * [**UniqueConstraintViolationException](https://mikro-orm.io/api/sqlite.md#UniqueConstraintViolationException) * [**UniqueOptions](https://mikro-orm.io/api/sqlite.md#UniqueOptions) * [**UnitOfWork](https://mikro-orm.io/api/sqlite.md#UnitOfWork) * [**UniversalPropertyKeys](https://mikro-orm.io/api/sqlite.md#UniversalPropertyKeys) * [**UnknownType](https://mikro-orm.io/api/sqlite.md#UnknownType) * [**UpdateOptions](https://mikro-orm.io/api/sqlite.md#UpdateOptions) * [**UpdateQueryBuilder](https://mikro-orm.io/api/sqlite.md#UpdateQueryBuilder) * [**UpdateSchemaOptions](https://mikro-orm.io/api/sqlite.md#UpdateSchemaOptions) * [**UpsertManyOptions](https://mikro-orm.io/api/sqlite.md#UpsertManyOptions) * [**UpsertOptions](https://mikro-orm.io/api/sqlite.md#UpsertOptions) * [**Utils](https://mikro-orm.io/api/sqlite.md#Utils) * [**UuidType](https://mikro-orm.io/api/sqlite.md#UuidType) * [**ValidationError](https://mikro-orm.io/api/sqlite.md#ValidationError) * [**wrap](https://mikro-orm.io/api/sqlite.md#wrap) * [**WrappedEntity](https://mikro-orm.io/api/sqlite.md#WrappedEntity) ### Classes * [**MikroORM](https://mikro-orm.io/api/sqlite/class/MikroORM.md) * [**SqliteConnection](https://mikro-orm.io/api/sqlite/class/SqliteConnection.md) * [**SqliteDriver](https://mikro-orm.io/api/sqlite/class/SqliteDriver.md) * [**SqliteExceptionConverter](https://mikro-orm.io/api/sqlite/class/SqliteExceptionConverter.md) * [**SqlitePlatform](https://mikro-orm.io/api/sqlite/class/SqlitePlatform.md) * [**SqliteSchemaHelper](https://mikro-orm.io/api/sqlite/class/SqliteSchemaHelper.md) ### Type Aliases * [**Options](https://mikro-orm.io/api/sqlite.md#Options) ### Functions * [**defineConfig](https://mikro-orm.io/api/sqlite/function/defineConfig.md) ## References[**](#References) ### [**](#AbstractNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/AbstractNamingStrategy.ts#L6)AbstractNamingStrategy Re-exports [AbstractNamingStrategy](https://mikro-orm.io/api/core/class/AbstractNamingStrategy.md) ### [**](#AbstractSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/AbstractSchemaGenerator.ts#L17)AbstractSchemaGenerator Re-exports [AbstractSchemaGenerator](https://mikro-orm.io/api/core/class/AbstractSchemaGenerator.md) ### [**](#AbstractSqlConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlConnection.ts#L28)AbstractSqlConnection Re-exports [AbstractSqlConnection](https://mikro-orm.io/api/knex/class/AbstractSqlConnection.md) ### [**](#AbstractSqlDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlDriver.ts#L68)AbstractSqlDriver Re-exports [AbstractSqlDriver](https://mikro-orm.io/api/knex/class/AbstractSqlDriver.md) ### [**](#AbstractSqlPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/AbstractSqlPlatform.ts#L7)AbstractSqlPlatform Re-exports [AbstractSqlPlatform](https://mikro-orm.io/api/knex/class/AbstractSqlPlatform.md) ### [**](#AfterCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L20)AfterCreate Re-exports [AfterCreate](https://mikro-orm.io/api/core/function/AfterCreate.md) ### [**](#AfterDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L58)AfterDelete Re-exports [AfterDelete](https://mikro-orm.io/api/core/function/AfterDelete.md) ### [**](#AfterUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L28)AfterUpdate Re-exports [AfterUpdate](https://mikro-orm.io/api/core/function/AfterUpdate.md) ### [**](#AfterUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L36)AfterUpsert Re-exports [AfterUpsert](https://mikro-orm.io/api/core/function/AfterUpsert.md) ### [**](#Alias)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilderHelper.ts#L982)Alias Re-exports [Alias](https://mikro-orm.io/api/knex/interface/Alias.md) ### [**](#AnyEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)AnyEntity Re-exports [AnyEntity](https://mikro-orm.io/api/core.md#AnyEntity) ### [**](#AnyString)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)AnyString Re-exports [AnyString](https://mikro-orm.io/api/core.md#AnyString) ### [**](#ARRAY_OPERATORS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L55)ARRAY\_OPERATORS Re-exports [ARRAY\_OPERATORS](https://mikro-orm.io/api/core.md#ARRAY_OPERATORS) ### [**](#ArrayCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L9)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/ArrayCollection.ts#L511)ArrayCollection Re-exports [ArrayCollection](https://mikro-orm.io/api/core/class/ArrayCollection.md) ### [**](#ArrayType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)ArrayType Re-exports [ArrayType](https://mikro-orm.io/api/core/class/ArrayType.md) ### [**](#assign)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L311)assign Re-exports [assign](https://mikro-orm.io/api/core/function/assign.md) ### [**](#AssignOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L313)AssignOptions Re-exports [AssignOptions](https://mikro-orm.io/api/core/interface/AssignOptions.md) ### [**](#AutoPath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)AutoPath Re-exports [AutoPath](https://mikro-orm.io/api/core.md#AutoPath) ### [**](#BaseEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/BaseEntity.ts#L9)BaseEntity Re-exports [BaseEntity](https://mikro-orm.io/api/core/class/BaseEntity.md) ### [**](#BaseSqliteConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteConnection.ts#L7)BaseSqliteConnection Re-exports [BaseSqliteConnection](https://mikro-orm.io/api/knex/class/BaseSqliteConnection.md) ### [**](#BaseSqlitePlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqlitePlatform.ts#L4)BaseSqlitePlatform Re-exports [BaseSqlitePlatform](https://mikro-orm.io/api/knex/class/BaseSqlitePlatform.md) ### [**](#BaseSqliteSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BaseSqliteSchemaHelper.ts#L6)BaseSqliteSchemaHelper Re-exports [BaseSqliteSchemaHelper](https://mikro-orm.io/api/knex/class/BaseSqliteSchemaHelper.md) ### [**](#BeforeCreate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L16)BeforeCreate Re-exports [BeforeCreate](https://mikro-orm.io/api/core/function/BeforeCreate.md) ### [**](#BeforeDelete)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L51)BeforeDelete Re-exports [BeforeDelete](https://mikro-orm.io/api/core/function/BeforeDelete.md) ### [**](#BeforeUpdate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L24)BeforeUpdate Re-exports [BeforeUpdate](https://mikro-orm.io/api/core/function/BeforeUpdate.md) ### [**](#BeforeUpsert)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L32)BeforeUpsert Re-exports [BeforeUpsert](https://mikro-orm.io/api/core/function/BeforeUpsert.md) ### [**](#BetterSqliteKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/BetterSqliteKnexDialect.ts#L4)BetterSqliteKnexDialect Re-exports [BetterSqliteKnexDialect](https://mikro-orm.io/api/knex/class/BetterSqliteKnexDialect.md) ### [**](#BigIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)BigIntType Re-exports [BigIntType](https://mikro-orm.io/api/core/class/BigIntType.md) ### [**](#BlobType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)BlobType Re-exports [BlobType](https://mikro-orm.io/api/core/class/BlobType.md) ### [**](#BooleanType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)BooleanType Re-exports [BooleanType](https://mikro-orm.io/api/core/class/BooleanType.md) ### [**](#CacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L1)CacheAdapter Re-exports [CacheAdapter](https://mikro-orm.io/api/core/interface/CacheAdapter.md) ### [**](#Cascade)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L131)Cascade Re-exports [Cascade](https://mikro-orm.io/api/core/enum/Cascade.md) ### [**](#Cast)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)Cast Re-exports [Cast](https://mikro-orm.io/api/core.md#Cast) ### [**](#ChangeSet)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L6)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L67)ChangeSet Re-exports [ChangeSet](https://mikro-orm.io/api/core/class/ChangeSet.md) ### [**](#ChangeSetComputer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetComputer.ts#L10)ChangeSetComputer Re-exports [ChangeSetComputer](https://mikro-orm.io/api/core/class/ChangeSetComputer.md) ### [**](#ChangeSetPersister)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSetPersister.ts#L13)ChangeSetPersister Re-exports [ChangeSetPersister](https://mikro-orm.io/api/core/class/ChangeSetPersister.md) ### [**](#ChangeSetType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/ChangeSet.ts#L79)ChangeSetType Re-exports [ChangeSetType](https://mikro-orm.io/api/core/enum/ChangeSetType.md) ### [**](#CharacterType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)CharacterType Re-exports [CharacterType](https://mikro-orm.io/api/core/class/CharacterType.md) ### [**](#Check)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Check.ts#L5)Check Re-exports [Check](https://mikro-orm.io/api/core/function/Check.md) ### [**](#CheckCallback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)CheckCallback Re-exports [CheckCallback](https://mikro-orm.io/api/core.md#CheckCallback) ### [**](#CheckConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L70)CheckConstraintViolationException Re-exports [CheckConstraintViolationException](https://mikro-orm.io/api/core/class/CheckConstraintViolationException.md) ### [**](#CheckDef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L100)CheckDef Re-exports [CheckDef](https://mikro-orm.io/api/knex/interface/CheckDef.md) ### [**](#CheckOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Check.ts#L19)CheckOptions Re-exports [CheckOptions](https://mikro-orm.io/api/core.md#CheckOptions) ### [**](#ClearDatabaseOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)ClearDatabaseOptions Re-exports [ClearDatabaseOptions](https://mikro-orm.io/api/core/interface/ClearDatabaseOptions.md) ### [**](#Collection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L31)Collection Re-exports [Collection](https://mikro-orm.io/api/core/class/Collection.md) ### [**](#Column)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L54)Column Re-exports [Column](https://mikro-orm.io/api/knex/interface/Column.md) ### [**](#ColumnDifference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L107)ColumnDifference Re-exports [ColumnDifference](https://mikro-orm.io/api/knex/interface/ColumnDifference.md) ### [**](#compareArrays)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L107)compareArrays Re-exports [compareArrays](https://mikro-orm.io/api/core/function/compareArrays.md) ### [**](#compareBooleans)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L124)compareBooleans Re-exports [compareBooleans](https://mikro-orm.io/api/core/function/compareBooleans.md) ### [**](#compareBuffers)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L131)compareBuffers Re-exports [compareBuffers](https://mikro-orm.io/api/core/function/compareBuffers.md) ### [**](#compareObjects)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L49)compareObjects Re-exports [compareObjects](https://mikro-orm.io/api/core/function/compareObjects.md) ### [**](#Config)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)Config Re-exports [Config](https://mikro-orm.io/api/core.md#Config) ### [**](#Configuration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L46)Configuration Re-exports [Configuration](https://mikro-orm.io/api/core/class/Configuration.md) ### [**](#Connection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L10)Connection Re-exports [Connection](https://mikro-orm.io/api/core/class/Connection.md) ### [**](#ConnectionConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L182)ConnectionConfig Re-exports [ConnectionConfig](https://mikro-orm.io/api/core/interface/ConnectionConfig.md) ### [**](#ConnectionException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L27)ConnectionException Re-exports [ConnectionException](https://mikro-orm.io/api/core/class/ConnectionException.md) ### [**](#ConnectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L513)ConnectionOptions Re-exports [ConnectionOptions](https://mikro-orm.io/api/core/interface/ConnectionOptions.md) ### [**](#ConnectionType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)ConnectionType Re-exports [ConnectionType](https://mikro-orm.io/api/core.md#ConnectionType) ### [**](#ConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L37)ConstraintViolationException Re-exports [ConstraintViolationException](https://mikro-orm.io/api/core/class/ConstraintViolationException.md) ### [**](#Constructor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Constructor Re-exports [Constructor](https://mikro-orm.io/api/core.md#Constructor) ### [**](#CountOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L243)CountOptions Re-exports [CountOptions](https://mikro-orm.io/api/core/interface/CountOptions.md) ### [**](#CountQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2031)CountQueryBuilder Re-exports [CountQueryBuilder](https://mikro-orm.io/api/knex/interface/CountQueryBuilder.md) ### [**](#CreateContextOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L72)CreateContextOptions Re-exports [CreateContextOptions](https://mikro-orm.io/api/core/interface/CreateContextOptions.md) ### [**](#CreateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2406)CreateOptions Re-exports [CreateOptions](https://mikro-orm.io/api/core/interface/CreateOptions.md) ### [**](#CreateRequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/CreateRequestContext.ts#L6)CreateRequestContext Re-exports [CreateRequestContext](https://mikro-orm.io/api/core/function/CreateRequestContext.md) ### [**](#CreateSchemaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)CreateSchemaOptions Re-exports [CreateSchemaOptions](https://mikro-orm.io/api/core/interface/CreateSchemaOptions.md) ### [**](#createSqlFunction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L253)createSqlFunction Re-exports [createSqlFunction](https://mikro-orm.io/api/core/function/createSqlFunction.md) ### [**](#Cursor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Cursor.ts#L58)Cursor Re-exports [Cursor](https://mikro-orm.io/api/core/class/Cursor.md) ### [**](#CursorError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L138)CursorError Re-exports [CursorError](https://mikro-orm.io/api/core/class/CursorError.md) ### [**](#DatabaseDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/DatabaseDriver.ts#L40)DatabaseDriver Re-exports [DatabaseDriver](https://mikro-orm.io/api/core/class/DatabaseDriver.md) ### [**](#DatabaseObjectExistsException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L46)DatabaseObjectExistsException Re-exports [DatabaseObjectExistsException](https://mikro-orm.io/api/core/class/DatabaseObjectExistsException.md) ### [**](#DatabaseObjectNotFoundException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L55)DatabaseObjectNotFoundException Re-exports [DatabaseObjectNotFoundException](https://mikro-orm.io/api/core/class/DatabaseObjectNotFoundException.md) ### [**](#DataloaderType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L149)DataloaderType Re-exports [DataloaderType](https://mikro-orm.io/api/core/enum/DataloaderType.md) ### [**](#DataloaderUtils)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/DataloaderUtils.ts#L10)DataloaderUtils Re-exports [DataloaderUtils](https://mikro-orm.io/api/core/class/DataloaderUtils.md) ### [**](#DateTimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)DateTimeType Re-exports [DateTimeType](https://mikro-orm.io/api/core/class/DateTimeType.md) ### [**](#DateType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)DateType Re-exports [DateType](https://mikro-orm.io/api/core/class/DateType.md) ### [**](#DeadlockException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L60)DeadlockException Re-exports [DeadlockException](https://mikro-orm.io/api/core/class/DeadlockException.md) ### [**](#DecimalType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)DecimalType Re-exports [DecimalType](https://mikro-orm.io/api/core/class/DecimalType.md) ### [**](#DeepPartial)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)DeepPartial Re-exports [DeepPartial](https://mikro-orm.io/api/core.md#DeepPartial) ### [**](#DefaultLogger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/DefaultLogger.ts#L5)DefaultLogger Re-exports [DefaultLogger](https://mikro-orm.io/api/core/class/DefaultLogger.md) ### [**](#DeferMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L228)DeferMode Re-exports [DeferMode](https://mikro-orm.io/api/core/enum/DeferMode.md) ### [**](#DefineConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)DefineConfig Re-exports [DefineConfig](https://mikro-orm.io/api/core.md#DefineConfig) ### [**](#defineEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L702)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L712)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L720)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L757)defineEntity Re-exports [defineEntity](https://mikro-orm.io/api/core/function/defineEntity.md) ### [**](#DefineEntityHooks)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L760)DefineEntityHooks Re-exports [DefineEntityHooks](https://mikro-orm.io/api/core/interface/DefineEntityHooks.md) ### [**](#DeleteOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L273)DeleteOptions Re-exports [DeleteOptions](https://mikro-orm.io/api/core/interface/DeleteOptions.md) ### [**](#DeleteQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2043)DeleteQueryBuilder Re-exports [DeleteQueryBuilder](https://mikro-orm.io/api/knex/interface/DeleteQueryBuilder.md) ### [**](#Dictionary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Dictionary Re-exports [Dictionary](https://mikro-orm.io/api/core.md#Dictionary) ### [**](#DoubleType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)DoubleType Re-exports [DoubleType](https://mikro-orm.io/api/core/class/DoubleType.md) ### [**](#DriverException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L6)DriverException Re-exports [DriverException](https://mikro-orm.io/api/core/class/DriverException.md) ### [**](#DriverMethodOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L288)DriverMethodOptions Re-exports [DriverMethodOptions](https://mikro-orm.io/api/core/interface/DriverMethodOptions.md) ### [**](#DropSchemaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)DropSchemaOptions Re-exports [DropSchemaOptions](https://mikro-orm.io/api/core/interface/DropSchemaOptions.md) ### [**](#DynamicPassword)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L508)DynamicPassword Re-exports [DynamicPassword](https://mikro-orm.io/api/core/interface/DynamicPassword.md) ### [**](#EagerProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)EagerProps Re-exports [EagerProps](https://mikro-orm.io/api/core.md#EagerProps) ### [**](#Edge)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L16)Edge Re-exports [Edge](https://mikro-orm.io/api/core/interface/Edge.md) ### [**](#Embeddable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embeddable.ts#L4)Embeddable Re-exports [Embeddable](https://mikro-orm.io/api/core/function/Embeddable.md) ### [**](#EmbeddableOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embeddable.ts#L16)EmbeddableOptions Re-exports [EmbeddableOptions](https://mikro-orm.io/api/core.md#EmbeddableOptions) ### [**](#Embedded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L7)Embedded Re-exports [Embedded](https://mikro-orm.io/api/core/function/Embedded.md) ### [**](#EmbeddedOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L26)EmbeddedOptions Re-exports [EmbeddedOptions](https://mikro-orm.io/api/core/interface/EmbeddedOptions.md) ### [**](#EmbeddedPrefixMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Embedded.ts#L24)EmbeddedPrefixMode Re-exports [EmbeddedPrefixMode](https://mikro-orm.io/api/core.md#EmbeddedPrefixMode) ### [**](#EmptyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L613)EmptyOptions Re-exports [EmptyOptions](https://mikro-orm.io/api/core/interface/EmptyOptions.md) ### [**](#EnsureDatabaseOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)EnsureDatabaseOptions Re-exports [EnsureDatabaseOptions](https://mikro-orm.io/api/core/interface/EnsureDatabaseOptions.md) ### [**](#EnsureRequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/CreateRequestContext.ts#L35)EnsureRequestContext Re-exports [EnsureRequestContext](https://mikro-orm.io/api/core/function/EnsureRequestContext.md) ### [**](#Entity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Entity.ts#L6)Entity Re-exports [Entity](https://mikro-orm.io/api/core/function/Entity.md) ### [**](#EntityAssigner)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityAssigner.ts#L28)EntityAssigner Re-exports [EntityAssigner](https://mikro-orm.io/api/core/class/EntityAssigner.md) ### [**](#EntityCaseNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/EntityCaseNamingStrategy.ts#L6)EntityCaseNamingStrategy Re-exports [EntityCaseNamingStrategy](https://mikro-orm.io/api/core/class/EntityCaseNamingStrategy.md) ### [**](#EntityClass)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)EntityClass Re-exports [EntityClass](https://mikro-orm.io/api/core.md#EntityClass) ### [**](#EntityClassGroup)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)EntityClassGroup Re-exports [EntityClassGroup](https://mikro-orm.io/api/core.md#EntityClassGroup) ### [**](#EntityComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/EntityComparator.ts#L25)EntityComparator Re-exports [EntityComparator](https://mikro-orm.io/api/core/class/EntityComparator.md) ### [**](#EntityData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)EntityData Re-exports [EntityData](https://mikro-orm.io/api/core.md#EntityData) ### [**](#EntityDataValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityDataValue Re-exports [EntityDataValue](https://mikro-orm.io/api/core.md#EntityDataValue) ### [**](#EntityDictionary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)EntityDictionary Re-exports [EntityDictionary](https://mikro-orm.io/api/core.md#EntityDictionary) ### [**](#EntityDTO)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)EntityDTO Re-exports [EntityDTO](https://mikro-orm.io/api/core.md#EntityDTO) ### [**](#EntityFactory)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L47)EntityFactory Re-exports [EntityFactory](https://mikro-orm.io/api/core/class/EntityFactory.md) ### [**](#EntityField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L94)EntityField Re-exports [EntityField](https://mikro-orm.io/api/core.md#EntityField) ### [**](#EntityKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityKey Re-exports [EntityKey](https://mikro-orm.io/api/core.md#EntityKey) ### [**](#EntityLoader)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L55)EntityLoader Re-exports [EntityLoader](https://mikro-orm.io/api/core/class/EntityLoader.md) ### [**](#EntityLoaderOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityLoader.ts#L36)EntityLoaderOptions Re-exports [EntityLoaderOptions](https://mikro-orm.io/api/core.md#EntityLoaderOptions) ### [**](#EntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/index.ts#L16)EntityManager Re-exports [EntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md) ### [**](#EntityManagerType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L16)EntityManagerType Re-exports [EntityManagerType](https://mikro-orm.io/api/core.md#EntityManagerType) ### [**](#EntityMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)EntityMetadata Re-exports [EntityMetadata](https://mikro-orm.io/api/core/class/EntityMetadata.md) ### [**](#EntityName)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)EntityName Re-exports [EntityName](https://mikro-orm.io/api/core.md#EntityName) ### [**](#EntityOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Entity.ts#L18)EntityOptions Re-exports [EntityOptions](https://mikro-orm.io/api/core.md#EntityOptions) ### [**](#EntityProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)EntityProperty Re-exports [EntityProperty](https://mikro-orm.io/api/core/interface/EntityProperty.md) ### [**](#EntityProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)EntityProps Re-exports [EntityProps](https://mikro-orm.io/api/core.md#EntityProps) ### [**](#EntityRef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)EntityRef Re-exports [EntityRef](https://mikro-orm.io/api/core.md#EntityRef) ### [**](#EntityRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/index.ts#L17)EntityRepository Re-exports [EntityRepository](https://mikro-orm.io/api/knex/class/EntityRepository.md) ### [**](#EntityRepositoryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)EntityRepositoryType Re-exports [EntityRepositoryType](https://mikro-orm.io/api/core.md#EntityRepositoryType) ### [**](#EntitySchema)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L53)EntitySchema Re-exports [EntitySchema](https://mikro-orm.io/api/core/class/EntitySchema.md) ### [**](#EntitySchemaMetadata)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L47)EntitySchemaMetadata Re-exports [EntitySchemaMetadata](https://mikro-orm.io/api/core.md#EntitySchemaMetadata) ### [**](#EntitySchemaProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/EntitySchema.ts#L38)EntitySchemaProperty Re-exports [EntitySchemaProperty](https://mikro-orm.io/api/core.md#EntitySchemaProperty) ### [**](#EntitySerializer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L59)EntitySerializer Re-exports [EntitySerializer](https://mikro-orm.io/api/core/class/EntitySerializer.md) ### [**](#EntityTransformer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntityTransformer.ts#L27)EntityTransformer Re-exports [EntityTransformer](https://mikro-orm.io/api/core/class/EntityTransformer.md) ### [**](#EntityType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityType Re-exports [EntityType](https://mikro-orm.io/api/core.md#EntityType) ### [**](#EntityValidator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityValidator.ts#L8)EntityValidator Re-exports [EntityValidator](https://mikro-orm.io/api/core/class/EntityValidator.md) ### [**](#EntityValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)EntityValue Re-exports [EntityValue](https://mikro-orm.io/api/core.md#EntityValue) ### [**](#Enum)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L7)Enum Re-exports [Enum](https://mikro-orm.io/api/core/function/Enum.md) ### [**](#EnumArrayType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)EnumArrayType Re-exports [EnumArrayType](https://mikro-orm.io/api/core/class/EnumArrayType.md) ### [**](#EnumOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Enum.ts#L22)EnumOptions Re-exports [EnumOptions](https://mikro-orm.io/api/core/interface/EnumOptions.md) ### [**](#EnumType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)EnumType Re-exports [EnumType](https://mikro-orm.io/api/core/class/EnumType.md) ### [**](#equals)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L150)equals Re-exports [equals](https://mikro-orm.io/api/core/function/equals.md) ### [**](#EventArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L6)EventArgs Re-exports [EventArgs](https://mikro-orm.io/api/core/interface/EventArgs.md) ### [**](#EventManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventManager.ts#L6)EventManager Re-exports [EventManager](https://mikro-orm.io/api/core/class/EventManager.md) ### [**](#EventSubscriber)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L22)EventSubscriber Re-exports [EventSubscriber](https://mikro-orm.io/api/core/interface/EventSubscriber.md) ### [**](#EventType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L175)EventType Re-exports [EventType](https://mikro-orm.io/api/core/enum/EventType.md) ### [**](#EventTypeMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L197)EventTypeMap Re-exports [EventTypeMap](https://mikro-orm.io/api/core.md#EventTypeMap) ### [**](#ExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/ExceptionConverter.ts#L4)ExceptionConverter Re-exports [ExceptionConverter](https://mikro-orm.io/api/core/class/ExceptionConverter.md) ### [**](#ExecuteOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L51)ExecuteOptions Re-exports [ExecuteOptions](https://mikro-orm.io/api/knex/interface/ExecuteOptions.md) ### [**](#ExpandHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandHint Re-exports [ExpandHint](https://mikro-orm.io/api/core.md#ExpandHint) ### [**](#ExpandProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandProperty Re-exports [ExpandProperty](https://mikro-orm.io/api/core.md#ExpandProperty) ### [**](#ExpandQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandQuery Re-exports [ExpandQuery](https://mikro-orm.io/api/core.md#ExpandQuery) ### [**](#ExpandScalar)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)ExpandScalar Re-exports [ExpandScalar](https://mikro-orm.io/api/core.md#ExpandScalar) ### [**](#FactoryOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/EntityFactory.ts#L30)FactoryOptions Re-exports [FactoryOptions](https://mikro-orm.io/api/core/interface/FactoryOptions.md) ### [**](#Field)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L31)Field Re-exports [Field](https://mikro-orm.io/api/knex.md#Field) ### [**](#FileCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/FileCacheAdapter.ts#L8)FileCacheAdapter Re-exports [FileCacheAdapter](https://mikro-orm.io/api/core/class/FileCacheAdapter.md) ### [**](#Filter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Filter.ts#L4)Filter Re-exports [Filter](https://mikro-orm.io/api/core/function/Filter.md) ### [**](#FilterItemValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)FilterItemValue Re-exports [FilterItemValue](https://mikro-orm.io/api/core.md#FilterItemValue) ### [**](#FilterKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)FilterKey Re-exports [FilterKey](https://mikro-orm.io/api/core.md#FilterKey) ### [**](#FilterObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)FilterObject Re-exports [FilterObject](https://mikro-orm.io/api/core.md#FilterObject) ### [**](#FilterOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L102)FilterOptions Re-exports [FilterOptions](https://mikro-orm.io/api/core.md#FilterOptions) ### [**](#FilterQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)FilterQuery Re-exports [FilterQuery](https://mikro-orm.io/api/core.md#FilterQuery) ### [**](#FilterValue)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)FilterValue Re-exports [FilterValue](https://mikro-orm.io/api/core.md#FilterValue) ### [**](#FindAllOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L98)FindAllOptions Re-exports [FindAllOptions](https://mikro-orm.io/api/core/interface/FindAllOptions.md) ### [**](#FindByCursorOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L204)FindByCursorOptions Re-exports [FindByCursorOptions](https://mikro-orm.io/api/core/interface/FindByCursorOptions.md) ### [**](#FindOneOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L208)FindOneOptions Re-exports [FindOneOptions](https://mikro-orm.io/api/core/interface/FindOneOptions.md) ### [**](#FindOneOrFailOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L213)FindOneOrFailOptions Re-exports [FindOneOrFailOptions](https://mikro-orm.io/api/core/interface/FindOneOrFailOptions.md) ### [**](#FindOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L115)FindOptions Re-exports [FindOptions](https://mikro-orm.io/api/core/interface/FindOptions.md) ### [**](#FlatQueryOrderMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L102)FlatQueryOrderMap Re-exports [FlatQueryOrderMap](https://mikro-orm.io/api/core/interface/FlatQueryOrderMap.md) ### [**](#FloatType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)FloatType Re-exports [FloatType](https://mikro-orm.io/api/core/class/FloatType.md) ### [**](#FlushEventArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L13)FlushEventArgs Re-exports [FlushEventArgs](https://mikro-orm.io/api/core/interface/FlushEventArgs.md) ### [**](#FlushMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L5)FlushMode Re-exports [FlushMode](https://mikro-orm.io/api/core/enum/FlushMode.md) ### [**](#ForeignKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L76)ForeignKey Re-exports [ForeignKey](https://mikro-orm.io/api/knex/interface/ForeignKey.md) ### [**](#ForeignKeyConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L65)ForeignKeyConstraintViolationException Re-exports [ForeignKeyConstraintViolationException](https://mikro-orm.io/api/core/class/ForeignKeyConstraintViolationException.md) ### [**](#ForkOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2434)ForkOptions Re-exports [ForkOptions](https://mikro-orm.io/api/core/interface/ForkOptions.md) ### [**](#Formula)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Formula.ts#L7)Formula Re-exports [Formula](https://mikro-orm.io/api/core/function/Formula.md) ### [**](#FormulaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Formula.ts#L21)FormulaOptions Re-exports [FormulaOptions](https://mikro-orm.io/api/core/interface/FormulaOptions.md) ### [**](#FromEntityType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)FromEntityType Re-exports [FromEntityType](https://mikro-orm.io/api/core.md#FromEntityType) ### [**](#GeneratedCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/GeneratedCacheAdapter.ts#L4)GeneratedCacheAdapter Re-exports [GeneratedCacheAdapter](https://mikro-orm.io/api/core/class/GeneratedCacheAdapter.md) ### [**](#GenerateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)GenerateOptions Re-exports [GenerateOptions](https://mikro-orm.io/api/core/interface/GenerateOptions.md) ### [**](#GetReferenceOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L294)GetReferenceOptions Re-exports [GetReferenceOptions](https://mikro-orm.io/api/core/interface/GetReferenceOptions.md) ### [**](#GetRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)GetRepository Re-exports [GetRepository](https://mikro-orm.io/api/core.md#GetRepository) ### [**](#GroupOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L24)GroupOperator Re-exports [GroupOperator](https://mikro-orm.io/api/core/enum/GroupOperator.md) ### [**](#Hidden)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)Hidden Re-exports [Hidden](https://mikro-orm.io/api/core.md#Hidden) ### [**](#HiddenProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)HiddenProps Re-exports [HiddenProps](https://mikro-orm.io/api/core.md#HiddenProps) ### [**](#Highlighter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Highlighter Re-exports [Highlighter](https://mikro-orm.io/api/core/interface/Highlighter.md) ### [**](#Hydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/Hydrator.ts#L8)Hydrator Re-exports [Hydrator](https://mikro-orm.io/api/core/class/Hydrator.md) ### [**](#IConfiguration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L6)IConfiguration Re-exports [IConfiguration](https://mikro-orm.io/api/core/interface/IConfiguration.md) ### [**](#ICriteriaNode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L196)ICriteriaNode Re-exports [ICriteriaNode](https://mikro-orm.io/api/knex/interface/ICriteriaNode.md) ### [**](#ICriteriaNodeProcessOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L187)ICriteriaNodeProcessOptions Re-exports [ICriteriaNodeProcessOptions](https://mikro-orm.io/api/knex/interface/ICriteriaNodeProcessOptions.md) ### [**](#IDatabaseDriver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L18)IDatabaseDriver Re-exports [IDatabaseDriver](https://mikro-orm.io/api/core/interface/IDatabaseDriver.md) ### [**](#IdentityMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/IdentityMap.ts#L3)IdentityMap Re-exports [IdentityMap](https://mikro-orm.io/api/core/class/IdentityMap.md) ### [**](#IEntityGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)IEntityGenerator Re-exports [IEntityGenerator](https://mikro-orm.io/api/core/interface/IEntityGenerator.md) ### [**](#IMigrationGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)IMigrationGenerator Re-exports [IMigrationGenerator](https://mikro-orm.io/api/core/interface/IMigrationGenerator.md) ### [**](#IMigrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)IMigrator Re-exports [IMigrator](https://mikro-orm.io/api/core/interface/IMigrator.md) ### [**](#ImportsResolver)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)ImportsResolver Re-exports [ImportsResolver](https://mikro-orm.io/api/core.md#ImportsResolver) ### [**](#Index)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L21)Index Re-exports [Index](https://mikro-orm.io/api/core/function/Index.md) ### [**](#IndexCallback)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)IndexCallback Re-exports [IndexCallback](https://mikro-orm.io/api/core.md#IndexCallback) ### [**](#IndexDef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L87)IndexDef Re-exports [IndexDef](https://mikro-orm.io/api/knex/interface/IndexDef.md) ### [**](#IndexOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L42)IndexOptions Re-exports [IndexOptions](https://mikro-orm.io/api/core/interface/IndexOptions.md) ### [**](#InferEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L856)InferEntity Re-exports [InferEntity](https://mikro-orm.io/api/core.md#InferEntity) ### [**](#InferEntityFromProperties)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L798)InferEntityFromProperties Re-exports [InferEntityFromProperties](https://mikro-orm.io/api/core.md#InferEntityFromProperties) ### [**](#InferPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L810)InferPrimaryKey Re-exports [InferPrimaryKey](https://mikro-orm.io/api/core.md#InferPrimaryKey) ### [**](#InitCollectionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L496)InitCollectionOptions Re-exports [InitCollectionOptions](https://mikro-orm.io/api/core/interface/InitCollectionOptions.md) ### [**](#InsertQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2039)InsertQueryBuilder Re-exports [InsertQueryBuilder](https://mikro-orm.io/api/knex/interface/InsertQueryBuilder.md) ### [**](#IntegerType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)IntegerType Re-exports [IntegerType](https://mikro-orm.io/api/core/class/IntegerType.md) ### [**](#IntervalType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)IntervalType Re-exports [IntervalType](https://mikro-orm.io/api/core/class/IntervalType.md) ### [**](#InvalidFieldNameException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L75)InvalidFieldNameException Re-exports [InvalidFieldNameException](https://mikro-orm.io/api/core/class/InvalidFieldNameException.md) ### [**](#IPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)IPrimaryKey Re-exports [IPrimaryKey](https://mikro-orm.io/api/core.md#IPrimaryKey) ### [**](#IQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L147)IQueryBuilder Re-exports [IQueryBuilder](https://mikro-orm.io/api/knex/interface/IQueryBuilder.md) ### [**](#ISchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)ISchemaGenerator Re-exports [ISchemaGenerator](https://mikro-orm.io/api/core/interface/ISchemaGenerator.md) ### [**](#ISeedManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)ISeedManager Re-exports [ISeedManager](https://mikro-orm.io/api/core/interface/ISeedManager.md) ### [**](#IsolationLevel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L167)IsolationLevel Re-exports [IsolationLevel](https://mikro-orm.io/api/core/enum/IsolationLevel.md) ### [**](#IsSubset)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)IsSubset Re-exports [IsSubset](https://mikro-orm.io/api/core.md#IsSubset) ### [**](#IsUnknown)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)IsUnknown Re-exports [IsUnknown](https://mikro-orm.io/api/core.md#IsUnknown) ### [**](#IType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)IType Re-exports [IType](https://mikro-orm.io/api/core.md#IType) ### [**](#IWrappedEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)IWrappedEntity Re-exports [IWrappedEntity](https://mikro-orm.io/api/core/interface/IWrappedEntity.md) ### [**](#JoinOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L33)JoinOptions Re-exports [JoinOptions](https://mikro-orm.io/api/knex/interface/JoinOptions.md) ### [**](#JoinType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L11)JoinType Re-exports [JoinType](https://mikro-orm.io/api/knex/enum/JoinType.md) ### [**](#JSON_KEY_OPERATORS)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L67)JSON\_KEY\_OPERATORS Re-exports [JSON\_KEY\_OPERATORS](https://mikro-orm.io/api/core.md#JSON_KEY_OPERATORS) ### [**](#JsonProperty)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L40)JsonProperty Re-exports [JsonProperty](https://mikro-orm.io/api/core.md#JsonProperty) ### [**](#JsonType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)JsonType Re-exports [JsonType](https://mikro-orm.io/api/core/class/JsonType.md) ### [**](#KnexStringRef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L25)KnexStringRef Re-exports [KnexStringRef](https://mikro-orm.io/api/knex.md#KnexStringRef) ### [**](#LibSqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/LibSqlKnexDialect.ts#L4)LibSqlKnexDialect Re-exports [LibSqlKnexDialect](https://mikro-orm.io/api/knex/class/LibSqlKnexDialect.md) ### [**](#LoadCountOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L502)LoadCountOptions Re-exports [LoadCountOptions](https://mikro-orm.io/api/core/interface/LoadCountOptions.md) ### [**](#Loaded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)Loaded Re-exports [Loaded](https://mikro-orm.io/api/core.md#Loaded) ### [**](#LoadedCollection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)LoadedCollection Re-exports [LoadedCollection](https://mikro-orm.io/api/core/interface/LoadedCollection.md) ### [**](#LoadedReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)LoadedReference Re-exports [LoadedReference](https://mikro-orm.io/api/core/interface/LoadedReference.md) ### [**](#LoadHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L104)LoadHint Re-exports [LoadHint](https://mikro-orm.io/api/core/interface/LoadHint.md) ### [**](#LoadReferenceOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L301)LoadReferenceOptions Re-exports [LoadReferenceOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOptions.md) ### [**](#LoadReferenceOrFailOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L305)LoadReferenceOrFailOptions Re-exports [LoadReferenceOrFailOptions](https://mikro-orm.io/api/core/interface/LoadReferenceOrFailOptions.md) ### [**](#LoadStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L143)LoadStrategy Re-exports [LoadStrategy](https://mikro-orm.io/api/core/enum/LoadStrategy.md) ### [**](#LockMode)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L156)LockMode Re-exports [LockMode](https://mikro-orm.io/api/core/enum/LockMode.md) ### [**](#LockOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L281)LockOptions Re-exports [LockOptions](https://mikro-orm.io/api/core/interface/LockOptions.md) ### [**](#LockWaitTimeoutException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L80)LockWaitTimeoutException Re-exports [LockWaitTimeoutException](https://mikro-orm.io/api/core/class/LockWaitTimeoutException.md) ### [**](#LogContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L36)LogContext Re-exports [LogContext](https://mikro-orm.io/api/core/interface/LogContext.md) ### [**](#Logger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L3)Logger Re-exports [Logger](https://mikro-orm.io/api/core/interface/Logger.md) ### [**](#LoggerNamespace)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L34)LoggerNamespace Re-exports [LoggerNamespace](https://mikro-orm.io/api/core.md#LoggerNamespace) ### [**](#LoggerOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L52)LoggerOptions Re-exports [LoggerOptions](https://mikro-orm.io/api/core/interface/LoggerOptions.md) ### [**](#LoggingOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/Logger.ts#L69)LoggingOptions Re-exports [LoggingOptions](https://mikro-orm.io/api/core.md#LoggingOptions) ### [**](#ManyToMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L7)ManyToMany Re-exports [ManyToMany](https://mikro-orm.io/api/core/function/ManyToMany.md) ### [**](#ManyToManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToMany.ts#L23)ManyToManyOptions Re-exports [ManyToManyOptions](https://mikro-orm.io/api/core/interface/ManyToManyOptions.md) ### [**](#ManyToOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L7)ManyToOne Re-exports [ManyToOne](https://mikro-orm.io/api/core/function/ManyToOne.md) ### [**](#ManyToOneOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/ManyToOne.ts#L22)ManyToOneOptions Re-exports [ManyToOneOptions](https://mikro-orm.io/api/core/interface/ManyToOneOptions.md) ### [**](#MariaDbKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MariaDbKnexDialect.ts#L3)MariaDbKnexDialect Re-exports [MariaDbKnexDialect](https://mikro-orm.io/api/knex/class/MariaDbKnexDialect.md) ### [**](#MatchingOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Collection.ts#L25)MatchingOptions Re-exports [MatchingOptions](https://mikro-orm.io/api/core/interface/MatchingOptions.md) ### [**](#MaybePromise)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)MaybePromise Re-exports [MaybePromise](https://mikro-orm.io/api/core.md#MaybePromise) ### [**](#MediumIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)MediumIntType Re-exports [MediumIntType](https://mikro-orm.io/api/core/class/MediumIntType.md) ### [**](#MemoryCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/MemoryCacheAdapter.ts#L3)MemoryCacheAdapter Re-exports [MemoryCacheAdapter](https://mikro-orm.io/api/core/class/MemoryCacheAdapter.md) ### [**](#MergeLoaded)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)MergeLoaded Re-exports [MergeLoaded](https://mikro-orm.io/api/core.md#MergeLoaded) ### [**](#MergeOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L2424)MergeOptions Re-exports [MergeOptions](https://mikro-orm.io/api/core/interface/MergeOptions.md) ### [**](#MergeSelected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)MergeSelected Re-exports [MergeSelected](https://mikro-orm.io/api/core.md#MergeSelected) ### [**](#MetadataDiscovery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataDiscovery.ts#L43)MetadataDiscovery Re-exports [MetadataDiscovery](https://mikro-orm.io/api/core/class/MetadataDiscovery.md) ### [**](#MetadataDiscoveryOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L577)MetadataDiscoveryOptions Re-exports [MetadataDiscoveryOptions](https://mikro-orm.io/api/core/interface/MetadataDiscoveryOptions.md) ### [**](#MetadataError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L172)MetadataError Re-exports [MetadataError](https://mikro-orm.io/api/core/class/MetadataError.md) ### [**](#MetadataProcessor)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)MetadataProcessor Re-exports [MetadataProcessor](https://mikro-orm.io/api/core.md#MetadataProcessor) ### [**](#MetadataProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataProvider.ts#L11)MetadataProvider Re-exports [MetadataProvider](https://mikro-orm.io/api/core/class/MetadataProvider.md) ### [**](#MetadataStorage)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/MetadataStorage.ts#L7)MetadataStorage Re-exports [MetadataStorage](https://mikro-orm.io/api/core/class/MetadataStorage.md) ### [**](#MigrateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)MigrateOptions Re-exports [MigrateOptions](https://mikro-orm.io/api/core.md#MigrateOptions) ### [**](#MigrationDiff)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)MigrationDiff Re-exports [MigrationDiff](https://mikro-orm.io/api/core/interface/MigrationDiff.md) ### [**](#MigrationObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L9)MigrationObject Re-exports [MigrationObject](https://mikro-orm.io/api/core/interface/MigrationObject.md) ### [**](#MigrationResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)MigrationResult Re-exports [MigrationResult](https://mikro-orm.io/api/core.md#MigrationResult) ### [**](#MigrationRow)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)MigrationRow Re-exports [MigrationRow](https://mikro-orm.io/api/core.md#MigrationRow) ### [**](#MigrationsOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L529)MigrationsOptions Re-exports [MigrationsOptions](https://mikro-orm.io/api/core.md#MigrationsOptions) ### [**](#MigratorEvent)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)MigratorEvent Re-exports [MigratorEvent](https://mikro-orm.io/api/core.md#MigratorEvent) ### [**](#MikroORMOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L593)MikroORMOptions Re-exports [MikroORMOptions](https://mikro-orm.io/api/core/interface/MikroORMOptions.md) ### [**](#ModifyContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L100)ModifyContext Re-exports [ModifyContext](https://mikro-orm.io/api/knex.md#ModifyContext) ### [**](#ModifyHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L98)ModifyHint Re-exports [ModifyHint](https://mikro-orm.io/api/knex.md#ModifyHint) ### [**](#MongoNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/MongoNamingStrategy.ts#L3)MongoNamingStrategy Re-exports [MongoNamingStrategy](https://mikro-orm.io/api/core/class/MongoNamingStrategy.md) ### [**](#MonkeyPatchable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/MonkeyPatchable.ts#L38)MonkeyPatchable Re-exports [MonkeyPatchable](https://mikro-orm.io/api/knex.md#MonkeyPatchable) ### [**](#MsSqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mssql/MsSqlKnexDialect.ts#L6)MsSqlKnexDialect Re-exports [MsSqlKnexDialect](https://mikro-orm.io/api/knex/class/MsSqlKnexDialect.md) ### [**](#MySqlConnection)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlConnection.ts#L5)MySqlConnection Re-exports [MySqlConnection](https://mikro-orm.io/api/knex/class/MySqlConnection.md) ### [**](#MySqlExceptionConverter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlExceptionConverter.ts#L7)MySqlExceptionConverter Re-exports [MySqlExceptionConverter](https://mikro-orm.io/api/knex/class/MySqlExceptionConverter.md) ### [**](#MySqlIncrementOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L213)MySqlIncrementOptions Re-exports [MySqlIncrementOptions](https://mikro-orm.io/api/knex.md#MySqlIncrementOptions) ### [**](#MySqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlKnexDialect.ts#L5)MySqlKnexDialect Re-exports [MySqlKnexDialect](https://mikro-orm.io/api/knex/class/MySqlKnexDialect.md) ### [**](#MySqlPlatform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlPlatform.ts#L16)MySqlPlatform Re-exports [MySqlPlatform](https://mikro-orm.io/api/knex/class/MySqlPlatform.md) ### [**](#MySqlSchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/mysql/MySqlSchemaHelper.ts#L9)MySqlSchemaHelper Re-exports [MySqlSchemaHelper](https://mikro-orm.io/api/knex/class/MySqlSchemaHelper.md) ### [**](#MySqlTableBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L215)MySqlTableBuilder Re-exports [MySqlTableBuilder](https://mikro-orm.io/api/knex/interface/MySqlTableBuilder.md) ### [**](#NamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/NamingStrategy.ts#L3)NamingStrategy Re-exports [NamingStrategy](https://mikro-orm.io/api/core/interface/NamingStrategy.md) ### [**](#NativeDeleteOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L277)NativeDeleteOptions Re-exports [NativeDeleteOptions](https://mikro-orm.io/api/core/interface/NativeDeleteOptions.md) ### [**](#NativeInsertUpdateManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L227)NativeInsertUpdateManyOptions Re-exports [NativeInsertUpdateManyOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateManyOptions.md) ### [**](#NativeInsertUpdateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L218)NativeInsertUpdateOptions Re-exports [NativeInsertUpdateOptions](https://mikro-orm.io/api/core/interface/NativeInsertUpdateOptions.md) ### [**](#New)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)New Re-exports [New](https://mikro-orm.io/api/core.md#New) ### [**](#Node)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L10)Node Re-exports [Node](https://mikro-orm.io/api/core/interface/Node.md) ### [**](#NodeState)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/CommitOrderCalculator.ts#L4)NodeState Re-exports [NodeState](https://mikro-orm.io/api/core/enum/NodeState.md) ### [**](#NoInfer)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)NoInfer Re-exports [NoInfer](https://mikro-orm.io/api/core.md#NoInfer) ### [**](#NonUniqueFieldNameException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L85)NonUniqueFieldNameException Re-exports [NonUniqueFieldNameException](https://mikro-orm.io/api/core/class/NonUniqueFieldNameException.md) ### [**](#NotFoundError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L293)NotFoundError Re-exports [NotFoundError](https://mikro-orm.io/api/core/class/NotFoundError.md) ### [**](#NotNullConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L90)NotNullConstraintViolationException Re-exports [NotNullConstraintViolationException](https://mikro-orm.io/api/core/class/NotNullConstraintViolationException.md) ### [**](#NullCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/NullCacheAdapter.ts#L3)NullCacheAdapter Re-exports [NullCacheAdapter](https://mikro-orm.io/api/core/class/NullCacheAdapter.md) ### [**](#NullHighlighter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/NullHighlighter.ts#L3)NullHighlighter Re-exports [NullHighlighter](https://mikro-orm.io/api/core/class/NullHighlighter.md) ### [**](#ObjectBindingPattern)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L27)ObjectBindingPattern Re-exports [ObjectBindingPattern](https://mikro-orm.io/api/core.md#ObjectBindingPattern) ### [**](#ObjectHydrator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/hydration/ObjectHydrator.ts#L12)ObjectHydrator Re-exports [ObjectHydrator](https://mikro-orm.io/api/core/class/ObjectHydrator.md) ### [**](#ObjectQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)ObjectQuery Re-exports [ObjectQuery](https://mikro-orm.io/api/core.md#ObjectQuery) ### [**](#OneToMany)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/index.ts#L7)OneToMany Re-exports [OneToMany](https://mikro-orm.io/api/core/function/OneToMany.md) ### [**](#OneToManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/index.ts#L7)OneToManyOptions Re-exports [OneToManyOptions](https://mikro-orm.io/api/core/interface/OneToManyOptions.md) ### [**](#OneToOne)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L5)OneToOne Re-exports [OneToOne](https://mikro-orm.io/api/core/function/OneToOne.md) ### [**](#OneToOneOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/OneToOne.ts#L15)OneToOneOptions Re-exports [OneToOneOptions](https://mikro-orm.io/api/core/interface/OneToOneOptions.md) ### [**](#OnInit)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L40)OnInit Re-exports [OnInit](https://mikro-orm.io/api/core/function/OnInit.md) ### [**](#OnLoad)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/hooks.ts#L44)OnLoad Re-exports [OnLoad](https://mikro-orm.io/api/core/function/OnLoad.md) ### [**](#Opt)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)Opt Re-exports [Opt](https://mikro-orm.io/api/core.md#Opt) ### [**](#OptimisticLockError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L150)OptimisticLockError Re-exports [OptimisticLockError](https://mikro-orm.io/api/core/class/OptimisticLockError.md) ### [**](#OptionalProps)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)OptionalProps Re-exports [OptionalProps](https://mikro-orm.io/api/core.md#OptionalProps) ### [**](#OrderDefinition)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L96)OrderDefinition Re-exports [OrderDefinition](https://mikro-orm.io/api/core.md#OrderDefinition) ### [**](#p)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L758)p Re-exports [p](https://mikro-orm.io/api/core.md#p) ### [**](#parseJsonSafe)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L172)parseJsonSafe Re-exports [parseJsonSafe](https://mikro-orm.io/api/core/function/parseJsonSafe.md) ### [**](#PlainObject)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L225)PlainObject Re-exports [PlainObject](https://mikro-orm.io/api/core/class/PlainObject.md) ### [**](#Platform)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/platforms/Platform.ts#L42)Platform Re-exports [Platform](https://mikro-orm.io/api/core/class/Platform.md) ### [**](#PoolConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L557)PoolConfig Re-exports [PoolConfig](https://mikro-orm.io/api/core/interface/PoolConfig.md) ### [**](#Populate)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)Populate Re-exports [Populate](https://mikro-orm.io/api/core.md#Populate) ### [**](#PopulateHint)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L14)PopulateHint Re-exports [PopulateHint](https://mikro-orm.io/api/core/enum/PopulateHint.md) ### [**](#PopulateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)PopulateOptions Re-exports [PopulateOptions](https://mikro-orm.io/api/core.md#PopulateOptions) ### [**](#PopulatePath)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L19)PopulatePath Re-exports [PopulatePath](https://mikro-orm.io/api/core/enum/PopulatePath.md) ### [**](#PostgreSqlKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/postgresql/PostgreSqlKnexDialect.ts#L6)PostgreSqlKnexDialect Re-exports [PostgreSqlKnexDialect](https://mikro-orm.io/api/knex/class/PostgreSqlKnexDialect.md) ### [**](#Primary)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)Primary Re-exports [Primary](https://mikro-orm.io/api/core.md#Primary) ### [**](#PrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L19)PrimaryKey Re-exports [PrimaryKey](https://mikro-orm.io/api/core/function/PrimaryKey.md) ### [**](#PrimaryKeyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L27)PrimaryKeyOptions Re-exports [PrimaryKeyOptions](https://mikro-orm.io/api/core/interface/PrimaryKeyOptions.md) ### [**](#PrimaryKeyProp)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L7)PrimaryKeyProp Re-exports [PrimaryKeyProp](https://mikro-orm.io/api/core.md#PrimaryKeyProp) ### [**](#Property)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L19)Property Re-exports [Property](https://mikro-orm.io/api/core/function/Property.md) ### [**](#PropertyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L54)PropertyOptions Re-exports [PropertyOptions](https://mikro-orm.io/api/core/interface/PropertyOptions.md) ### [**](#QBField)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L114)QBField Re-exports [QBField](https://mikro-orm.io/api/knex.md#QBField) ### [**](#QBField2)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L115)QBField2 Re-exports [QBField2](https://mikro-orm.io/api/knex.md#QBField2) ### [**](#QBFilterQuery)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L8)QBFilterQuery Re-exports [QBFilterQuery](https://mikro-orm.io/api/core.md#QBFilterQuery) ### [**](#QBQueryOrderMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L100)QBQueryOrderMap Re-exports [QBQueryOrderMap](https://mikro-orm.io/api/core.md#QBQueryOrderMap) ### [**](#QueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L138)QueryBuilder Re-exports [QueryBuilder](https://mikro-orm.io/api/knex/class/QueryBuilder.md) ### [**](#QueryFlag)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L106)QueryFlag Re-exports [QueryFlag](https://mikro-orm.io/api/core/enum/QueryFlag.md) ### [**](#QueryOperator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L29)QueryOperator Re-exports [QueryOperator](https://mikro-orm.io/api/core/enum/QueryOperator.md) ### [**](#QueryOrder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L73)QueryOrder Re-exports [QueryOrder](https://mikro-orm.io/api/core/enum/QueryOrder.md) ### [**](#QueryOrderKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L94)QueryOrderKeys Re-exports [QueryOrderKeys](https://mikro-orm.io/api/core.md#QueryOrderKeys) ### [**](#QueryOrderKeysFlat)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L93)QueryOrderKeysFlat Re-exports [QueryOrderKeysFlat](https://mikro-orm.io/api/core.md#QueryOrderKeysFlat) ### [**](#QueryOrderMap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L96)QueryOrderMap Re-exports [QueryOrderMap](https://mikro-orm.io/api/core.md#QueryOrderMap) ### [**](#QueryOrderNumeric)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L88)QueryOrderNumeric Re-exports [QueryOrderNumeric](https://mikro-orm.io/api/core/enum/QueryOrderNumeric.md) ### [**](#QueryResult)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L174)QueryResult Re-exports [QueryResult](https://mikro-orm.io/api/core/interface/QueryResult.md) ### [**](#QueryType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/enums.ts#L1)QueryType Re-exports [QueryType](https://mikro-orm.io/api/knex/enum/QueryType.md) ### [**](#quote)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L279)quote Re-exports [quote](https://mikro-orm.io/api/core/function/quote.md) ### [**](#raw)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/index.ts#L9)raw Re-exports [raw](https://mikro-orm.io/api/knex/function/raw.md) ### [**](#RawQueryFragment)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L6)RawQueryFragment Re-exports [RawQueryFragment](https://mikro-orm.io/api/core/class/RawQueryFragment.md) ### [**](#ReadOnlyException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L95)ReadOnlyException Re-exports [ReadOnlyException](https://mikro-orm.io/api/core/class/ReadOnlyException.md) ### [**](#ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L312)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L317)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L322)ref Re-exports [ref](https://mikro-orm.io/api/core/function/ref.md) ### [**](#Ref)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)Ref Re-exports [Ref](https://mikro-orm.io/api/core.md#Ref) ### [**](#Reference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L21)Reference Re-exports [Reference](https://mikro-orm.io/api/core/class/Reference.md) ### [**](#ReferenceKind)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L122)ReferenceKind Re-exports [ReferenceKind](https://mikro-orm.io/api/core/enum/ReferenceKind.md) ### [**](#ReferenceOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Property.ts#L331)ReferenceOptions Re-exports [ReferenceOptions](https://mikro-orm.io/api/core/interface/ReferenceOptions.md) ### [**](#ReflectMetadataProvider)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/metadata/ReflectMetadataProvider.ts#L7)ReflectMetadataProvider Re-exports [ReflectMetadataProvider](https://mikro-orm.io/api/core/class/ReflectMetadataProvider.md) ### [**](#RefreshDatabaseOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)RefreshDatabaseOptions Re-exports [RefreshDatabaseOptions](https://mikro-orm.io/api/core/interface/RefreshDatabaseOptions.md) ### [**](#RegisterOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L1269)RegisterOptions Re-exports [RegisterOptions](https://mikro-orm.io/api/core/interface/RegisterOptions.md) ### [**](#rel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L349)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L354)rel Re-exports [rel](https://mikro-orm.io/api/core/function/rel.md) ### [**](#Rel)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)Rel Re-exports [Rel](https://mikro-orm.io/api/core.md#Rel) ### [**](#RequestContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RequestContext.ts#L8)RequestContext Re-exports [RequestContext](https://mikro-orm.io/api/core/class/RequestContext.md) ### [**](#RequiredEntityData)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)RequiredEntityData Re-exports [RequiredEntityData](https://mikro-orm.io/api/core.md#RequiredEntityData) ### [**](#RequiredNullable)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)RequiredNullable Re-exports [RequiredNullable](https://mikro-orm.io/api/core.md#RequiredNullable) ### [**](#RunQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2012)RunQueryBuilder Re-exports [RunQueryBuilder](https://mikro-orm.io/api/knex/interface/RunQueryBuilder.md) ### [**](#Scalar)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)Scalar Re-exports [Scalar](https://mikro-orm.io/api/core.md#Scalar) ### [**](#SCALAR_TYPES)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L120)SCALAR\_TYPES Re-exports [SCALAR\_TYPES](https://mikro-orm.io/api/core.md#SCALAR_TYPES) ### [**](#ScalarRef)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)ScalarRef Re-exports [ScalarRef](https://mikro-orm.io/api/core.md#ScalarRef) ### [**](#ScalarReference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/Reference.ts#L215)ScalarReference Re-exports [ScalarReference](https://mikro-orm.io/api/core/class/ScalarReference.md) ### [**](#SchemaComparator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaComparator.ts#L22)SchemaComparator Re-exports [SchemaComparator](https://mikro-orm.io/api/knex/class/SchemaComparator.md) ### [**](#SchemaDifference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L135)SchemaDifference Re-exports [SchemaDifference](https://mikro-orm.io/api/knex/interface/SchemaDifference.md) ### [**](#SchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L658)SchemaGenerator Re-exports [SchemaGenerator](https://mikro-orm.io/api/knex.md#SchemaGenerator) ### [**](#SchemaHelper)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SchemaHelper.ts#L16)SchemaHelper Re-exports [SchemaHelper](https://mikro-orm.io/api/knex/class/SchemaHelper.md) ### [**](#SeederOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Configuration.ts#L548)SeederOptions Re-exports [SeederOptions](https://mikro-orm.io/api/core/interface/SeederOptions.md) ### [**](#Selected)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)Selected Re-exports [Selected](https://mikro-orm.io/api/core.md#Selected) ### [**](#SelectQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2018)SelectQueryBuilder Re-exports [SelectQueryBuilder](https://mikro-orm.io/api/knex/interface/SelectQueryBuilder.md) ### [**](#SerializationContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/SerializationContext.ts#L11)SerializationContext Re-exports [SerializationContext](https://mikro-orm.io/api/core/class/SerializationContext.md) ### [**](#serialize)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L322)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L342)serialize Re-exports [serialize](https://mikro-orm.io/api/core/function/serialize.md) ### [**](#SerializedPrimaryKey)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L23)SerializedPrimaryKey Re-exports [SerializedPrimaryKey](https://mikro-orm.io/api/core/function/SerializedPrimaryKey.md) ### [**](#SerializedPrimaryKeyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/PrimaryKey.ts#L29)SerializedPrimaryKeyOptions Re-exports [SerializedPrimaryKeyOptions](https://mikro-orm.io/api/core/interface/SerializedPrimaryKeyOptions.md) ### [**](#SerializeOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/serialization/EntitySerializer.ts#L287)SerializeOptions Re-exports [SerializeOptions](https://mikro-orm.io/api/core/interface/SerializeOptions.md) ### [**](#ServerException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L32)ServerException Re-exports [ServerException](https://mikro-orm.io/api/core/class/ServerException.md) ### [**](#Settings)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/ConfigurationLoader.ts#L447)Settings Re-exports [Settings](https://mikro-orm.io/api/core/interface/Settings.md) ### [**](#SimpleColumnMeta)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L10)SimpleColumnMeta Re-exports [SimpleColumnMeta](https://mikro-orm.io/api/core/interface/SimpleColumnMeta.md) ### [**](#SimpleLogger)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/logging/SimpleLogger.ts#L7)SimpleLogger Re-exports [SimpleLogger](https://mikro-orm.io/api/core/class/SimpleLogger.md) ### [**](#SmallIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)SmallIntType Re-exports [SmallIntType](https://mikro-orm.io/api/core/class/SmallIntType.md) ### [**](#sql)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L244)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L261)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L262)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L263)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/RawQueryFragment.ts#L264)sql Re-exports [sql](https://mikro-orm.io/api/core/function/sql.md) ### [**](#SqlEntityManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/SqlEntityManager.ts#L21)SqlEntityManager Renames and re-exports [EntityManager](https://mikro-orm.io/api/knex/class/EntityManager.md) ### [**](#SqlEntityRepository)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/SqlEntityRepository.ts#L6)SqlEntityRepository Renames and re-exports [EntityRepository](https://mikro-orm.io/api/knex/class/EntityRepository.md) ### [**](#SqliteKnexDialect)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteKnexDialect.ts#L4)SqliteKnexDialect Re-exports [SqliteKnexDialect](https://mikro-orm.io/api/knex/class/SqliteKnexDialect.md) ### [**](#SqliteTableCompiler)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/dialects/sqlite/SqliteTableCompiler.ts#L4)SqliteTableCompiler Re-exports [SqliteTableCompiler](https://mikro-orm.io/api/knex/class/SqliteTableCompiler.md) ### [**](#SqlSchemaGenerator)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/schema/SqlSchemaGenerator.ts#L21)SqlSchemaGenerator Re-exports [SqlSchemaGenerator](https://mikro-orm.io/api/knex/class/SqlSchemaGenerator.md) ### [**](#StringType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)StringType Re-exports [StringType](https://mikro-orm.io/api/core/class/StringType.md) ### [**](#SyncCacheAdapter)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/cache/CacheAdapter.ts#L30)SyncCacheAdapter Re-exports [SyncCacheAdapter](https://mikro-orm.io/api/core/interface/SyncCacheAdapter.md) ### [**](#SyntaxErrorException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L100)SyntaxErrorException Re-exports [SyntaxErrorException](https://mikro-orm.io/api/core/class/SyntaxErrorException.md) ### [**](#t)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L60)t Re-exports [t](https://mikro-orm.io/api/core.md#t) ### [**](#Table)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L19)Table Re-exports [Table](https://mikro-orm.io/api/knex/interface/Table.md) ### [**](#TableDifference)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/typings.ts#L114)TableDifference Re-exports [TableDifference](https://mikro-orm.io/api/knex/interface/TableDifference.md) ### [**](#TableExistsException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L105)TableExistsException Re-exports [TableExistsException](https://mikro-orm.io/api/core/class/TableExistsException.md) ### [**](#TableNotFoundException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L110)TableNotFoundException Re-exports [TableNotFoundException](https://mikro-orm.io/api/core/class/TableNotFoundException.md) ### [**](#TextType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)TextType Re-exports [TextType](https://mikro-orm.io/api/core/class/TextType.md) ### [**](#TimeType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)TimeType Re-exports [TimeType](https://mikro-orm.io/api/core/class/TimeType.md) ### [**](#TinyIntType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L29)TinyIntType Re-exports [TinyIntType](https://mikro-orm.io/api/core/class/TinyIntType.md) ### [**](#Transaction)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/connections/Connection.ts#L191)Transaction Re-exports [Transaction](https://mikro-orm.io/api/core.md#Transaction) ### [**](#Transactional)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Transactional.ts#L15)Transactional Re-exports [Transactional](https://mikro-orm.io/api/core/function/Transactional.md) ### [**](#TransactionContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionContext.ts#L4)TransactionContext Re-exports [TransactionContext](https://mikro-orm.io/api/core/class/TransactionContext.md) ### [**](#TransactionEventArgs)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/EventSubscriber.ts#L17)TransactionEventArgs Re-exports [TransactionEventArgs](https://mikro-orm.io/api/core/interface/TransactionEventArgs.md) ### [**](#TransactionEventBroadcaster)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/events/TransactionEventBroadcaster.ts#L7)TransactionEventBroadcaster Re-exports [TransactionEventBroadcaster](https://mikro-orm.io/api/core/class/TransactionEventBroadcaster.md) ### [**](#TransactionEventType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L202)TransactionEventType Re-exports [TransactionEventType](https://mikro-orm.io/api/core.md#TransactionEventType) ### [**](#TransactionManager)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/TransactionManager.ts#L12)TransactionManager Re-exports [TransactionManager](https://mikro-orm.io/api/core/class/TransactionManager.md) ### [**](#TransactionOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L214)TransactionOptions Re-exports [TransactionOptions](https://mikro-orm.io/api/core/interface/TransactionOptions.md) ### [**](#TransactionPropagation)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/enums.ts#L204)TransactionPropagation Re-exports [TransactionPropagation](https://mikro-orm.io/api/core/enum/TransactionPropagation.md) ### [**](#TransactionStateError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L305)TransactionStateError Re-exports [TransactionStateError](https://mikro-orm.io/api/core/class/TransactionStateError.md) ### [**](#TransformContext)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)TransformContext Re-exports [TransformContext](https://mikro-orm.io/api/core/interface/TransformContext.md) ### [**](#TruncateQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2045)TruncateQueryBuilder Re-exports [TruncateQueryBuilder](https://mikro-orm.io/api/knex/interface/TruncateQueryBuilder.md) ### [**](#Type)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)Type Re-exports [Type](https://mikro-orm.io/api/core/class/Type.md) ### [**](#TypeConfig)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L12)TypeConfig Re-exports [TypeConfig](https://mikro-orm.io/api/core/interface/TypeConfig.md) ### [**](#types)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L33)types Re-exports [types](https://mikro-orm.io/api/core.md#types) ### [**](#Uint8ArrayType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L28)Uint8ArrayType Re-exports [Uint8ArrayType](https://mikro-orm.io/api/core/class/Uint8ArrayType.md) ### [**](#UmzugMigration)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L11)UmzugMigration Re-exports [UmzugMigration](https://mikro-orm.io/api/core.md#UmzugMigration) ### [**](#UnboxArray)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)UnboxArray Re-exports [UnboxArray](https://mikro-orm.io/api/core.md#UnboxArray) ### [**](#UnderscoreNamingStrategy)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/naming-strategy/UnderscoreNamingStrategy.ts#L3)UnderscoreNamingStrategy Re-exports [UnderscoreNamingStrategy](https://mikro-orm.io/api/core/class/UnderscoreNamingStrategy.md) ### [**](#Unique)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L25)Unique Re-exports [Unique](https://mikro-orm.io/api/core/function/Unique.md) ### [**](#UniqueConstraintViolationException)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/exceptions.ts#L115)UniqueConstraintViolationException Re-exports [UniqueConstraintViolationException](https://mikro-orm.io/api/core/class/UniqueConstraintViolationException.md) ### [**](#UniqueOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/decorators/Indexed.ts#L38)UniqueOptions Re-exports [UniqueOptions](https://mikro-orm.io/api/core/interface/UniqueOptions.md) ### [**](#UnitOfWork)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/unit-of-work/UnitOfWork.ts#L32)UnitOfWork Re-exports [UnitOfWork](https://mikro-orm.io/api/core/class/UnitOfWork.md) ### [**](#UniversalPropertyKeys)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/defineEntity.ts#L35)UniversalPropertyKeys Re-exports [UniversalPropertyKeys](https://mikro-orm.io/api/core.md#UniversalPropertyKeys) ### [**](#UnknownType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)UnknownType Re-exports [UnknownType](https://mikro-orm.io/api/core/class/UnknownType.md) ### [**](#UpdateOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L267)UpdateOptions Re-exports [UpdateOptions](https://mikro-orm.io/api/core/interface/UpdateOptions.md) ### [**](#UpdateQueryBuilder)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/knex/src/query/QueryBuilder.ts#L2041)UpdateQueryBuilder Re-exports [UpdateQueryBuilder](https://mikro-orm.io/api/knex/interface/UpdateQueryBuilder.md) ### [**](#UpdateSchemaOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/index.ts#L13)UpdateSchemaOptions Re-exports [UpdateSchemaOptions](https://mikro-orm.io/api/core/interface/UpdateSchemaOptions.md) ### [**](#UpsertManyOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L239)UpsertManyOptions Re-exports [UpsertManyOptions](https://mikro-orm.io/api/core/interface/UpsertManyOptions.md) ### [**](#UpsertOptions)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/drivers/IDatabaseDriver.ts#L231)UpsertOptions Re-exports [UpsertOptions](https://mikro-orm.io/api/core/interface/UpsertOptions.md) ### [**](#Utils)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/utils/Utils.ts#L185)Utils Re-exports [Utils](https://mikro-orm.io/api/core/class/Utils.md) ### [**](#UuidType)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/types/index.ts#L30)UuidType Re-exports [UuidType](https://mikro-orm.io/api/core/class/UuidType.md) ### [**](#ValidationError)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/errors.ts#L4)ValidationError Re-exports [ValidationError](https://mikro-orm.io/api/core/class/ValidationError.md) ### [**](#wrap)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/wrap.ts#L6)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/wrap.ts#L11)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/wrap.ts#L17)wrap Re-exports [wrap](https://mikro-orm.io/api/core/function/wrap.md) ### [**](#WrappedEntity)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/entity/WrappedEntity.ts#L39)WrappedEntity Re-exports [WrappedEntity](https://mikro-orm.io/api/core/class/WrappedEntity.md) ## Type Aliases[**](<#Type Aliases>) ### [**](#Options)[**](https://github.com/mikro-orm/mikro-orm/blob/master/packages/sqlite/src/SqliteMikroORM.ts#L35)Options **Options: [Options](https://mikro-orm.io/api/core.md#Options)<[SqliteDriver](https://mikro-orm.io/api/sqlite/class/SqliteDriver.md)> --- # Source: https://mikro-orm.io/blog/tags.md ## J[​](#J "Direct link to J") * [javascript13](https://mikro-orm.io/blog/tags/javascript.md) *** --- # Source: https://mikro-orm.io/docs/transactions.md # Transactions and Concurrency > Starting v3.4, transactions are also supported in [MongoDB driver](https://mikro-orm.io/docs/usage-with-mongo.md). ## Transaction Demarcation[​](#transaction-demarcation "Direct link to Transaction Demarcation") Transaction demarcation is the task of defining your transaction boundaries. Proper transaction demarcation is very important because if not done properly it can negatively affect the performance of your application. Many databases and database abstraction layers by default operate in auto-commit mode, which means that every single SQL statement is wrapped in a small transaction. Without any explicit transaction demarcation from your side, this quickly results in poor performance because transactions are not cheap. For the most part, MikroORM already takes care of proper transaction demarcation for you: All the write operations (INSERT/UPDATE/DELETE) are queued until `em.flush()` is invoked which wraps all of these changes in a single transaction. However, MikroORM also allows (and encourages) you to take over and control transaction demarcation yourself. These are two ways to deal with transactions when using the MikroORM and are now described in more detail. ### Approach 1: Implicitly[​](#approach-1-implicitly "Direct link to Approach 1: Implicitly") The first approach is to use the implicit transaction handling provided by the MikroORM `EntityManager`. Given the following code snippet, without any explicit transaction demarcation: ``` const user = new User(...); user.name = 'George'; await orm.em.persist(user).flush(); ``` Since we do not do any custom transaction demarcation in the above code, `em.flush()` will begin and commit/rollback a transaction. This behavior is made possible by the aggregation of the DML operations by the MikroORM and is sufficient if all the data manipulation that is part of a unit of work happens through the domain model and thus the ORM. ### Approach 2: Explicitly[​](#approach-2-explicitly "Direct link to Approach 2: Explicitly") The explicit alternative is to use the transactions API directly to control the boundaries. The code then looks like this: ``` await orm.em.transactional(em => { //... do some work const user = new User(...); user.name = 'George'; em.persist(user); }); ``` Or you can use `begin/commit/rollback` methods explicitly. Following example is equivalent to the previous one: ``` const em = orm.em.fork(); await em.begin(); try { //... do some work const user = new User(...); user.name = 'George'; em.persist(user); await em.commit(); // will flush before making the actual commit query } catch (e) { await em.rollback(); throw e; } ``` Another way to handle explicit transactions is by using the `@Transactional()` decorator. ``` import { EntityManager, MikroORM, Transactional } from '@mikro-orm/core'; export class MyService { constructor(private readonly em: EntityManager) { } @Transactional() async doSomething() { //... do some work const user = new User(...); user.name = 'George'; this.em.persist(user); } } ``` This decorator wraps the method with `em.transactional()`, so you can provide `TransactionOptions` just like with `em.transactional()`. The difference is that you can specify the context in which the transaction begins by providing `context` option, and if omitted, the transaction will begin in the current context implicitly. It works on async functions and can be nested with `em.transactional()`. Explicit transaction demarcation is required when you want to include custom DBAL operations in a unit of work or when you want to make use of some methods of the EntityManager API that require an active transaction. Such methods will throw a `ValidationError` to inform you of that requirement. `em.transactional(cb)` and the `@Transactional()` will flush the inner `EntityManager` before transaction commit. ### Transaction Propagation[​](#transaction-propagation "Direct link to Transaction Propagation") Transaction propagation defines how transactions relate to each other when multiple transactional methods are called. This is particularly useful when building complex business logic that spans multiple service layers. By default, MikroORM uses `NESTED` propagation. When you call `em.transactional()` or use `@Transactional()` decorator within another transaction, it automatically creates a savepoint (nested transaction) rather than joining the existing transaction. This allows inner transaction failures to be handled independently. You can customize this behavior using the `propagation` option in both methods: | Propagation | Description | | ------------------ | -------------------------------------------------------------------------------- | | `NESTED` (default) | Creates savepoint if transaction exists, otherwise new transaction | | `REQUIRED` | Uses existing transaction if available (no savepoint), otherwise creates new one | | `REQUIRES_NEW` | Always creates independent transaction, suspending existing one | | `SUPPORTS` | Uses existing transaction if available, otherwise executes non-transactionally | | `MANDATORY` | Requires existing transaction, throws error if none exists | | `NOT_SUPPORTED` | Suspends existing transaction and executes without transaction | | `NEVER` | Must execute without transaction, throws error if one exists | #### NESTED Propagation[​](#nested-propagation "Direct link to NESTED Propagation") Creates a savepoint when a transaction exists, otherwise creates a new transaction. This is the default behavior. ``` // Using em.transactional() await em.transactional(async (em1) => { const book = new Book(...); book.title = 'Domain-Driven Design'; em1.persist(book); await em1.transactional(async (em2) => { const author = new Author(...); author.name = 'Eric Evans'; em2.persist(author); throw new Error('Nested transaction failed'); }); // Book is still saved despite inner transaction failure }); // Using @Transactional() decorator class BookService { constructor(private readonly em: EntityManager) { } @Transactional() async createBook() { const book = new Book(...); book.title = 'Domain-Driven Design'; this.em.persist(book); await this.addAuthor(); // Nested call creates savepoint } @Transactional() async addAuthor() { const author = new Author(...); author.name = 'Eric Evans'; this.em.persist(author); throw new Error('Nested transaction failed'); } } ``` The nested call automatically creates a savepoint, allowing the inner transaction to fail independently without affecting the outer transaction. #### SUPPORTS Propagation[​](#supports-propagation "Direct link to SUPPORTS Propagation") Flexible propagation that adapts to the current context: ``` // Using em.transactional() await em.transactional(async (em1) => { await em1.transactional(async (em2) => { const author = new Author(...); author.name = 'Jane Smith'; author.email = 'jane@example.com'; em2.persist(author); }, { propagation: TransactionPropagation.SUPPORTS }); }); // Using @Transactional() decorator class BookService { constructor(private readonly em: EntityManager) { } @Transactional({ propagation: TransactionPropagation.SUPPORTS }) async findBookWithAuthor(id: number) { const book = await this.em.findOneOrFail(Book, id, { populate: ['author'] }); // Works with or without transaction return book; } @Transactional() async updateBookTitle(id: number, title: string) { // This creates a transaction const book = await this.findBookWithAuthor(id); // Joins existing transaction book.title = title; } } ``` Ideal for read operations that can work with or without transactional consistency. #### REQUIRED Propagation[​](#required-propagation "Direct link to REQUIRED Propagation") Uses the existing transaction without creating a savepoint. All operations share the same transaction context: ``` // Using em.transactional() await em.transactional(async (em1) => { const author = new Author(...); author.name = 'John Doe'; author.email = 'john@example.com'; em1.persist(author); await em1.transactional(async (em2) => { const book = new Book(...); book.title = 'Clean Code'; book.author = author; em2.persist(book); throw new Error(); }, { propagation: TransactionPropagation.REQUIRED }); }); // Using @Transactional() decorator class LibraryService { constructor(private readonly em: EntityManager) { } @Transactional() async createAuthorWithBook() { const author = new Author(...); author.name = 'Robert C. Martin'; author.email = 'bob@example.com'; this.em.persist(author); await this.addBook(author); // Will throw error } @Transactional({ propagation: TransactionPropagation.REQUIRED }) async addBook(author: Author) { const book = new Book(...); book.title = 'Clean Code'; book.author = author; this.em.persist(book); throw new Error(); // Both author and book rolled back } } ``` Use `REQUIRED` when all operations must succeed or fail together as a single atomic unit. #### MANDATORY Propagation[​](#mandatory-propagation "Direct link to MANDATORY Propagation") Enforces that a method must be called within an existing transaction: ``` // Using em.transactional() async function updateBookStock(bookId: number, quantity: number) { await em.transactional(async (em) => { const book = await em.findOneOrFail(Book, bookId); book.stock += quantity; }, { propagation: TransactionPropagation.MANDATORY }); } // Using @Transactional() decorator class InventoryService { constructor(private readonly em: EntityManager) { } @Transactional({ propagation: TransactionPropagation.MANDATORY }) async updateStock(bookId: number, quantity: number) { const book = await this.em.findOneOrFail(Book, bookId); book.stock += quantity; } } // Correct usage - within transaction await em.transactional(async () => { await inventoryService.updateStock(1, 10); }); // Throws error - no transaction exists await inventoryService.updateStock(1, 10); ``` Use for critical operations that should never run outside a transaction context. #### REQUIRES\_NEW Propagation[​](#requires_new-propagation "Direct link to REQUIRES_NEW Propagation") Creates a completely independent transaction that commits or rolls back independently: ``` // Using em.transactional() await em.transactional(async (em1) => { const author = new Author(...); author.name = 'John Doe'; author.email = 'john@example.com'; em1.persist(author); await em1.transactional(async (em2) => { const book = new Book(...); book.title = 'Domain-Driven Design'; em2.persist(book); }, { propagation: TransactionPropagation.REQUIRES_NEW }); throw new Error(); // Author rolled back, but book already committed }); // Using @Transactional() decorator class BookService { constructor(private readonly em: EntityManager) { } @Transactional() async createAuthor(name: string, email: string) { const author = new Author(...); author.name = name; author.email = email; this.em.persist(author); await this.logCreation('AUTHOR_CREATED'); // Independent transaction throw new Error(); // Author rolled back, but log persisted } @Transactional({ propagation: TransactionPropagation.REQUIRES_NEW }) async logCreation(action: string) { const log = new AuditLog(...); log.action = action; log.timestamp = new Date(); this.em.persist(log); // Commits independently } } ``` Use for operations that must complete regardless of the outer transaction outcome, such as audit logging or payment processing. #### NEVER Propagation[​](#never-propagation "Direct link to NEVER Propagation") Ensures the method executes outside any transaction context: ``` // Using em.transactional() class ExternalService { async sendNotification(bookTitle: string) { await this.em.transactional(async (em) => { await externalNotificationAPI.notify(`New book: ${bookTitle}`); }, { propagation: TransactionPropagation.NEVER }); } } // Using @Transactional() decorator class EmailService { constructor(private readonly em: EntityManager) { } @Transactional({ propagation: TransactionPropagation.NEVER }) async sendNewBookEmail(authorEmail: string, bookTitle: string) { // Must not run in transaction await externalEmailService.send(authorEmail, `Your book '${bookTitle}' was published`); } @Transactional() async publishBook(book: Book) { // This will throw error because sendNewBookEmail requires no transaction await this.sendNewBookEmail(book.author.email, book.title); } } // Works - no transaction await emailService.sendNewBookEmail('author@example.com', 'Clean Code'); // Throws error - transaction exists await em.transactional(async () => { await emailService.sendNewBookEmail('author@example.com', 'Clean Code'); }); ``` Useful for operations that must not participate in transactions, such as external service calls or audit logging. #### NOT\_SUPPORTED Propagation[​](#not_supported-propagation "Direct link to NOT_SUPPORTED Propagation") Suspends any existing transaction and executes the method non-transactionally: ``` // Using em.transactional() await em.transactional(async (em1) => { const author = new Author(...); author.name = 'John Doe'; author.email = 'john@example.com'; em1.persist(author); await em1.transactional(async (em2) => { // This executes without transaction const stats = await em2.count(Book); return stats; }, { propagation: TransactionPropagation.NOT_SUPPORTED }); // Transaction resumes here }); // Using @Transactional() decorator class ReportService { constructor(private readonly em: EntityManager) { } @Transactional({ propagation: TransactionPropagation.NOT_SUPPORTED }) async generateReport() { // Runs without transaction even if called from transactional context const books = await this.em.find(Book, {}); return this.processReport(books); } @Transactional() async updateAndReport() { const book = await this.em.findOneOrFail(Book, 1); book.views++; await this.generateReport(); // Suspended transaction // Transaction resumes after report generation } } ``` Use for non-critical operations like reporting or caching that don't need transactional guarantees. #### Context propagation[​](#context-propagation "Direct link to Context propagation") When using `em.transactional()` or `@Transactional()` decorator, a new context (an `EntityManager` fork) is created for the transaction and provided in the callback parameter. If you use a global `EntityManager` instance (or a fork created with `useContext: true`), the inner context will be automatically respected, similarly to how the [`RequestContext` works](https://mikro-orm.io/docs/identity-map.md#request-context), so you can work with your `EntityManager` from a DI container even inside the callback of an explicit transaction. The inner context is created with `clear: false` option, meaning the new identity map is not cleared—or to be precise, it will be populated with all managed entities from the upper context. This allows you to use the same entities in the transaction callback, without having to re-fetch them. If you want to clear the identity map, you can pass `clear: true` option to `em.transactional()` or `@Transactional()` decorator. ``` // load user in upper context const user = await em.findOneOrFail(User, 1); await em.transactional(() => { // and it's available inside the callback too user.isActive = true; }); // here the changes are already flushed, since `em.transactional()` // flushes the inner EntityManager before commit ``` warning If you are creating multiple transactions and want to run them in parallel, you should use a fresh fork, or the `clear: true` option, so your contexts cannot interfere with each other. If you use the default `clear: false`, the entity instances will be shared between the transactions, which can lead to unexpected results like reinsertion of a removed entity. Similarly, the changes done inside the transaction callback are propagated to the upper context, so you can use the same `EntityManager` instance in the callback and outside of it. ``` const parent = await em.findOneOrFail(Parent, 1, { populate: ['children'], }); console.log(parent.children.count()); // 0 await em.transactional(async () => { em.create(Child, { parent }); }); console.log(parent.children.count()); // 1 ``` ### Exception Handling[​](#exception-handling "Direct link to Exception Handling") When using implicit transaction demarcation and an exception occurs during `em.flush()`, the transaction is automatically rolled back. When using explicit transaction demarcation and an exception occurs, the transaction should be rolled back immediately as demonstrated in the example above. This can be handled elegantly by the control abstractions shown earlier. Note that when catching Exception you should generally re-throw the exception. If you intend to recover from some exceptions, catch them explicitly in earlier catch blocks (but do not forget to rollback the transaction). All other best practices of exception handling apply similarly (i.e. either log or re-throw, not both, etc.). As a result of this procedure, all previously managed or removed instances of the `EntityManager` become detached. The state of the detached objects will be the state at the point at which the transaction was rolled back. The state of the objects is in no way rolled back and thus the objects are now out of sync with the database. The application can continue to use the detached objects, knowing that their state is potentially no longer accurate. If you intend to start another unit of work after an exception has occurred you should do that with a new `EntityManager`. Simply use `em.fork()` to obtain fresh copy with cleared identity map. ## Locking Support[​](#locking-support "Direct link to Locking Support") ### Why we need concurrency control?[​](#why-we-need-concurrency-control "Direct link to Why we need concurrency control?") If transactions are executed serially (one at a time), no transaction concurrency exists. However, if concurrent transactions with interleaving operations are allowed, you may easily run into one of those problems: 1. The lost update problem 2. The dirty read problem 3. The incorrect summary problem To mitigate those problems, MikroORM offers support for Pessimistic and Optimistic locking strategies natively. This allows you to take very fine-grained control over what kind of locking is required for your entities in your application. ### Optimistic Locking[​](#optimistic-locking "Direct link to Optimistic Locking") Database transactions are fine for concurrency control during a single request. However, a database transaction should not span across requests, the so-called "user think time". Therefore, a long-running "business transaction" that spans multiple requests needs to involve several database transactions. Thus, database transactions alone can no longer control concurrency during such a long-running business transaction. Concurrency control becomes the partial responsibility of the application itself. MikroORM has integrated support for automatic optimistic locking via a version field. In this approach any entity that should be protected against concurrent modifications during long-running business transactions gets a version field that is either a simple number (mapping type: integer) or a timestamp (mapping type: datetime). When changes to such an entity are persisted at the end of a long-running conversation the version of the entity is compared to the version in the database and if they don't match, a `OptimisticLockError` is thrown, indicating that the entity has been modified by someone else already. You designate a version field in an entity as follows. In this example we'll use an integer. ``` export class User { // ... @Property({ version: true }) version!: number; // ... } ``` Alternatively a datetime type can be used (which maps to a SQL timestamp or datetime): ``` export class User { // ... @Property({ version: true }) version!: Date; // ... } ``` Version numbers (not timestamps) should however be preferred as they can not potentially conflict in a highly concurrent environment, unlike timestamps where this is a possibility, depending on the resolution of the timestamp on the particular database platform. When a version conflict is encountered during `em.flush()`, a `OptimisticLockError` is thrown and the active transaction rolled back (or marked for rollback). This exception can be caught and handled. Potential responses to a `OptimisticLockError` are to present the conflict to the user or to refresh or reload objects in a new transaction and then retrying the transaction. The time between showing an update form and actually modifying the entity can in the worst scenario be as long as your application's session timeout. If changes happen to the entity in that time frame you want to know directly when retrieving the entity that you will hit an optimistic locking exception: You can always verify the version of an entity during a request either when calling `em.findOne()`: ``` const theEntityId = 1; const expectedVersion = 184; try { const entity = await orm.em.findOne(User, theEntityId, { lockMode: LockMode.OPTIMISTIC, lockVersion: expectedVersion }); // do the work await orm.em.flush(); } catch (e) { console.log('Sorry, but someone else has already changed this entity. Please apply the changes again!'); } ``` Or you can use `em.lock()` to find out: ``` const theEntityId = 1; const expectedVersion = 184; const entity = await orm.em.findOne(User, theEntityId); try { // assert version await orm.em.lock(entity, LockMode.OPTIMISTIC, expectedVersion); } catch (e) { console.log('Sorry, but someone else has already changed this entity. Please apply the changes again!'); } ``` ### Concurrency Checks[​](#concurrency-checks "Direct link to Concurrency Checks") As opposed to version fields that are handled automatically, we can use concurrency checks. They allow us to mark specific properties to be included in the concurrency check, just like the version field was. But this time, we will be responsible for updating the fields explicitly. When we try to update such entity without changing one of the concurrency fields, `OptimisticLockError` will be thrown. Same mechanism is then used to check whether the update succeeded, and throw the same type of error when not. ``` @Entity() export class ConcurrencyCheckUser { // all primary keys are by default part of the concurrency check @PrimaryKey({ length: 100 }) firstName: string; // all primary keys are by default part of the concurrency check @PrimaryKey({ length: 100 }) lastName: string; @Property({ concurrencyCheck: true }) age: number; @Property({ nullable: true }) other?: string; } ``` #### Important Implementation Notes[​](#important-implementation-notes "Direct link to Important Implementation Notes") You can easily get the optimistic locking workflow wrong if you compare the wrong versions. Say you have Alice and Bob editing a hypothetical blog post: * Alice reads the headline of the blog post being "Foo", at optimistic lock version 1 (GET Request) * Bob reads the headline of the blog post being "Foo", at optimistic lock version 1 (GET Request) * Bob updates the headline to "Bar", upgrading the optimistic lock version to 2 (POST Request of a Form) * Alice updates the headline to "Baz", ... (POST Request of a Form) Now at the last stage of this scenario the blog post has to be read again from the database before Alice's headline can be applied. At this point you will want to check if the blog post is still at version 1 (which it is not in this scenario). Using optimistic locking correctly, you **have** to add the version as an additional hidden field (or into the session for more safety). Otherwise, you cannot verify the version is still the one being originally read from the database when Alice performed her GET request for the blog post. If this happens you might see lost updates you wanted to prevent with Optimistic Locking. See the example code (frontend): ``` const res = await fetch('api.example.com/book/123'); const book = res.json(); console.log(book.version); // prints the current version // user does some changes and calls the PUT handler const changes = { title: 'new title' }; await fetch('api.example.com/book/123', { method: 'PUT', body: { ...changes, version: book.version, }, }); ``` And the corresponding API endpoints: ``` // GET /book/:id async findOne(req, res) { const book = await this.em.findOne(Book, +req.query.id); res.json(book); } // PUT /book/:id async update(req, res) { const book = await this.em.findOne(Book, +req.query.id, { lockMode: LockMode.OPTIMISTIC, lockVersion: req.body.version }); wrap(book).assign(req.body); await this.em.flush(); res.json(book); } ``` Your frontend app loads an entity from API, the response includes the version property. User makes some changes and fires PUT request back to the API, with version field included in the payload. The PUT handler of the API then reads the version and passes it to the `em.findOne()` call. ### Pessimistic Locking[​](#pessimistic-locking "Direct link to Pessimistic Locking") MikroORM supports Pessimistic Locking at the database level. No attempt is being made to implement pessimistic locking inside MikroORM, rather vendor-specific and ANSI-SQL commands are used to acquire row-level locks. Every Entity can be part of a pessimistic lock, there is no special metadata required to use this feature. For Pessimistic Locking to work, an open transaction is required. MikroORM will throw an Exception if you attempt to acquire a pessimistic lock and no transaction is running. MikroORM currently supports 6 pessimistic lock modes: | Mode | Postgres | MySQL | | ------------------------------------ | ------------------------ | -------------------------------- | | `LockMode.PESSIMISTIC_READ` | `for share` | `lock in share mode` | | `LockMode.PESSIMISTIC_WRITE` | `for update` | `for update` | | `LockMode.PESSIMISTIC_PARTIAL_WRITE` | `for update skip locked` | `for update skip locked` | | `LockMode.PESSIMISTIC_WRITE_OR_FAIL` | `for update nowait` | `for update nowait` | | `LockMode.PESSIMISTIC_PARTIAL_READ` | `for share skip locked` | `lock in share mode skip locked` | | `LockMode.PESSIMISTIC_READ_OR_FAIL` | `for share nowait` | `lock in share mode nowait` | You can use pessimistic locks in three different scenarios: 1. Using `em.findOne(className, id, { lockMode: LockMode.PESSIMISTIC_WRITE })` or `em.findOne(className, id, { lockMode: LockMode.PESSIMISTIC_READ })` 2. Using `em.lock(entity, LockMode.PESSIMISTIC_WRITE)` or `em.lock(entity, LockMode.PESSIMISTIC_READ)` 3. Using `QueryBuilder.setLockMode(LockMode.PESSIMISTIC_WRITE)` or `QueryBuilder.setLockMode(LockMode.PESSIMISTIC_READ)` Optionally we can also pass list of table aliases we want to lock via `lockTableAliases` option: ``` const res = await em.find(User, { name: 'Jon' }, { populate: ['identities'], strategy: LoadStrategy.JOINED, lockMode: LockMode.PESSIMISTIC_READ, lockTableAliases: ['u0'], }); // select ... // from "user" as "u0" // left join "identity" as "i1" on "u0"."id" = "i1"."user_id" // where "u0"."name" = 'Jon' // for update of "u0" skip locked ``` ## Isolation levels[​](#isolation-levels "Direct link to Isolation levels") We can set the transaction isolation levels: ``` await orm.em.transactional(async em => { // ... }, { isolationLevel: IsolationLevel.READ_UNCOMMITTED }); ``` Available isolation levels: * `IsolationLevel.READ_UNCOMMITTED` * `IsolationLevel.READ_COMMITTED` * `IsolationLevel.SNAPSHOT` * `IsolationLevel.REPEATABLE_READ` * `IsolationLevel.SERIALIZABLE` ## Disabling transactions[​](#disabling-transactions "Direct link to Disabling transactions") Since v5.7 is it possible to disable transactions, either globally via `disableTransactions` config option, or locally when using `em.transactional()`. ``` // only the outer transaction will be opened await orm.em.transactional(async em => { // but the inner calls to both em.transactional and em.begin will be no-op await em.transactional(...); }, { disableTransactions: true }); ``` Alternatively, you can disable transactions when creating new forks: ``` const em = await orm.em.fork({ disableTransactions: true }); await em.transactional(...); // no-op await em.begin(...); // no-op await em.commit(...); // commit still calls `flush` ``` > This part of documentation is highly inspired by [doctrine internals docs](https://www.doctrine-project.org/projects/doctrine-orm/en/latest/reference/transactions-and-concurrency.html) as the behaviour here is pretty much the same. --- # Source: https://mikro-orm.io/docs/type-safe-relations.md # Type-Safe Relations Entity relations are mapped to entity references - instances of the entity that have at least the primary key available. This reference is stored in identity map, so you will get the same object reference when fetching the same document from database. ``` @ManyToOne(() => Author) author!: Author; // the value is always instance of the `Author` entity ``` You can check whether an entity is initialized via `wrap(entity).isInitialized()`, and use `await wrap(entity).init()` to initialize it. This will trigger database call and populate the entity, keeping the same reference in identity map. ``` const author = em.getReference(Author, 123); console.log(author.id); // accessing the id will not trigger any db call console.log(wrap(author).isInitialized()); // false console.log(author.name); // undefined await wrap(author).init(); // this will trigger db call console.log(wrap(author).isInitialized()); // true console.log(author.name); // defined ``` The `isInitialized()` method can be used for runtime checks, but that could end up being quite tedious - we can do better! Instead of manual checks for entity state, we can use the `Reference` wrapper. ## `Reference` wrapper[​](#reference-wrapper "Direct link to reference-wrapper") When you define `@ManyToOne` and `@OneToOne` properties on your entity, TypeScript compiler will think that desired entities are always loaded: ``` @Entity() export class Book { @PrimaryKey() id!: number; @ManyToOne() author!: Author; constructor(author: Author) { this.author = author; } } const book = await em.findOne(Book, 1); console.log(book.author instanceof Author); // true console.log(wrap(book.author).isInitialized()); // false console.log(book.author.name); // undefined as `Author` is not loaded yet ``` You can overcome this issue by using the `Reference` wrapper. It simply wraps the entity, defining `load(): Promise` method that will first lazy load the association if not already available. You can also use `unwrap(): T` method to access the underlying entity without loading it. You can also use `load(prop: K): Promise`, which works like `load()` but returns the specified property. * reflect-metadata * ts-morph * defineEntity * EntitySchema ./entities/Book.ts ``` import { Entity, Ref, ManyToOne, PrimaryKey, ref } from '@mikro-orm/core'; @Entity() export class Book { @PrimaryKey() id!: number; @ManyToOne(() => Author, { ref: true }) author: Ref; constructor(author: Author) { this.author = ref(author); } } ``` ./entities/Book.ts ``` import { Entity, Ref, ManyToOne, PrimaryKey, Reference } from '@mikro-orm/core'; @Entity() export class Book { @PrimaryKey() id!: number; @ManyToOne() author: Ref; constructor(author: Author) { this.author = ref(author); } } ``` ./entities/Book.ts ``` import { type InferEntity, defineEntity } from '@mikro-orm/core'; export const Book = defineEntity({ name: 'Book', properties: p => ({ id: p.integer().primary(), author: p.manyToOne(Author).ref(), }), }); export interface IBook extends InferEntity {} ``` ./entities/Book.ts ``` export interface IBook { id: number; author: Ref; } export const Book = new EntitySchema({ name: 'Book', properties: { id: { type: Number, primary: true }, author: { entity: () => Author, ref: true }, }, }); ``` ``` const book1 = await em.findOne(Book, 1); book.author instanceof Reference; // true book1.author; // Ref (instance of `Reference` class) book1.author.name; // type error, there is no `name` property book1.author.unwrap().name; // unsafe sync access, undefined as author is not loaded book1.author.isInitialized(); // false const book2 = await em.findOne(Book, 1, { populate: ['author'] }); book2.author; // LoadedReference (instance of `Reference` class) book2.author.$.name; // type-safe sync access ``` There are also `getEntity()` and `getProperty()` methods that are synchronous getters, that will first check if the wrapped entity is initialized, and if not, it will throw and error. ``` const book = await em.findOne(Book, 1); console.log(book.author instanceof Reference); // true console.log(wrap(book.author).isInitialized()); // false console.log(book.author.getEntity()); // Error: Reference 123 not initialized console.log(book.author.getProperty('name')); // Error: Reference 123 not initialized console.log(await book.author.load('name')); // ok, loading the author first console.log(book.author.getProperty('name')); // ok, author already loaded ``` If you use different metadata provider than `TsMorphMetadataProvider` (e.g. `ReflectMetadataProvider`), you will also need to explicitly set `ref` parameter: ``` @ManyToOne(() => Author, { ref: true }) author!: Ref; ``` ### Using `Reference.load()`[​](#using-referenceload "Direct link to using-referenceload") After retrieving a reference, you can load the full entity by utilizing the asynchronous `Reference.load()` method. ``` const book1 = await em.findOne(Book, 1); (await book1.author.load()).name; // async safe access const book2 = await em.findOne(Book, 2); const author = await book2.author.load(); author.name; await book2.author.load(); // no additional query, already loaded ``` > As opposed to `wrap(e).init()` which always refreshes the entity, `Reference.load()` method will query the database only if the entity is not already loaded in Identity Map. ### `ScalarReference` wrapper[​](#scalarreference-wrapper "Direct link to scalarreference-wrapper") Similarly to the `Reference` wrapper, we can also wrap scalars with `Ref` into a `ScalarReference` object. This is handy for lazy scalar properties. The `Ref` type automatically resolves to `ScalarReference` for non-object types, so the below is correct: ``` @Property({ lazy: true, ref: true }) passwordHash!: Ref; ``` ``` const user = await em.findOne(User, 1); const passwordHash = await user.passwordHash.load(); ``` For object-like types, if you choose to use the reference wrappers, you should use the `ScalarRef` type explicitly. For example, you might want to lazily load a large JSON value: ``` @Property({ type: 'json', nullable: true, lazy: true, ref: true }) // ReportParameters is an object type, imagine it defined elsewhere. reportParameters!: ScalarRef; ``` Keep in mind that once a scalar value is managed through a `ScalarReference`, accessing it through MikroORM managed objects will always return the `ScalarReference` wrapper. That can be confusing in case the property is also `nullable`, since the `ScalarReference` will always be truthy. In such cases, you should inform the type system of the nullability of the property through `ScalarReference`'s type parameter as demonstrated above. Below is an example of how it all works: ``` // Say Report of id "1" has no reportParameters in the Database. const report = await em.findOne(Report, 1); if (report.reportParameters) { // Logs Ref, not the actual value. **Would always run***. console.log(report.reportParameters); //@ts-expect-error $/.get() is not available until the reference has been loaded. // const mistake = report.reportParameters.$ } const populatedReport = await em.populate(report, ['reportParameters']); // Logs `null` console.log(populatedReport.reportParameters.$); ``` ## `Loaded` type[​](#loaded-type "Direct link to loaded-type") If you check the return type of `em.find` and `em.findOne` methods, you might be a bit confused - instead of the entity, they return `Loaded` type: ``` // res1 is of type `Loaded[]` const res1 = await em.find(User, {}); // res2 is of type `Loaded[]` const res2 = await em.find(User, {}, { populate: ['identity', 'friends'] }); ``` The `User` entity is defined as follows: ``` import { Entity, PrimaryKey, ManyToOne, OneToOne, Collection, Ref, ref } from '@mikro-orm/core'; @Entity() export class User { @PrimaryKey() id!: number; @ManyToOne(() => Identity) identity: Ref; @ManyToMany(() => User) friends = new Collection(this); constructor(identity: Identity) { this.identity = ref(identity); } } ``` The `Loaded` type will represent what relations of the entity are populated, and will add a special `$` symbol to them, allowing for type-safe synchronous access to the loaded properties. This works great in combination with the `Reference` wrapper: > If you don't like symbols with magic names like `$`, you can as well use the `get()` method, which is an alias for it. ``` // res is of type `Loaded` const user = await em.findOneOrFail(User, 1, { populate: ['identity'] }); // instead of the async `await user.identity.load()` call that would ensure the relation is loaded // you can use the dynamically added `$` symbol for synchronous and type-safe access to it: console.log(user.identity.$.email); ``` > If you'd omit the `populate` hint, type of `user` would be `Loaded` and the `user.identity.$` symbol wouldn't be available - such call would end up with compilation error. ``` // if we try without the populate hint, the type is `Loaded` const user2 = await em.findOneOrFail(User, 2); // TS2339: Property '$' does not exist on type '{ id: number; } & Reference'. console.log(user.identity.$.email); ``` Same works for the `Collection` wrapper, that offers runtime methods `isInitialized`, `loadItems` and `init`, as well as the type-safe `$` symbol. ``` // res is of type `Loaded` const user = await em.findOneOrFail(User, 1, { populate: ['friends'] }); // instead of the async `await user.friends.loadItems()` call that would ensure the collection items are loaded // you can use the dynamically added `$` symbol for synchronous and type-safe access to it: for (const friend of user.friends.$) { console.log(friend.email); } ``` You can also use the `Loaded` type in your own methods, to require on type level that some relations will be populated: ``` function checkIdentity(user: Loaded) { if (!user.identity.$.email.includes('@')) { throw new Error(`That's a weird e-mail!`); } } ``` ``` // works const u1 = await em.findOneOrFail(User, 2, { populate: ['identity'] }); checkIdentity(u1); // fails const u2 = await em.findOneOrFail(User, 2); checkIdentity(u2); ``` > Keep in mind this is all just a type-level information, you can easily trick it via type assertions. ## Assigning to `Reference` properties[​](#assigning-to-reference-properties "Direct link to assigning-to-reference-properties") When you define the property as `Reference` wrapper, you will need to assign the `Reference` instance to it instead of the entity. You can convert any entity to a `Reference` wrapper via `ref(entity)`, or use `wrapped` option of `em.getReference()`: > `ref(e)` is a shortcut for `wrap(e).toReference()`, which is the same as `Reference.create(e)`. ``` import { ref } from '@mikro-orm/core'; const book = await em.findOne(Book, 1); const repo = em.getRepository(Author); book.author = repo.getReference(2, { wrapped: true }); // same as: book.author = ref(repo.getReference(2)); await em.flush(); ``` Since v5 we can also create entity references without access to `EntityManager`. This can be handy if you want to create a reference from inside entity constructor: ``` import { Entity, ManyToOne, Rel, rel } from '@mikro-orm/core'; @Entity() export class Book { @ManyToOne(() => Author, { ref: true }) author!: Ref; constructor(authorId: number) { this.author = rel(Author, authorId); } } ``` Another way is to use `toReference()` method available as part of [`WrappedEntity` interface](https://mikro-orm.io/docs/entity-helper.md#wrappedentity-and-wrap-helper): ``` const author = new Author(...) book.author = wrap(author).toReference(); ``` If the reference already exist, you need to re-assign it with a new `Reference` instance - they hold identity just like entities, so you need to replace them: ``` article.author = ref(new User(...)); ``` ## What is `Ref` (`IdentifiedReference`)?[​](#what-is-ref-identifiedreference "Direct link to what-is-ref-identifiedreference") `Ref` is an intersection type that adds primary key property to the `Reference` interface. It allows getting the primary key from `Reference` instance directly. By default, we try to detect the PK by checking if a property with a known name exists. We check for those in order: `_id`, `uuid`, `id` - with a way to manually set the property name via `PrimaryKeyProp` symbol (`[PrimaryKeyProp]?: 'foo';`). ``` const book = await em.findOne(Book, 1); console.log(book.author.id); // ok, returns the PK ``` You can also have a non-standard primary key: ``` import { Entity, PrimaryKey, PrimaryKeyProp } from '@mikro-orm/core'; @Entity() export class Author { @PrimaryKey() myPrimaryKey!: number; [PrimaryKeyProp]?: 'myPrimaryKey'; } const book = await em.findOne(Book, 1); console.log(book.author.myPrimaryKey); // ok, returns the PK ``` For MongoDB, define the PK generic type argument as `'id' | '_id'` to access both `string` and `ObjectId` PK values: * reflect-metadata * ts-morph * defineEntity * EntitySchema ./entities/Book.ts ``` @Entity() export class Book { @PrimaryKey() _id!: ObjectId; @SerializedPrimaryKey() id!: string; @ManyToOne(() => Author, { ref: true }) author!: Ref; } ``` ./entities/Book.ts ``` @Entity() export class Book { @PrimaryKey() _id!: ObjectId; @SerializedPrimaryKey() id!: string; @ManyToOne() author!: Ref; } ``` ./entities/Book.ts ``` import { type InferEntity, defineEntity } from '@mikro-orm/core'; export const Book = defineEntity({ name: 'Book', properties: p => ({ _id: p.type(ObjectId).primary(), id: p.string().serializedPrimaryKey(), author: () => p.manyToOne(Author).ref(), }), }); export interface IBook extends InferEntity {} ``` ./entities/Book.ts ``` export interface IBook { _id: ObjectId; id: string; author: Ref; } export const Book = new EntitySchema({ name: 'Book', properties: { _id: { type: 'ObjectId', primary: true }, id: { type: String, serializedPrimaryKey: true }, author: { entity: 'Author', ref: true }, }, }); ``` ``` const book = await em.findOne(Book, 1); console.log(book.author.id); // ok, returns string PK console.log(book.author._id); // ok, returns ObjectId PK ``` --- # Source: https://mikro-orm.io/docs/guide/type-safety.md # Chapter 5: Type-safety Entity relations are mapped to entity references - instances of the entity that have at least the primary key available. This reference is stored in the Identity Map, so you will get the same object reference when fetching the same document from the database. ``` @ManyToOne(() => User) author!: User; // the value is always instance of the `User` entity ``` You can check whether an entity is initialized via `wrap(entity).isInitialized()`, and use `await wrap(entity).init()` to initialize it lazily. This will trigger a database call and populate the entity, keeping the same reference in the Identity Map. ``` const user = em.getReference(User, 123); console.log(user.id); // prints `123`, accessing the id will not trigger any db call console.log(wrap(user).isInitialized()); // false, it's just a reference console.log(user.name); // undefined await wrap(user).init(); // this will trigger db call console.log(wrap(user).isInitialized()); // true console.log(user.name); // defined ``` The `isInitialized()` method can be used for runtime checks, but that could end up being quite tedious - we can do better! Instead of manual checks for entity state, we can use the [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) wrapper. ## `Reference` wrapper[​](#reference-wrapper "Direct link to reference-wrapper") When you define `@ManyToOne` and `@OneToOne` properties on your entity, the TypeScript compiler will think that the desired entities are always loaded: ``` @Entity() export class Article { @PrimaryKey() id!: number; @ManyToOne() author!: User; constructor(author: User) { this.author = author; } } const article = await em.findOne(Article, 1); console.log(article.author instanceof User); // true console.log(wrap(article.author).isInitialized()); // false console.log(article.author.name); // undefined as `User` is not loaded yet ``` You can overcome this issue by using the [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) wrapper. It simply wraps the entity, defining `load(): Promise` method that will first lazy load the association if not already available. You can also use `unwrap(): T` method to access the underlying entity without loading it. You can also use `load(prop: K): Promise`, which works like `load()` but returns the specified property. ./entities/Article.ts ``` import { Entity, Ref, ManyToOne, PrimaryKey, Reference } from '@mikro-orm/core'; @Entity() export class Article { @PrimaryKey() id!: number; // This guide is using `ts-morph` metadata provider, so this is enough. @ManyToOne() author: Ref; constructor(author: User) { this.author = ref(author); } } ``` ``` const article1 = await em.findOne(Article, 1); article.author instanceof Reference; // true article1.author; // Ref (instance of `Reference` class) article1.author.name; // type error, there is no `name` property article1.author.unwrap().name; // unsafe sync access, undefined as author is not loaded article1.author.isInitialized(); // false const article2 = await em.findOne(Article, 1, { populate: ['author'] }); article2.author; // LoadedReference (instance of `Reference` class) article2.author.$.name; // type-safe sync access ``` There are also `getEntity()` and `getProperty()` methods that are synchronous getters, that will first check if the wrapped entity is initialized, and if not, it will throw and error. ``` const article = await em.findOne(Article, 1); console.log(article.author instanceof Reference); // true console.log(wrap(article.author).isInitialized()); // false console.log(article.author.getEntity()); // Error: Reference 123 not initialized console.log(article.author.getProperty('name')); // Error: Reference 123 not initialized console.log(await article.author.load('name')); // ok, loading the author first console.log(article.author.getProperty('name')); // ok, author already loaded ``` If you use a different metadata provider than `TsMorphMetadataProvider` (e.g. `ReflectMetadataProvider`), you will also need to explicitly set the `ref` parameter: ``` @ManyToOne(() => User, { ref: true }) author!: Ref; ``` ### Using `Reference.load()`[​](#using-referenceload "Direct link to using-referenceload") After retrieving a reference, you can load the full entity by utilizing the asynchronous `Reference.load()` method. ``` const article1 = await em.findOne(Article, 1); (await article1.author.load()).name; // async safe access const article2 = await em.findOne(Article, 2); const author = await article2.author.load(); author.name; await article2.author.load(); // no additional query, already loaded ``` > As opposed to `wrap(e).init()` which always refreshes the entity, the `Reference.load()` method will query the database only if the entity is not already loaded in the Identity Map. ### `ScalarReference` wrapper[​](#scalarreference-wrapper "Direct link to scalarreference-wrapper") Similarly to the `Reference` wrapper, we can also wrap scalars with `Ref` into a `ScalarReference` object. This is handy for lazy scalar properties. The `Ref` type automatically resolves to `ScalarReference` for non-object types, so the below is correct: ``` @Property({ lazy: true, ref: true }) passwordHash!: Ref; ``` ``` const user = await em.findOne(User, 1); const passwordHash = await user.passwordHash.load(); ``` For object-like types, if you choose to use the reference wrappers, you should use the `ScalarRef` type explicitly. For example, you might want to lazily load a large JSON value: ``` @Property({ type: 'json', nullable: true, lazy: true, ref: true }) // ReportParameters is an object type, imagine it defined elsewhere. reportParameters!: ScalarRef; ``` Keep in mind that once a scalar value is managed through a `ScalarReference`, accessing it through MikroORM managed objects will always return the `ScalarReference` wrapper. That can be confusing in case the property is also `nullable`, since the `ScalarReference` will always be truthy. In such cases, you should inform the type system of the nullability of the property through `ScalarReference`'s type parameter as demonstrated above. Below is an example of how it all works: ``` // Say Report of id "1" has no reportParameters in the Database. const report = await em.findOne(Report, 1); if (report.reportParameters) { // Logs Ref, not the actual value. **Would always run***. console.log(report.reportParameters); //@ts-expect-error $/.get() is not available until the reference has been loaded. // const mistake = report.reportParameters.$ } const populatedReport = await em.populate(report, ['reportParameters']); // Logs `null` console.log(populatedReport.reportParameters.$); ``` ## `Loaded` type[​](#loaded-type "Direct link to loaded-type") If you check the return type of `em.find` and `em.findOne` methods, you might be a bit confused - instead of the entity, they return `Loaded` type: ``` // res1 is of type `Loaded[]` const res1 = await em.find(User, {}); // res2 is of type `Loaded[]` const res2 = await em.find(User, {}, { populate: ['identity', 'friends'] }); ``` The `User` entity is defined as follows: ``` import { Entity, PrimaryKey, ManyToOne, OneToOne, Collection, Ref, ref } from '@mikro-orm/core'; @Entity() export class User { @PrimaryKey() id!: number; @ManyToOne(() => Identity) identity: Ref; @ManyToMany(() => User) friends = new Collection(this); constructor(identity: Identity) { this.identity = ref(identity); } } ``` The `Loaded` type will represent what relations of the entity are populated, and will add a special `$` symbol to them, allowing for type-safe synchronous access to the loaded properties. This works great in combination with the [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) wrapper: > If you don't like symbols with magic names like `$`, you can as well use the `get()` method, which is an alias for it. ``` // res is of type `Loaded` const user = await em.findOneOrFail(User, 1, { populate: ['identity'] }); // instead of the async `await user.identity.load()` call that would ensure the relation is loaded // you can use the dynamically added `$` symbol for synchronous and type-safe access to it: console.log(user.identity.$.email); ``` > If you'd omit the `populate` hint, the type of `user` would be `Loaded` and the `user.identity.$` symbol wouldn't be available - such call would end up with a compilation error. ``` // if we try without the populate hint, the type is `Loaded` const user2 = await em.findOneOrFail(User, 2); // TS2339: Property '$' does not exist on type '{ id: number; } & Reference'. console.log(user.identity.$.email); ``` Same works for the `Collection` wrapper, that offers runtime methods `isInitialized`, `loadItems` and `init`, as well as the type-safe `$` symbol. ``` // res is of type `Loaded` const user = await em.findOneOrFail(User, 1, { populate: ['friends'] }); // instead of the async `await user.friends.loadItems()` call that would ensure the collection items are loaded // you can use the dynamically added `$` symbol for synchronous and type-safe access to it: for (const friend of user.friends.$) { console.log(friend.email); } ``` You can also use the `Loaded` type in your own methods, to require on type level that some relations will be populated: ``` function checkIdentity(user: Loaded) { if (!user.identity.$.email.includes('@')) { throw new Error(`That's a weird e-mail!`); } } ``` ``` // works const u1 = await em.findOneOrFail(User, 2, { populate: ['identity'] }); checkIdentity(u1); // fails const u2 = await em.findOneOrFail(User, 2); checkIdentity(u2); ``` > Keep in mind this is all just a type-level information, you can easily trick it via type assertions. ## Assigning to `Reference` properties[​](#assigning-to-reference-properties "Direct link to assigning-to-reference-properties") When you define the property as [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) wrapper, you will need to assign the [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) instance to it instead of the entity. You can convert any entity to a [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) wrapper via `ref(entity)`, or use the `wrapped` option of [`em.getReference()`](https://mikro-orm.io/api/core/class/EntityManager.md#getReference): > `ref(e)` is a shortcut for `wrap(e).toReference()`, which is the same as `Reference.create(e)`. ``` import { ref } from '@mikro-orm/core'; const article = await em.findOne(Article, 1); const repo = em.getRepository(User); article.author = repo.getReference(2, { wrapped: true }); // same as: article.author = ref(repo.getReference(2)); await em.flush(); ``` Since v5 we can also create entity references without access to [`EntityManager`](https://mikro-orm.io/api/core/class/EntityManager.md). This can be handy if you want to create a reference from inside the entity constructor: ``` import { Entity, ManyToOne, Rel, rel } from '@mikro-orm/core'; @Entity() export class Article { @ManyToOne(() => User, { ref: true }) author!: Ref; constructor(authorId: number) { this.author = rel(User, authorId); } } ``` Another way is to use `toReference()` method available as part of the [`WrappedEntity` interface](https://mikro-orm.io/docs/entity-helper.md#wrappedentity-and-wrap-helper): ``` const author = new User(...) article.author = wrap(author).toReference(); ``` If the reference already exist, you need to re-assign it with a new [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) instance - they hold identity just like entities, so you need to replace them: ``` article.author = ref(new User(...)); ``` ## What is `Ref` type?[​](#what-is-ref-type "Direct link to what-is-ref-type") `Ref` is an intersection type that adds primary key property to the [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) interface. It allows getting the primary key from [`Reference`](https://mikro-orm.io/api/core/class/Reference.md) instance directly. By default, we try to detect the PK by checking if a property with a known name exists. We check for those in order: `_id`, `uuid`, `id` - with a way to manually set the property name via the `PrimaryKeyProp` symbol (`[PrimaryKeyProp]?: 'foo';`). ``` const article = await em.findOne(Article, 1); console.log(article.author.id); // ok, returns the PK ``` ## Strict partial loading[​](#strict-partial-loading "Direct link to Strict partial loading") The `Loaded` type also respects the partial loading hints (`fields` option). When used, the returned type will only allow accessing selected properties. Primary keys are automatically selected and available on the type level. ``` // article is typed to `Selected` const article = await em.findOneOrFail(Article, 1, { fields: ['title', 'author.email'], populate: ['author'], }); const id = article.id; // ok, PK is selected automatically const title = article.title; // ok, title is selected const publisher = article.publisher; // fail, not selected const author = article.author.id; // ok, PK is selected automatically const email = article.author.email; // ok, selected const name = article.author.name; // fail, not selected ``` See [live demo](https://stackblitz.com/edit/mikro-orm-v6-strict-partial-loading?file=basic.test.ts): --- # Source: https://mikro-orm.io/blog/tags/typescript.md ## [MikroORM 6.6](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) · 6 min read [![Martin Adámek](https://avatars1.githubusercontent.com/u/615580?s=460\&v=4)](https://github.com/B4nan) [Martin Adámek](https://github.com/B4nan) Author of MikroORM [MikroORM v6.6](https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.0) is out. This release builds on top of the [previous version](https://mikro-orm.io/blog/mikro-orm-6-5-released), improving the configurability of the filters on relations and adding more features to the entity generator. **Tags:** * [typescript](https://mikro-orm.io/blog/tags/typescript.md) * [javascript](https://mikro-orm.io/blog/tags/javascript.md) * [node](https://mikro-orm.io/blog/tags/node.md) * [sql](https://mikro-orm.io/blog/tags/sql.md) [**Read More**](https://mikro-orm.io/blog/mikro-orm-6-6-released.md) --- # Source: https://mikro-orm.io/docs/unit-of-work.md # Unit of Work and Transactions MikroORM uses the Identity Map pattern to track objects. Whenever you fetch an object from the database, MikroORM will keep a reference to this object inside its `UnitOfWork`. This allows MikroORM room for optimizations. If you call the EntityManager and ask for an entity with a specific ID twice, it will return the same instance: ``` const jon1 = await em.findOne(Author, 1); const jon2 = await em.findOne(Author, 1); // identity map in action console.log(jon1 === jon2); // true ``` Only one SELECT query will be fired against the database here. In the second `findOne()` call MikroORM will check the identity map first and will skip the database round trip as it will find the entity already loaded. The identity map being indexed by primary keys only allows shortcuts when you ask for objects by primary key. When you query by other properties, you will still get the same reference, but two separate database calls will be made: ``` const jon1 = await em.findOne(Author, { name: 'Jon Snow' }); const jon2 = await em.findOne(Author, { name: 'Jon Snow' }); // identity map in action console.log(jon1 === jon2); // true ``` MikroORM only knows objects by id, so a query for different criteria has to go to the database, even if it was executed just before. But instead of creating a second `Author` object MikroORM first gets the primary key from the row and checks if it already has an object inside the `UnitOfWork` with that primary key. ## Persisting Managed Entities[​](#persisting-managed-entities "Direct link to Persisting Managed Entities") The identity map has a second use-case. When you call `em.flush()`, MikroORM will ask the identity map for all objects that are currently managed. This means you don't have to call `em.persist()` over and over again to pass known objects to the `EntityManager`. This is a NO-OP for known entities, but leads to much code written that is confusing to other developers. The following code WILL update your database with the changes made to the `Author` object, even if you did not call `em.persist()`: ``` const jon = await em.findOne(Author, 1); jon.email = 'foo@bar.com'; await em.flush(); ``` ## Entities with explicit primary key[​](#entities-with-explicit-primary-key "Direct link to Entities with explicit primary key") When you `em.persist()` a new entity which has the primary key value, it will be automatically added to the identity map. This means that a following call to `em.findOne()` based on its primary key will just return the same unmanaged entity instance instead of querying the database. > Such entity is added to the identity map, but still remains unmanaged - it does not have a reference to the `EntityManager` yet. ``` // primary key value provided, will be added to the identity map const jon = em.create(Author, { id: 1, name: 'Jon', email: 'foo@bar.com', }); // this will not query the database const jon2 = await em.findOne(Author, 1); console.log(jon === jon2); // true await em.flush(); // this inserts the entity ``` If you called `em.persist()` an entity without the primary key value, the `em.findOne()` call would detect it as well and flush automatically to get the value first. ``` // primary key value not provided const jon = em.create(Author, { name: 'Jon', email: 'foo@bar.com', }); // this will trigger auto flush and insert the entity, then query for it const jon2 = await em.findOne(Author, 1); console.log(jon === jon2); // true await em.flush(); // this is a no-op ``` ## How MikroORM Detects Changes[​](#how-mikroorm-detects-changes "Direct link to How MikroORM Detects Changes") MikroORM is a data-mapper that tries to achieve persistence-ignorance (PI). This means you map JS objects into a relational database that do not necessarily know about the database at all. A natural question would now be, "how does MikroORM even detect objects have changed?". For this MikroORM keeps a second map inside the `UnitOfWork`. Whenever you fetch an object from the database MikroORM will keep a copy of all the properties and associations inside the `UnitOfWork`. Now whenever you call `em.flush()` MikroORM will iterate over all entities you previously marked for persisting via `em.persist()`. For each object it will compare the original property and association values with the values that are currently set on the object. If changes are detected then the object is queued for a UPDATE operation. Only the fields that actually changed are updated. ## Implicit Transactions[​](#implicit-transactions "Direct link to Implicit Transactions") First and most important implication of having Unit of Work is that it allows handling transactions automatically. When you call `em.flush()`, all computed changes are queried inside a database transaction (if supported by given driver). This means that you can control the boundaries of transactions simply by calling `em.persist()` and once all your changes are ready, simply calling `flush()` will run them inside a transaction. > You can also control the transaction boundaries manually via `em.transactional(cb)`. ``` const user = await em.findOne(User, 1); user.email = 'foo@bar.com'; const car = new Car(); user.cars.add(car); // thanks to bi-directional cascading we only need to persist user entity // flushing will create a transaction, insert new car and update user with new email await em.persist(user).flush(); ``` You can find more information about transactions in [Transactions and concurrency](https://mikro-orm.io/docs/transactions.md) page. ## Flush Modes[​](#flush-modes "Direct link to Flush Modes") The flushing strategy is given by the `flushMode` of the current running `EntityManager`. * `FlushMode.COMMIT` - The `EntityManager` delays the flush until the current Transaction is committed. * `FlushMode.AUTO` - This is the default mode, and it flushes the `EntityManager` only if necessary. * `FlushMode.ALWAYS` - Flushes the `EntityManager` before every query. `FlushMode.AUTO` will try to detect changes on the entity we are querying, and flush if there is an overlap: ``` // querying for author will trigger auto-flush if we have new author persisted const a1 = new Author(...); em.persist(a1); const r1 = await em.find(Author, {}); // querying author won't trigger auto-flush if we have new book, but no changes on author const b4 = new Book(...); em.persist(b4); const r2 = await em.find(Author, {}); // but querying for book will trigger auto-flush const r3 = await em.find(Book, {}); ``` Changes on managed entities are also detected, although this works only based on simple dirty checks, no query analyses in place. ``` const book = await em.findOne(Book, 1); book.price = 1000; // triggers auto-flush because of the changed `price` const r1 = await em.find(Book, { price: { $gt: 500 } }); // triggers auto-flush too, the book entity is dirty const r2 = await em.find(Book, { name: /foo.*/ }); ``` We can set the flush mode on different places: * in the ORM config via `Options.flushMode` * for given `EntityManager` instance (and its forks) via `em.setFlushMode()` * for given `EntityManager` fork via `em.fork({ flushMode })` * for given QueryBuilder instance via `qb.setFlushMode()` * for given transaction scope via `em.transactional(..., { flushMode })` * for given `em.find` (or similar) call via `em.find(..., { flushMode })` ### Change tracking and performance considerations[​](#change-tracking-and-performance-considerations "Direct link to Change tracking and performance considerations") When we use the default `FlushMode.AUTO`, we need to detect changes done on managed entities. To do this, every property is dynamically redefined as a `get/set` pair. While this should be all transparent to end users, it can lead to performance issues if we need to read some properties very often (e.g. millions of times). > Scalar primary keys are never defined as `get/set` pairs. To mitigate this, we can disable change tracking on a property level. Changing such properties will no longer trigger the auto flush mechanism, but they will be respected during explicit `flush()` call. ``` @Property({ trackChanges: false }) code!: string; ``` > This part of documentation is highly inspired by [doctrine internals docs](https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/unitofwork.html) as the behaviour here is pretty much the same. --- # Source: https://mikro-orm.io/docs/upgrading-v2-to-v3.md # Upgrading from v2 to v3 Following sections describe (hopefully) all breaking changes, most of them might be not valid for you, like if you do not use custom `NamingStrategy` implementation, you do not care about the interface being changed. ## Default value of autoFlush has changed to false[​](#default-value-of-autoflush-has-changed-to-false "Direct link to Default value of autoFlush has changed to false") > If you had `autoFlush: false` in your ORM configuration before, you can now remove this line, no changes are needed in your app. Default value for `autoFlush` is now `false`. That means you need to call `em.flush()` yourself to persist changes into database. You can still change this via ORM's options to ease the transition, but generally it is not recommended as it can cause unwanted small transactions being created around each `persist`. ``` orm.em.persist(new Entity()); // no auto-flushing by default await orm.em.flush(); await orm.em.persist(new Entity(), true); // you can still use second parameter to auto-flush ``` ## Reworked entity definition[​](#reworked-entity-definition "Direct link to Reworked entity definition") > Implementing those interfaces is optional. Now it is no longer needed to merge entities with `IEntity` interface, that was polluting entity's interface with internal methods. New interfaces `IdentifiedEntity`, `UuidEntity` and `MongoEntity` are introduced, that can be implemented by entities. They are not adding any new properties or methods, keeping the entity's interface clean. This is also the reason why they can be omitted. `IEntity` interface has been renamed to `AnyEntity` and it no longer has public methods like `toJSON()`, `toObject()` or `init()`. One can use `wrap()` method provided by ORM that will enhance property type when needed with those methods (`await wrap(book.author).init()`). To keep all methods available on the entity, you can still use interface merging with `WrappedEntity` that both extends `AnyEntity` and defines all those methods. You can mark the entity by implementing one of `*Entity` interfaces: * `IdEntity` for numeric/string PK on `id` property (`id: number`) * `UuidEntity` for string PK on `uuid` property (`uuid: string`) * `MongoEntity` for mongo, where `id: string` and `_id: ObjectId` are required * `AnyEntity` for other possible properties (fill the PK property name to `PK` parameter, e.g.: `AnyEntity'`) To keep all public methods that were part of `IEntity` interface in v2, you can use `WrappedEntity` via interface merging: ``` @Entity() export class Book { ... } export interface Book extends WrappedEntity { } ``` For more examples, take a look at [defining entities section](https://mikro-orm.io/docs/defining-entities.md). ## Integrated Knex.js as query builder and runner[​](#integrated-knexjs-as-query-builder-and-runner "Direct link to Integrated Knex.js as query builder and runner") `QueryBuilder` now internally uses knex to run all queries. As knex already supports connection pooling, this feature comes without any effort. New configuration for pooling is now available Transactions now require using `em.transactional()` method, previous helpers `beginTransaction`/`commit`/`rollback` are now removed. All transaction management has been removed from `IDatabaseDriver` interface, now EM handles this, passing the transaction context (carried by EM, and created by `Connection`) to all driver methods. New methods on EM exists: `isInTransaction()` and `getTransactionContext()`. In postgres driver, it used to be required to pass parameters as indexed dollar sign ($1, $2, ...), while now knex requires the placeholder to be simple question mark (`?`), like in other dialects, so this is now unified with other drivers. ## ManyToMany now uses composite primary key[​](#manytomany-now-uses-composite-primary-key "Direct link to ManyToMany now uses composite primary key") Previously it was required to have autoincrement primary key for m:n pivot tables. Now this has changed. By default, only foreign columns are required and composite key over both of them is used as primary key. To preserve stable order of collections, you can force previous behaviour by defining the m:n property as `fixedOrder: true`, which will start ordering by `id` column. You can also override the order column name via `fixedOrderColumn: 'order'`. You can also specify default ordering via `orderBy: { ... }` attribute. ## Entity references now don't have instantiated collections[​](#entity-references-now-dont-have-instantiated-collections "Direct link to Entity references now don't have instantiated collections") Previously all entity instances, including entity references (not fully loaded entities where we know only the primary key), had instantiated collection classes. Now only initialized entities have them. ``` const book = em.getReference(Book, 1); console.log(book.tags); // undefined await book.init(); console.log(book.tags); // instance of Collection (not initialized) ``` ## EntityAssigner.assign() requires EM for new entities[​](#entityassignerassign-requires-em-for-new-entities "Direct link to EntityAssigner.assign() requires EM for new entities") Previously all entities had internal reference to the root EM - the one created when initializing the ORM. Now only managed entities (those merged to the EM, e.g. loaded from the database) have this internal reference. To use `assign()` method on new (not managed) entities, you need to provide the `em` parameter: ``` const book = new Book(); wrap(book).assign(data, { em: orm.em }); ``` ## Strict FilterQuery and smart query conditions[​](#strict-filterquery-and-smart-query-conditions "Direct link to Strict FilterQuery and smart query conditions") `FilterQuery` now does not allow using smart query operators. You can either cast your condition as any or use object syntax instead (instead of `{ 'age:gte': 18 }` use `{ age: { $gte: 18 } }`). ## Logging configuration[​](#logging-configuration "Direct link to Logging configuration") Previously to start logging it was required to provide your custom logger. Logger now defaults to `console.log()`, and users can specify what namespaces are they interested in via `debug` option. `true`/`false` will enable/disable all namespaces. Available logger namespaces: `'query' | 'query-params' | 'discovery' | 'info'`. ## Removed deprecated fk option from 1:m and m:1 decorators[​](#removed-deprecated-fk-option-from-1-and-m1-decorators "Direct link to removed-deprecated-fk-option-from-1-and-m1-decorators") Use `mappedBy`/`inversedBy` instead. ## SchemaGenerator.generate() is now async[​](#schemageneratorgenerate-is-now-async "Direct link to SchemaGenerator.generate() is now async") If you used `SchemaGenerator`, now there is CLI tool you can use instead. Learn more in [SchemaGenerator docs](https://mikro-orm.io/docs/schema-generator.md). To set up CLI, take a look at [installation section](https://mikro-orm.io/docs/quick-start.md). ## New method on NamingStrategy interface[​](#new-method-on-namingstrategy-interface "Direct link to New method on NamingStrategy interface") `getClassName()` is used to find entity class name based on its file name. Now users can override the default implementation to accommodate their specific needs. If you used custom naming strategy, you will either need to implement this method yourself, or extend `AbstractNamingStrategy`. ## TypescriptMetadataProvider has been renamed[​](#typescriptmetadataprovider-has-been-renamed "Direct link to TypescriptMetadataProvider has been renamed") The name is now `TsMorphMetadataProvider`, there is also newly added `ReflectMetadataProvider` that uses `reflect-metadata` instead. As `TypescriptMetadataProvider` was the default, no changes should be required. ## Updated mongodb driver[​](#updated-mongodb-driver "Direct link to Updated mongodb driver") MongoDB driver version 3.3.4 or higher is now required. ## EntityManager.find() now requires where parameter[​](#entitymanagerfind-now-requires-where-parameter "Direct link to EntityManager.find() now requires where parameter") `EntityManager` has now same `find` method interface aligned with `EntityRepository`, `where` parameter is now required. To select all entities, use `em.find(Entity, {})` as value. --- # Source: https://mikro-orm.io/docs/upgrading-v3-to-v4.md # Upgrading from v3 to v4 > Following sections describe (hopefully) all breaking changes, most of them might be not valid for you, like if you do not use custom `NamingStrategy` implementation, you do not care about the interface being changed. ## Node 10.13.0+ required[​](#node-10130-required "Direct link to Node 10.13.0+ required") Support for older node versions was dropped. ## TypeScript 3.7+ required[​](#typescript-37-required "Direct link to TypeScript 3.7+ required") Support for older TypeScript versions was dropped. ## Monorepo[​](#monorepo "Direct link to Monorepo") The ORM has been split into several packages. In v4 one needs to require `@mikro-orm/core` and a driver package, e.g. `@mikro-orm/mysql`. This driver package already contains the `mysql2` dependency, so you can remove that from your `package.json`. * `@mikro-orm/core` * `@mikro-orm/reflection` - `TsMorphMetadataProvider` * `@mikro-orm/cli` - CLI support, requires entity-generator, migrator and knex * `@mikro-orm/knex` - SQL support * `@mikro-orm/entity-generator` * `@mikro-orm/migrations` * `@mikro-orm/mysql` * `@mikro-orm/mariadb` * `@mikro-orm/mysql-base` - Common implementation for mysql and mariadb (internal) * `@mikro-orm/sqlite` * `@mikro-orm/postgresql` * `@mikro-orm/mongodb` > For easier transition, meta package mikro-orm is still present, reexporting core, reflection, migrations, entity-generator and cli packages. You should **not** install both `mikro-orm` and `@mikro-orm/core` packages together. > You should prefer the `@mikro-orm/core` over `mikro-orm` package, there were weird dependency issues reported with the `mikro-orm` meta-package. ## Default metadata provider is now `ReflectMetadataProvider`[​](#default-metadata-provider-is-now-reflectmetadataprovider "Direct link to default-metadata-provider-is-now-reflectmetadataprovider") If you want to use ts-morph, you need to install `@mikro-orm/reflection` package and enable the provider explicitly in the ORM config, as described [here](https://mikro-orm.io/docs/metadata-providers.md#tsmorphmetadataprovider). ``` import { TsMorphMetadataProvider } from '@mikro-orm/reflection'; await MikroORM.init({ metadataProvider: TsMorphMetadataProvider, // ... }); ``` Using `ReflectMetadataProvider` has some limitations, so be sure to read about them [here](https://mikro-orm.io/docs/metadata-providers.md#limitations-and-requirements). One common gotcha with `reflect-metadata` is that you need to explicitly state the property type when using property initializer: ``` @Property() createdAt: Date = new Date(); ``` Without the explicit type, we would infer `Object` instead of `Date`, which would be most probably mapped to JSON column type (depends on driver). ## SqlEntityManager and MongoEntityManager[​](#sqlentitymanager-and-mongoentitymanager "Direct link to SqlEntityManager and MongoEntityManager") In v4 the `core` package, where `EntityManager` and `EntityRepository` are defined, is not dependent on knex, and therefore it cannot have a method returning a `QueryBuilder`. You need to import the SQL flavour of the EM from the driver package to access the `createQueryBuilder()` method. > The SQL flavour of EM is actually called `SqlEntityManager`, it is exported both under this name and under `EntityManager` alias, so you can just change the location from where you import. ``` import { EntityManager } from '@mikro-orm/mysql'; // or any other SQL driver package const em: EntityManager; const qb = await em.createQueryBuilder(...); ``` Same applies for the `aggregate()` method in mongo driver: ``` import { EntityManager } from '@mikro-orm/mongodb'; const em: EntityManager; const ret = await em.aggregate(...); ``` > The mongo flavour of EM is actually called `MongoEntityManager`, it is exported both under this name and under `EntityManager` alias, so you can just change the location from where you import. ## Different default `pivotTable`[​](#different-default-pivottable "Direct link to different-default-pivottable") Implementation of `UnderscoreNamingStrategy` and `EntityCaseNamingStrategy` `joinTableName()` method has changed. You can use `pivotTable` on the owning side of M:N relation to specify the table name manually. Previously the table name did not respect property name, if one defined multiple M:N relations between same entities, there were conflicts and one would have to specify `pivotTable` name manually at least on one of them. With the new way, we can be sure that the table name won't conflict with other pivot tables. Previously the name was constructed from 2 entity names as `entity_a_to_entity_b`, ignoring the actual property name. In v4 the name will be `entity_a_coll_name` in case of the collection property on the owning side being named `collName`. ## Changes in folder-based discovery (`entitiesDirs` removed)[​](#changes-in-folder-based-discovery-entitiesdirs-removed "Direct link to changes-in-folder-based-discovery-entitiesdirs-removed") `entitiesDirs` and `entitiesDirsTs` were removed in favour of `entities` and `entitiesTs`, `entities` will be used as a default for `entitiesTs` (that is used when we detect `ts-node`). `entities` can now contain mixture of paths to directories, globs pointing to entities, or references to the entities or instances of `EntitySchema`. This basically means that all you need to change is renaming `entitiesDirs` to `entities`. ``` MikroORM.init({ entities: ['dist/**/entities', 'dist/**/*.entity.js', FooBar, FooBaz], entitiesTs: ['src/**/entities', 'src/**/*.entity.ts', FooBar, FooBaz], }); ``` ## Changes in `wrap()` helper, `WrappedEntity` interface and `Reference` wrapper[​](#changes-in-wrap-helper-wrappedentity-interface-and-reference-wrapper "Direct link to changes-in-wrap-helper-wrappedentity-interface-and-reference-wrapper") Previously all the methods and properties of `WrappedEntity` interface were added to the entity prototype during discovery. In v4 there is only one property added: `__helper: WrappedEntity`. `WrappedEntity` has been converted to actual class. `wrap(entity)` no longer returns the entity, now the `WrappedEntity` instance is being returned. It contains only public methods (`init`, `assign`, `isInitialized`, ...), if you want to access internal properties like `__meta` or `__em`, you need to explicitly ask for the helper via `wrap(entity, true)`. Internal methods (with `__` prefix) were also removed from the `Reference` class, use `wrap(ref, true)` to access them. Instead of interface merging with `WrappedEntity`, one can now use classic inheritance, by extending `BaseEntity` exported from `@mikro-orm/core`. If you do so, `wrap(entity)` will return your entity. ## Removed `flush` parameter from `persist()` and `remove()` methods[​](#removed-flush-parameter-from-persist-and-remove-methods "Direct link to removed-flush-parameter-from-persist-and-remove-methods") `flush` param is removed, both `persist` and `remove` methods are synchronous and require explicit flushing, possibly via fluent interface call. ``` // before await em.persist(jon, true); await em.remove(Author, jon, true); // after await em.persist(jon).flush(); await em.remove(jon).flush(); ``` ## `remove()` method requires entity instances[​](#remove-method-requires-entity-instances "Direct link to remove-method-requires-entity-instances") The `em.remove()` method originally allowed to pass either entity instance, or a condition. When one passed a condition, it was firing a native delete query, without handling transactions or hooks. In v4, the method is now simplified and works only with entity instances. Use `em.nativeDelete()` explicitly if you want to fire a delete query instead of letting the `UnitOfWork` doing its job. ``` // before await em.remove(Author, 1); // fires query directly // after await em.nativeDelete(Author, 1); ``` > `em.removeEntity()` has been removed in favour of `em.remove()` (that now has almost the same signature). ## Type safe references[​](#type-safe-references "Direct link to Type safe references") EM now returns `Loaded` instead of the entity (`T`). This type automatically adds synchronous method `get()` that returns the entity (for references) or array of entities (for collections). `Reference.get()` is now available only with correct `Loaded` type hint and is used as a sync getter for the entity, just like `unwrap()`. You can use `Reference.load(prop)` for the original `get()` method functionality. `em.find()` and similar methods now have two type arguments, due to TypeScript not supporting partial type inference, when you specify the `T` explicitly (without also explicitly specifying the load hint), the inference will not work. This use case was mainly for usage without classes (interfaces + `EntitySchema`) - in that case it is now supported to pass actual instance of `EntitySchema` as the first parameter to these methods, that will allow correct type inference: ``` const author = await em.findOne(AuthorSchema, { ... }, ['books']); console.log(author.books.get()); // `get()` is now inferred correctly ``` ## Custom types are now type safe[​](#custom-types-are-now-type-safe "Direct link to Custom types are now type safe") Generic `Type` class has now two type arguments - the input and output types. Input type defaults to `string`, output type defaults to the input type. You might need to explicitly provide the types if your methods are strictly typed. ## Custom type serialization[​](#custom-type-serialization "Direct link to Custom type serialization") Custom types used to be serialized to the database value. In v4, the runtime value is used by default. Implement custom `toJSON()` method if you need to customize this. ## Property `default` and `defaultRaw`[​](#property-default-and-defaultraw "Direct link to property-default-and-defaultraw") Previously the `default` option of properties was used as is, so we had to wrap strings in quotes (e.g. `@Property({ default: "'foo bar'" })`). In v4 the `default` is typed as `string | number | boolean | null` and when used with string value, it will be automatically quoted. To use SQL functions we now need to use `defaultRaw`: `@Property({ defaultRaw: 'now()' })`. ## `autoFlush` option has been removed[​](#autoflush-option-has-been-removed "Direct link to autoflush-option-has-been-removed") Also `persistLater()` and `removeLater()` methods are deprecated. Use `persist()` or `remove` respectively. ## `IdEntity`, `UuidEntity` and `MongoEntity` interfaces are removed[​](#identity-uuidentity-and-mongoentity-interfaces-are-removed "Direct link to identity-uuidentity-and-mongoentity-interfaces-are-removed") They were actually never needed. ## MongoDB driver is no longer the default[​](#mongodb-driver-is-no-longer-the-default "Direct link to MongoDB driver is no longer the default") You need to specify the platform type either via `type` option or provide the driver implementation via `driver` option. Available platforms types: `[ 'mongo', 'mysql', 'mariadb', 'postgresql', 'sqlite' ]` ## Removed configuration `discovery.tsConfigPath`[​](#removed-configuration-discoverytsconfigpath "Direct link to removed-configuration-discoverytsconfigpath") Removed as it is no longer needed, it was used only for `TsMorphMetadataProvider`, when the `entitiesDirsTs` were not explicitly provided. In v4, this is no longer needed, as ts-morph discovery will use `d.ts` files instead, that should be located next to the compiled entities. ## Changes in query highlighting[​](#changes-in-query-highlighting "Direct link to Changes in query highlighting") Previously Highlight.js was used to highlight various things in the CLI, like SQL and mongo queries, or migrations or entities generated via CLI. While the library worked fine, it was causing performance issues mainly for those bundling via webpack and using lambdas, as the library was huge. In v4 highlighting is disabled by default, and there are 2 highlighters you can optionally use (you need to install them first). ``` import { SqlHighlighter } from '@mikro-orm/sql-highlighter'; MikroORM.init({ highlighter: new SqlHighlighter(), // ... }); ``` For MongoDB, you can use `@mikro-orm/mongo-highlighter`. --- # Source: https://mikro-orm.io/docs/upgrading-v4-to-v5.md # Upgrading from v4 to v5 > Following sections describe (hopefully) all breaking changes, most of them might be not valid for you, like if you do not use custom `NamingStrategy` implementation, you do not care about the interface being changed. ## Node 14+ required[​](#node-14-required "Direct link to Node 14+ required") Support for older node versions was dropped. ## TypeScript 4.1+ required[​](#typescript-41-required "Direct link to TypeScript 4.1+ required") Support for older TypeScript versions was dropped. ## Options parameters[​](#options-parameters "Direct link to Options parameters") Previously many methods had many (often boolean) parameters, in v5 such methods are refactored to use options object instead to improve readability. Some methods offered both signatures - the multi parameter signatures are now removed. List of such methods: * `em.find()` * `em.findOne()` * `em.findOneOrFail()` * `em.findAndCount()` * `em.getReference()` * `em.merge()` * `em.fork()` * `em.begin()` * `em.assign()` * `em.create()` * `repo.find()` * `repo.findOne()` * `repo.findOneOrFail()` * `repo.findAndCount()` * `repo.findAll()` * `repo.getReference()` * `repo.merge()` * `collection.init()` * `repo.create()` * `repo.assign()` This also applies to the methods on `IDatabaseDriver` interface. ## Type-safe populate parameter with dot notation[​](#type-safe-populate-parameter-with-dot-notation "Direct link to Type-safe populate parameter with dot notation") `FindOptions.populate` parameter is now strictly typed and supports only array of strings or a boolean. Object way is no longer supported. To set loading strategy, use `FindOptions.strategy`. The return type of all such methods now returns properly typed `Loaded` response. ## Type-safe fields parameter[​](#type-safe-fields-parameter "Direct link to Type-safe fields parameter") `FindOptions.fields` parameter is now strictly typed also for the dot notation. ## Type-safe orderBy parameter[​](#type-safe-orderby-parameter "Direct link to Type-safe orderBy parameter") `FindOptions.orderBy` parameter is now strictly typed. It also allows passing an array of objects instead of just a single object. ``` const books = await em.find(Book, {}, { orderBy: [ { title: 1 }, { author: { name: -1 } }, ], }); ``` ## Removed `@Repository()` decorator[​](#removed-repository-decorator "Direct link to removed-repository-decorator") The decorator was problematic as it could only work properly it the file was required soon enough - before the ORM initialization, otherwise the repository would not be registered at all. Use `@Entity({ customRepository: () => CustomRepository })` in the entity definition instead. ## Disallowed global identity map[​](#disallowed-global-identity-map "Direct link to Disallowed global identity map") In v5, it is no longer possible to use the global identity map. This was a common issue that led to weird bugs, as using the global EM without request context is wrong, we always need to have a dedicated context for each request, so they do not interfere. Now we get a validation error if we try to use the global context. We still can disable this check via `allowGlobalContext` configuration, or a connected environment variable `MIKRO_ORM_ALLOW_GLOBAL_CONTEXT` - this can be handy especially in unit tests. ## `LoadedCollection.get()` and `$` now return the `Collection` instance[​](#loadedcollectionget-and--now-return-the-collection-instance "Direct link to loadedcollectionget-and--now-return-the-collection-instance") Previously those dynamically added getters returned the array copy of collection items. In v5, we return the collection instance, which is also iterable and has a `length` getter and indexed access support, so it mimics the array. To get the array copy as before, call `getItems()` as with a regular collection. ## Different table aliasing for select-in loading strategy and for QueryBuilder[​](#different-table-aliasing-for-select-in-loading-strategy-and-for-querybuilder "Direct link to Different table aliasing for select-in loading strategy and for QueryBuilder") Previously with select-in strategy as well as with QueryBuilder, table aliases were always the letter `e` followed by unique index. In v5, we use the same method as with joined strategy - the letter is inferred from the entity name. This can be breaking if you used the aliases somewhere, e.g. in custom SQL fragments. We can restore to the old behaviour by implementing custom naming strategy, overriding the `aliasName` method: ``` import { AbstractNamingStrategy } from '@mikro-orm/core'; class CustomNamingStrategy extends AbstractNamingStrategy { aliasName(entityName: string, index: number) { return 'e' + index; } } ``` Note that in v5 it is possible to use `expr()` helper to access the alias name dynamically, e.g. ``expr(alias => `lower('${alias}.name')`)``, which should be now preferred way instead of hardcoding the aliases. ## Migrations are now stored without extensions[​](#migrations-are-now-stored-without-extensions "Direct link to Migrations are now stored without extensions") Running migrations in production via node and ts-node is now handled the same. This should actually not be breaking, as old format with extension is still supported (e.g. they still can be rolled back), but newly logged migrations will not contain the extension. ## Changes in `assign()` helper[​](#changes-in-assign-helper "Direct link to changes-in-assign-helper") Embeddable instances are now created via `EntityFactory` and they respect the `forceEntityConstructor` configuration. Due to this we need to have EM instance when assigning to embedded properties. Using `em.assign()` should be preferred to get around this. Deep assigning of child entities now works by default based on the presence of PKs in the payload. This behaviour can be disabled via updateByPrimaryKey: false in the assign options. `mergeObjects` option is now enabled by default. ## `em.populate()` always return array of entities[​](#empopulate-always-return-array-of-entities "Direct link to empopulate-always-return-array-of-entities") Previously it was possible to call `em.populate()` with a single entity input, and the output would be again just a single entity. Due to issues with TS 4.5, this method now always return array of entities. You can use destructing if you want to have a single entity return type: ``` const [loadedAuthor] = await em.populate(author, ...); ``` ## QueryBuilder is awaitable[​](#querybuilder-is-awaitable "Direct link to QueryBuilder is awaitable") Previously awaiting of QB instance was a no-op. In v5, QB is promise-like interface, so we can await it. More about this in [Awaiting the QueryBuilder](https://mikro-orm.io/docs/query-builder.md#awaiting-the-querybuilder) section. ## `UnitOfWork.getScheduledCollectionDeletions()` has been removed[​](#unitofworkgetscheduledcollectiondeletions-has-been-removed "Direct link to unitofworkgetscheduledcollectiondeletions-has-been-removed") Previously scheduled collection deletions were used for a hack when removing 1:m collection via orphan removal might require early deletes - in case we were adding the same entity (but different instance), so with same PK - inserting it in the same unit would cause unique constraint failures. Also `IDatabaseDriver.clearCollection()` method is no longer present in the driver API. ## `populateAfterFlush` is enabled by default[​](#populateafterflush-is-enabled-by-default "Direct link to populateafterflush-is-enabled-by-default") After flushing a new entity, all relations are marked as populated, just like if the entity was loaded from the db. This aligns the serialized output of `e.toJSON()` of a loaded entity and just-inserted one. In v4 this behaviour was disabled by default, so even after the new entity was flushed, the serialized form contained only FKs for its relations. We can opt in to this old behaviour via `populateAfterFlush: false`. ## `migrations.pattern` is removed in favour of `migrations.glob`[​](#migrationspattern-is-removed-in-favour-of-migrationsglob "Direct link to migrationspattern-is-removed-in-favour-of-migrationsglob") Migrations are using `umzug` under the hood, which is now upgraded to v3.0. With this version, the `pattern` configuration options is no longer available, and has been replaced with `glob`. This change is also reflected in MikroORM. The default value for `glob` is `!(*.d).{js,ts}`, so both JS and TS files are matched (but not .d.ts files). You should usually not need to change this option as this default suits both development and production environments. ## Population no longer infers the where condition by default[​](#population-no-longer-infers-the-where-condition-by-default "Direct link to Population no longer infers the where condition by default") > This applies only to SELECT\_IN strategy, as JOINED strategy implies the inference. Previously when we used populate hints in `em.find()` and similar methods, the query for our entity would be analysed and parts of it extracted and used for the population. Following example would find all authors that have books with given IDs, and populate their books collection, again using this PK condition, resulting in only such books being in those collections. ``` // this would end up with `Author.books` collections having only books of PK 1, 2, 3 const a = await em.find(Author, { books: [1, 2, 3] }, { populate: ['books'] }); ``` Following this example, if we wanted to load all books, we would need a separate `em.populate()` call: ``` const a = await em.find(Author, { books: [1, 2, 3] }); await em.populate(a, ['books']); ``` This behaviour changed and is now configurable both globally and locally, via `populateWhere` option. Globally we can specify one of `PopulateHint.ALL` and `PopulateHint.INFER`, the former being the default in v5, the latter being the default behaviour in v4. Locally (via `FindOptions`) we can also specify custom where condition that will be passed to `em.populate()` call. ``` // revert back to the old behaviour locally const a = await em.find(Author, { books: [1, 2, 3] }, { populate: ['books'], populateWhere: PopulateHint.INFER, }); ``` ## `em.create()` respects required properties[​](#emcreate-respects-required-properties "Direct link to emcreate-respects-required-properties") `em.create()` will now require you to pass all non-optional properties. Some properties might be defined as required for TS, but we have a default value for them (either runtime, or database one) - for such we can use `OptionalProps` symbol to specify which properties should be considered as optional. ## Required properties are validated before insert[​](#required-properties-are-validated-before-insert "Direct link to Required properties are validated before insert") Previously the validation took place in the database, so it worked only for SQL drivers. Now we have runtime validation based on the entity metadata. This means mongo users now need to use `nullable: true` on their optional properties, or disable the validation globally via `validateRequired: false` in the ORM config. ## `PrimaryKeyType` symbol should be defined as optional[​](#primarykeytype-symbol-should-be-defined-as-optional "Direct link to primarykeytype-symbol-should-be-defined-as-optional") Previously when we had nonstandard PK types, we could use `PrimaryKeyType` symbol to let the type system know it. It was required to define this property as required, now it can be defined as optional too. --- # Source: https://mikro-orm.io/docs/upgrading-v5-to-v6.md # Upgrading from v5 to v6 > Following sections describe (hopefully) all breaking changes, most of them might be not valid for you, like if you do not use custom `NamingStrategy` implementation, you do not care about the interface being changed. ## Node 18.12+ required[​](#node-1812-required "Direct link to Node 18.12+ required") Support for older node versions was dropped. ## ⚠️ TypeScript 5.0+ required[​](#️-typescript-50-required "Direct link to ⚠️ TypeScript 5.0+ required") Support for older TypeScript versions was dropped. ## Strict partial loading[​](#strict-partial-loading "Direct link to Strict partial loading") The `Loaded` type is now improved to support the partial loading hints (`fields` option). When used, the returned type will only allow accessing selected properties. Primary keys are automatically selected. ``` // book is typed to `Selected` const book = await em.findOneOrFail(Book, 1, { fields: ['title', 'author.email'], populate: ['author'], }); const id = book.id; // ok, PK is selected automatically const title = book.title; // ok, title is selected const publisher = book.publisher; // fail, not selected const author = book.author.id; // ok, PK is selected automatically const email = book.author.email; // ok, selected const name = book.author.name; // fail, not selected ``` ## Joined strategy changes[​](#joined-strategy-changes "Direct link to Joined strategy changes") The joined strategy now supports `populateWhere: 'all'`, which is the default behavior, and means "populate the full relations regardless of the where condition". This was previously not working with the joined strategy, as it was reusing the same join clauses as the where clause. In v6, the joined strategy will use a separate join branch for the populated relations. **This aligns the behavior between the strategies.** The `order by` clause is shared for both the join branches and a new `populateOrderBy` option is added to allow control of the order of populated relations separately. **The default loading strategy for SQL drivers has been changed to the joined strategy.** > To keep the old behaviour, you can override the default loading strategy in your ORM config. ## Removed methods from `EntityRepository`[​](#removed-methods-from-entityrepository "Direct link to removed-methods-from-entityrepository") Following methods are no longer available on the `EntityRepository` instance. * `persist` * `persistAndFlush` * `remove` * `removeAndFlush` * `flush` They were confusing as they gave a false sense of working with a scoped context (e.g. only with a `User` type), while in fact, they were only shortcuts for the same methods of underlying `EntityManager`. You should work with the `EntityManager` directly instead of using a repository when it comes to entity persistence, repositories should be treated as an extension point for custom logic (e.g. wrapping query builder usage). ``` -userRepository.persist(user); -await userRepository.flush(); +em.persist(user); +await em.flush(); ``` > Alternatively, you can use the `repository.getEntityManager()` method to access those methods directly on the `EntityManager`. If you want to keep those methods on repository level, you can define custom base repository and use it globally: ``` import { EntityManager, EntityRepository, AnyEntity } from '@mikro-orm/mysql'; export class ExtendedEntityRepository extends EntityRepository { persist(entity: AnyEntity | AnyEntity[]): EntityManager { return this.em.persist(entity); } async persistAndFlush(entity: AnyEntity | AnyEntity[]): Promise { await this.em.persistAndFlush(entity); } remove(entity: AnyEntity): EntityManager { return this.em.remove(entity); } async removeAndFlush(entity: AnyEntity): Promise { await this.em.removeAndFlush(entity); } async flush(): Promise { return this.em.flush(); } } ``` And specify it in the ORM config: ``` MikroORM.init({ entityRepository: ExtendedEntityRepository, }) ``` You might as well want to use the `EntityRepositoryType` symbol, possibly in a custom base entity. ## Removed `@Subscriber()` decorator[​](#removed-subscriber-decorator "Direct link to removed-subscriber-decorator") > Decorators generally work only if you import the file in your code, and as subscribers are often not imported anywhere in your app, the decorator often didn't work. In that case, people often left it there, but also added the subscriber to the ORM config, causing a duplication, as suddenly the decorator is executed and starts to work. Use `subscribers` array in the ORM config, it now also accepts class reference, not just instances. ``` MikroORM.init({ subscribers: [MySubscriber], // or `new MySubscriber()` }) ``` ## Removal of static require calls[​](#removal-of-static-require-calls "Direct link to Removal of static require calls") There were some places where we did a static `require()` call, e.g. when loading the driver implementation based on the `type` option. Those places were problematic for bundlers like webpack, as well as new school build systems like vite. ### The `type` option is removed in favour of driver exports[​](#the-type-option-is-removed-in-favour-of-driver-exports "Direct link to the-type-option-is-removed-in-favour-of-driver-exports") Instead of specifying the `type` we now have several options: 1. use `defineConfig()` helper imported from the driver package to create your ORM config: mikro-orm.config.ts ``` import { defineConfig } from '@mikro-orm/mysql'; export default defineConfig({ ... }); ``` 2. use `MikroORM.init()` on class imported from the driver package: app.ts ``` import { MikroORM } from '@mikro-orm/mysql'; const orm = await MikroORM.init({ ... }); ``` 3. specify the `driver` option: mikro-orm.config.ts ``` import { MySqlDriver } from '@mikro-orm/mysql'; export default { driver: MySqlDriver, ... }; ``` > The `MIKRO_ORM_TYPE` is still supported, but no longer does a static require of the driver class. Its usage is rather discouraged, and it might be removed in future versions too. ### ORM extensions[​](#orm-extensions "Direct link to ORM extensions") Similarly, we had to get rid of the `require()` calls for extensions like `Migrator`, `EntityGenerator` and `Seeder`. Those need to be registered as extensions in your ORM config. `SchemaGenerator` extension is registered automatically. > This is required only for the shortcuts available on `MikroORM` object, e.g. `orm.migrator.up()`, alternatively you can instantiate the `Migrator` yourself explicitly. mikro-orm.config.ts ``` import { defineConfig } from '@mikro-orm/mysql'; import { Migrator } from '@mikro-orm/migrations'; import { EntityGenerator } from '@mikro-orm/entity-generator'; import { SeedManager } from '@mikro-orm/seeder'; export default defineConfig({ dbName: 'test', extensions: [Migrator, EntityGenerator, SeedManager], // those would have a static `register` method }); ``` ## `MikroORM.init()` no longer accepts a `Configuration` instance[​](#mikroorminit-no-longer-accepts-a-configuration-instance "Direct link to mikroorminit-no-longer-accepts-a-configuration-instance") The options always needs to be plain JS object now. This was always only an internal way, partially useful in tests, never meant to be a user API (while many people since the infamous Ben Awad video mistakenly complicated their typings with it). ## `MikroORM.init()` no longer accepts second `connect` parameter[​](#mikroorminit-no-longer-accepts-second-connect-parameter "Direct link to mikroorminit-no-longer-accepts-second-connect-parameter") Use the `connect` option instead. ## All drivers now re-export the `@mikro-orm/core` package[​](#all-drivers-now-re-export-the-mikro-ormcore-package "Direct link to all-drivers-now-re-export-the-mikro-ormcore-package") This means we no longer have to think about what package to use for imports, the driver package should be always preferred. ``` -import { Entity, PrimaryKey } from '@mikro-orm/core'; -import { MikroORM, EntityManager } from '@mikro-orm/mysql'; +import { Entity, PrimaryKey, MikroORM, EntityManager } from '@mikro-orm/mysql'; ``` ## Removed `MongoDriver` methods[​](#removed-mongodriver-methods "Direct link to removed-mongodriver-methods") * `createCollections` in favour of `orm.schema.createSchema()` * `dropCollections` in favour of `orm.schema.dropSchema()` * `refreshCollections` in favour of `orm.schema.refreshDatabase()` * `ensureIndexes` in favour of `orm.schema.ensureIndexes()` ## Removed `JavaScriptMetadataProvider`[​](#removed-javascriptmetadataprovider "Direct link to removed-javascriptmetadataprovider") Use `EntitySchema` instead, for easy migration there is `EntitySchema.fromMetadata()` factory, but the interface is very similar on its own. ## Removed `PropertyOptions.customType` in favour of just `type`[​](#removed-propertyoptionscustomtype-in-favour-of-just-type "Direct link to removed-propertyoptionscustomtype-in-favour-of-just-type") ``` -@Property({ customType: new ArrayType() }) +@Property({ type: new ArrayType() }) foo: string[]; ``` ## Removal of deprecated methods[​](#removal-of-deprecated-methods "Direct link to Removal of deprecated methods") * `em.nativeInsert()` -> `em.insert()` * `em.persistLater()` -> `em.persist()` * `em.removeLater()` -> `em.remove()` * `IdentifiedReference` -> `Ref` * `uow.getOriginalEntityData()` without parameters * `orm.schema.generate()` ## `BaseEntity` no longer has generic type arguments[​](#baseentity-no-longer-has-generic-type-arguments "Direct link to baseentity-no-longer-has-generic-type-arguments") Instead, the `this` type is used. ``` -class User extends BaseEntity { ... } +class User extends BaseEntity { ... } ``` ## `wrap` helper no longer accepts `undefined` on type level[​](#wrap-helper-no-longer-accepts-undefined-on-type-level "Direct link to wrap-helper-no-longer-accepts-undefined-on-type-level") The runtime implementation still checks for this case and returns the argument, but on type level this will fail to compile. It was never correct to pass in nullable values inside as it were not allowed in the return type. Note that if you used it for converting entity instance to reference wrapper, the new `ref()` helper does a better job at that (and accepts nullable values). ## Primary key inference[​](#primary-key-inference "Direct link to Primary key inference") Some methods allowed you to pass in the primary key property via second generic type argument, this is now removed in favor of the automatic inference. To set the PK type explicitly, use the `PrimaryKeyProp` symbol. `PrimaryKeyType` symbol has been removed, use `PrimaryKeyProp` instead if needed. Moreover, the value for composite PKs now has to be a tuple instead of a union to ensure we preserve the order of keys: ``` @Entity() export class Foo { @ManyToOne(() => Bar, { primary: true }) bar!: Bar; @ManyToOne(() => Baz, { primary: true }) baz!: Baz; - [PrimaryKeyType]?: [number, number]; - [PrimaryKeyProp]?: 'bar' | 'baz'; + [PrimaryKeyProp]?: ['bar', 'baz']; } ``` ## Removed `BaseEntity.toJSON` method[​](#removed-baseentitytojson-method "Direct link to removed-baseentitytojson-method") The signature became more complex on type level which made it harder to override, and as this was the only method meant for overriding, it should provide better experience when there won't be any. The method was only forwarding the call to `BaseEntity.toObject`, so use that in the code instead. > The method is still present on the prototype as with any other entity, regardless of whether they extend from the `BaseEntity`. ## Renames[​](#renames "Direct link to Renames") * `PropertyOptions.onUpdateIntegrity` -> `PropertyOptions.updateRule` * `PropertyOptions.onDelete` -> `PropertyOptions.deleteRule` * `EntityProperty.reference` -> `EntityProperty.kind` * `ReferenceType` -> `ReferenceKind` * `PropertyOptions.wrappedReference` -> `PropertyOptions.ref` * `AssignOptions.mergeObjects` -> `AssignOptions.mergeObjectProperties` * `EntityOptions.customRepository` -> `EntityOptions.repository` * `Options.cache` -> `Options.metadataCache` * `UnitOfWork.registerManaged` -> `UnitOfWork.register` * `baseDir` -> `path` option in `EntityGenerator.generate()` * `MIKRO_ORM_CLI` env var -> `MIKRO_ORM_CLI_CONFIG` * `InitOptions` -> `InitCollectionOptions` ## Removed dependency on `faker` in seeder package[​](#removed-dependency-on-faker-in-seeder-package "Direct link to removed-dependency-on-faker-in-seeder-package") Faker is rather fat library that can result in perf degradation just by importing it, and since we were not working with the library anyhow, there is no reason to keep it in the dependencies. Users who want to use faker can just install it and use it directly, having the faker import under their own control. ``` -import { Factory, Faker } from '@mikro-orm/seeder'; +import { Factory } from '@mikro-orm/seeder'; +import { faker } from '@faker-js/faker/locale/en'; export class ProjectFactory extends Factory { model = Project; - definition(faker: Faker): Partial { + definition(): Partial { return { name: faker.company.name(), }; } } ``` ## Removed `RequestContext.createAsync`[​](#removed-requestcontextcreateasync "Direct link to removed-requestcontextcreateasync") Use `RequestContext.create` instead, it can be awaited now. ``` -const ret = await RequestContext.createAsync(em, async () => { ... }); +const ret = await RequestContext.create(em, async () => { ... }); ``` ## Renamed `@UseRequestContext()`[​](#renamed-userequestcontext "Direct link to renamed-userequestcontext") The decorator was renamed to `@CreateRequestContext()` to make it clear it always creates new context, and a new `@EnsureRequestContext()` decorator was added that will reuse existing contexts if available. ## Raw SQL fragments now require `raw` helper[​](#raw-sql-fragments-now-require-raw-helper "Direct link to raw-sql-fragments-now-require-raw-helper") The raw SQL fragments used to be detected automatically, which wasn't very precise. In v6, a new `raw` static helper is introduced to deal with this: ``` const users = await em.find(User, { - [expr('lower(email)')]: 'foo@bar.baz', + [raw('lower(email)')]: 'foo@bar.baz', }); ``` The previous `em.raw()` and `qb.raw()` helpers are now removed in favor of this new static `raw` helper. Similarly, the `expr` helper is also removed in favor of it. Note that this new helper can be also used to do atomic updates via `flush`: ``` const ref = em.getReference(User, 1); ref.age = raw(`age * 2`); await em.flush(); console.log(ref.age); // real value is available after flush ``` Alternatively, you can use the new `sql` tagged template function: ``` ref.age = sql`age * 2`; ``` This works on query keys as well as parameters, and is required for any SQL fragments. Read more about this in [Using raw SQL query fragments](https://mikro-orm.io/docs/raw-queries.md) section. ## Removed `qb.ref()`[​](#removed-qbref "Direct link to removed-qbref") Removed in favour of `sql.ref()`. ## Changed default PostgreSQL `Date` mapping precision[​](#changed-default-postgresql-date-mapping-precision "Direct link to changed-default-postgresql-date-mapping-precision") Previously, all drivers defaulted the `Date` type mapping to a timestamp with 0 precision (so seconds). This is [discouraged in PostgreSQL](https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_timestamp.280.29_or_timestamptz.280.29), and is no longer valid - the default mapping without the `length` property being explicitly set is now `timestamptz`, which stores microsecond precision, so equivalent to `timestamptz(6)`. To revert back to the v5 behavior, you can either set the `columnType: 'timestamptz(0)'`, or use `length: 0`: ``` @Property({ length: 0 }) ``` ## Metadata CacheAdapter requires sync API[​](#metadata-cacheadapter-requires-sync-api "Direct link to Metadata CacheAdapter requires sync API") To allow working with cache inside `MikroORM.initSync`, the metadata cache now enforces sync API. You should usually depend on the file-based cache for the metadata, which now uses sync methods to work with the file system. ## Implicit serialization changes[​](#implicit-serialization-changes "Direct link to Implicit serialization changes") Implicit serialization, so calling `toObject()` or `toJSON()` on the entity, as opposed to explicitly using the `serialize()` helper, now works entirely based on `populate` hints. This means that, unless you explicitly marked some entity as populated via `wrap(entity).populated()`, it will be part of the serialized form only if it was part of the `populate` hint: ``` // let's say both Author and Book entity has a m:1 relation to Publisher entity // we only populate the publisher relation of the Book entity const user = await em.findOneOrFail(Author, 1, { populate: ['books.publisher'], }); const dto = wrap(user).toObject(); console.log(dto.publisher); // only the FK, e.g. `123` console.log(dto.books[0].publisher); // populated, e.g. `{ id: 123, name: '...' }` ``` Moreover, the implicit serialization now respects the partial loading hints too. Previously, all loaded properties were serialized, partial loading worked only on the database query level. Since v6, we also prune the data on runtime. This means that unless the property is part of the partial loading hint (`fields` option), it won't be part of the DTO - only exception is the primary key, you can optionally hide it via `hidden: true` in the property options. Main difference here will be the foreign keys, those are often automatically selected as they are needed to build the entity graph, but will no longer be part of the DTO. ``` const user = await em.findOneOrFail(Author, 1, { fields: ['books.publisher.name'], }); const dto = wrap(user).toObject(); // only the publisher's name will be available, previously there would be also `book.author` // `{ id: 1, books: [{ id: 2, publisher: { id: 3, name: '...' } }] }` ``` **This also works for embeddables, including nesting and object mode.** ## Changes in `Date` property mapping[​](#changes-in-date-property-mapping "Direct link to changes-in-date-property-mapping") Previously, mapping of datetime columns to JS `Date` objects was dependent on the driver, while SQLite didn't have this out of box support and required manual conversion on various places. All drivers now have disabled `Date` conversion and this is now handled explicitly, in the same way for all of them. Moreover, the `date` type was previously seen as a `datetime`, while now only `Date` (with uppercase `D`) will be considered as `datetime`, while `date` is just a `date`. Lastly, `DateType` (used for mapping `date` column type, not a `datetime`) no longer maps to a `Date` objects (maps to a `string` instead). ## Native BigInt support[​](#native-bigint-support "Direct link to Native BigInt support") The default mapping of `bigint` columns is now using the native JavaScript `BigInt`, and is configurable, so it can also map to numbers or strings: ``` @PrimaryKey() id0: bigint; // type is inferred @PrimaryKey({ type: new BigIntType('bigint') }) id1: bigint; // same as `id0` @PrimaryKey({ type: new BigIntType('string') }) id2: string; @PrimaryKey({ type: new BigIntType('number') }) id3: number; ``` ## Join condition alias[​](#join-condition-alias "Direct link to Join condition alias") Additional join conditions used to be implicitly aliased to the root entity, now they are aliased to the joined entity instead. If you are using explicit aliases in the join conditions, nothing changes. ``` // the `name` used to resolve to `b.name`, now it will resolve to `a.name` instead qb.join('b.author', 'a', { name: 'foo' }); ``` ## Embedded properties respect `NamingStrategy`[​](#embedded-properties-respect-namingstrategy "Direct link to embedded-properties-respect-namingstrategy") This is breaking mainly for SQL drivers, where the default naming strategy is underscoring, and will now apply to the embedded properties too. You can restore to the old behaviour by implementing custom naming strategy, overriding the `propertyToColumnName` method. It now has a second boolean parameter to indicate if the property is defined inside a JSON object context. ``` import { UnderscoreNamingStrategy } from '@mikro-orm/core'; class CustomNamingStrategy extends UnderscoreNamingStrategy { propertyToColumnName(propertyName: string, object?: boolean): string { if (object) { return propertyName; } return super.propertyToColumnName(propertyName, object); } } ``` ## Iterating not initialized Collection throws[​](#iterating-not-initialized-collection-throws "Direct link to Iterating not initialized Collection throws") When you try to iterate a collection instance, it will now check if its initialized, and throw otherwise. ``` const author = await em.findOne(User, 1); // this will throw as the books collection is not initialized for (const book of author.books) { // ... } ``` ## Type-safe `populate: ['*']` and removed `populate: true` support[​](#type-safe-populate--and-removed-populate-true-support "Direct link to type-safe-populate--and-removed-populate-true-support") When populating all relations, the `Loaded` type will now respect `*` in the populate hint. The old boolean variant is now removed in favor of new `populate: ['*']`. > This also applies to the `serialize()` helper and its `populate` parameter. ``` const users = await em.find(User, {}, { - populate: true, + populate: ['*'], }); ``` `populate: false` is still allowed and serves as a way to disable eager loaded properties. ## `em.populate()` returns just the entity when called on a single entity[​](#empopulate-returns-just-the-entity-when-called-on-a-single-entity "Direct link to empopulate-returns-just-the-entity-when-called-on-a-single-entity") `em.populate()` now returns what you feed in—when you call it with a single entity, you get single entity back, when you call it with an array of entities, you get an array back. This has been the case initially, but it was problematic to type the method strictly, so it was changed to always an array in v5. This is now resolved in v6, so we can have the previous behavior back, but type-safe. ``` -const [author] = await em.populate(author, ['books']); +const author = await em.populate(author, ['books']); ``` ## Duplicate field names are now validated[​](#duplicate-field-names-are-now-validated "Direct link to Duplicate field names are now validated") When you use the same `fieldName` for two properties in one entity, error will be thrown: ``` @Entity() class User { @PrimaryKey() id!: number; @Property({ name: 'custom_name' }) name!: number; @Property({ name: 'custom_name' }) age!: number; } ``` This does not apply to [virtual properties](https://mikro-orm.io/docs/defining-entities.md#virtual-properties): ``` @Entity() class User { @PrimaryKey() id!: number; @ManyToOne(() => User, { name: 'parent_id' }) parent!: User; @Property({ name: 'parent_id', persist: false }) parentId!: number; } ``` > This validation can be disabled via `discovery.checkDuplicateFieldNames` ORM config option. ## `Reference.load(prop: keyof T)` signature removed[​](#referenceloadprop-keyof-t-signature-removed "Direct link to referenceloadprop-keyof-t-signature-removed") The `Reference.load()` method allowed two signatures, one to ensure the entity is loaded, and another to get a property value in one step. The latter is now removed in favor of a new method called `Reference.loadProperty(prop)`: ``` -const email = book.author.load('email'); +const email = book.author.loadProperty('email'); ``` ## `Reference.set()` is private[​](#referenceset-is-private "Direct link to referenceset-is-private") `Reference` wrapper holds an identity—this means its instance is bound to the underlying entity. This imposes a problem when you try to change the wrapped entity, as the same instance of the `Reference` wrapper can be present on other places in the entity graph. For this reason, the `set` method is no longer public, as replacing the reference instance should be always preferred. ``` -book.author.set(other); +book.author = ref(other); ``` ## `Reference.load()` can return `null`[​](#referenceload-can-return-null "Direct link to referenceload-can-return-null") `Reference.load()` (and other methods that are using `WrappedEntity.init()` under the hood) can now return `null` when the target entity is not found instead of resolving to unloaded entity. This can happen either because it was removed in the meantime, or it is not compatible with the currently enabled filters. A new method called `loadOrFail()` is added to the `Reference` class which always returns a value or throws otherwise, just like `em.findOneOrFail()`. ``` -const publisher = await book.publisher.load(); +const publisher = await book.publisher.loadOrFail(); ``` ## `em.insert()` respects required properties[​](#eminsert-respects-required-properties "Direct link to eminsert-respects-required-properties") `em.insert()` will now require you to pass all non-optional properties just like `em.create()` already did. Some properties might be defined as required for TS, but we have a default value for them (either runtime, or database one) - for such we can use `OptionalProps` symbol (or the new `Opt` type) to specify which properties should be considered as optional. ## `.env` files are no longer automatically loaded[​](#env-files-are-no-longer-automatically-loaded "Direct link to env-files-are-no-longer-automatically-loaded") Previously, if there was a `.env` file in your root directory, it was automatically loaded. Now instead of loading, it is only checked for the ORM env vars (those prefixed with `MIKRO_ORM_`) and all the others are ignored. If you want to access all your env vars defined in the `.env` file, call `import 'dotenv/config'` yourself in your app (or possibly in your ORM config file). ## `metadataCache.adapter` needs to be synchronous[​](#metadatacacheadapter-needs-to-be-synchronous "Direct link to metadatacacheadapter-needs-to-be-synchronous") To allow working with cache inside `MikroORM.initSync`, the metadata cache now enforces sync API. You should usually depend on the file-based cache for the metadata, which now uses sync methods to work with the file system. Note that the cache is important only for `TsMorphMetadataProvider`, other providers usually don't need it as they are fast enough on their own. --- # Source: https://mikro-orm.io/docs/upgrading.md ## [📄️ Upgrading from v5 to v6](https://mikro-orm.io/docs/upgrading-v5-to-v6.md) [Following sections describe (hopefully) all breaking changes, most of them might be not valid for you, like if you do not use custom NamingStrategy implementation, you do not care about the interface being changed.](https://mikro-orm.io/docs/upgrading-v5-to-v6.md) --- # Source: https://mikro-orm.io/docs/usage-with-adminjs.md # Using MikroORM with AdminJS ## Installation[​](#installation "Direct link to Installation") To use MikroORM with AdminJS you need to install: 1. [`AdminJS Core`](https://github.com/SoftwareBrothers/adminjs): ``` $ yarn add adminjs ``` 2. [`MikroORM Adapter`](https://github.com/SoftwareBrothers/adminjs-mikroorm): ``` $ yarn add @adminjs/mikroorm # A MikroORM driver and core package, choose the one which suits you: $ yarn add @mikro-orm/core @mikro-orm/mongodb # for mongo $ yarn add @mikro-orm/core @mikro-orm/mysql # for mysql $ yarn add @mikro-orm/core @mikro-orm/mariadb # for mariadb $ yarn add @mikro-orm/core @mikro-orm/postgresql # for postgresql $ yarn add @mikro-orm/core @mikro-orm/sqlite # for sqlite ``` 3. A plugin specific to your server's framework: * [`Express Plugin`](https://github.com/SoftwareBrothers/adminjs-expressjs): ``` $ yarn add @adminjs/express # Peer dependencies $ yarn add express express-formidable express-session ``` * [`Hapi Plugin`](https://github.com/SoftwareBrothers/adminjs-hapijs): ``` $ yarn add @adminjs/hapi # Peer dependencies $ yarn add @hapi/boom @hapi/cookie @hapi/hapi @hapi/inert ``` *** ## Setup[​](#setup "Direct link to Setup") Once the installation process is completed, we need to set up AdminJS endpoints and database connection. The process is straightforward but differs based on which `plugin` you are using. Below you can find examples specific to supported frameworks: ### MikroORM + Express Plugin[​](#mikroorm--express-plugin "Direct link to MikroORM + Express Plugin") ``` import AdminJS from 'adminjs'; import { Database, Resource } from '@adminjs/mikroorm'; import AdminJSExpress from '@adminjs/express'; import { MikroORM } from '@mikro-orm/postgresql'; import { validate } from 'class-validator'; // optional const PORT = process.env.PORT ?? 3000; const run = async () => { /* Initialize MikroORM like you would do normally, you can also import your MikroORM instance from a separate file */ const orm = await MikroORM.init({ entities: [User, Car, Seller], // use your own entities dbName: process.env.DATABASE_NAME, clientUrl: process.env.DATABASE_URL, }); /* Optional: if you're using class-validator, assign it to Resource */ Resource.validate = validate; /* Tell AdminJS which adapter to use */ AdminJS.registerAdapter({ Database, Resource }); const app = express(); /* Create AdminJS instance */ const admin = new AdminJS({ databases: [orm], }); const router = AdminJSExpress.buildRouter(admin); app.use(admin.options.rootPath, router); app.listen(PORT, () => { console.log(`App listening at http://localhost:${PORT}`); }); } run(); ``` ### MikroORM + Hapi Plugin[​](#mikroorm--hapi-plugin "Direct link to MikroORM + Hapi Plugin") ``` import AdminJS from 'adminjs'; import { Database, Resource } from '@adminjs/mikroorm'; import AdminJSHapi from '@adminjs/hapi'; import { MikroORM } from '@mikro-orm/postgresql'; import { validate } from 'class-validator'; // optional const PORT = process.env.PORT ?? 3000; const run = async () => { /* Initialize MikroORM like you would do normally, you can also import your MikroORM instance from a separate file */ const orm = await MikroORM.init({ entities: [User, Car, Seller], // use your own entities dbName: process.env.DATABASE_NAME, clientUrl: process.env.DATABASE_URL, }); /* Optional: if you're using class-validator, assign it to Resource */ Resource.validate = validate; /* Tell AdminJS which adapter to use */ AdminJS.registerAdapter({ Database, Resource }); const server = Hapi.server({ port: PORT }) /* Configure AdminJS */ const adminOptions = { databases: [orm], }; /* Register AdminJS as a Hapi server's plugin */ await server.register({ plugin: AdminJSHapi, options: adminOptions, }); await server.start(); console.log(`App listening at ${server.info.uri}`); } run(); ``` You can start your server afterwards and the admin panel will be available at `http://localhost:{PORT}/admin`. If you followed the example setup thoroughly, you should be able to see all of your entities in the sidebar, and you should be able to perform basic **CRUD** operations on them. To further customize your AdminJS panel, please refer to the [`official documentation`](https://adminjs.co/docs.html). *** ## Authentication[​](#authentication "Direct link to Authentication") The examples above set up AdminJS with unauthenticated access. To require your users to authenticate before accessing the admin panel, some plugin-specific modifications are required: ### Express[​](#express "Direct link to Express") You need to use `AdminJSExpress.buildAuthenticatedRouter` instead of `AdminJS.buildRouter`: **Before**: ``` const router = AdminJSExpress.buildRouter(admin); ``` **After**: ``` const ADMIN_EMAIL = 'example@test.com'; const ADMIN_PASSWORD = 'password'; const router = AdminJSExpress.buildAuthenticatedRouter(admin, { authenticate: async (email, password) => { /* Your code for verifying email & password goes here */ return email === ADMIN_EMAIL && password === ADMIN_PASSWORD ? { email } // the function should return an object containing user's data if authenticated successfully : null; }, cookiePassword: process.env.COOKIE_PASSWORD ?? 'makesurepasswordissecure', }); ``` ### Hapi[​](#hapi "Direct link to Hapi") You need to simply add `auth` property to AdminJS options. **Before**: ``` const adminOptions = { databases: [orm], }; ``` **After**: ``` const ADMIN_EMAIL = 'example@test.com'; const ADMIN_PASSWORD = 'password'; const adminOptions = { databases: [orm], auth: { authenticate: async (email, password) => { /* Your code for verifying email & password goes here */ return email === ADMIN_EMAIL && password === ADMIN_PASSWORD ? { email } // the function should return an object containing user's data if authenticated successfully : null; }, strategy: 'session', cookiePassword: process.env.COOKIE_PASSWORD ?? 'makesurepasswordissecure', isSecure: false, // only https requests }, }; ``` *** ## Example[​](#example "Direct link to Example") An example app using MikroORM with AdminJS can be found [here](https://github.com/SoftwareBrothers/adminjs-mikroorm/tree/master/example-app) --- # Source: https://mikro-orm.io/docs/usage-with-jest.md # Usage with Jest When testing your own code that uses [Jest](https://jestjs.io/) for the tests, and MikroORM for the database, there are some things to consider. ## Using fake timers[​](#using-fake-timers "Direct link to Using fake timers") Jest allows using [timer mocks](https://jestjs.io/docs/timer-mocks), which can be a very useful feature when testing your application's logic for time sensitive tasks. Making sure the data in your database is accurate based on time is also part of this testing. One caveat to be aware of though is that one of the functions faked by Jest is [`process.nextTick()`](https://nodejs.org/docs/latest/api/process.html#processnexttickcallback-args), and this function is in turn used by some of MikroORM's dependencies. If you know your code is not sensitive to the passage of the event loop's ticks (and is instead maybe only sensitive to the system's clock), you can safely set Jest to not fake this function by using: ``` jest.useFakeTimers({ doNotFake: ['nextTick'] }); ``` This way, you can still use the rest of Jest's timer mock API to control the system's clock, and any timers in use by your code or in MikroORM (most notably, result caches). If you need better control in your test code in relation to the micro-task queue, keep reading the rest of this section. ### Known usages of `process.nextTick()` by dependencies[​](#known-usages-of-processnexttick-by-dependencies "Direct link to known-usages-of-processnexttick-by-dependencies") * All DB clients that use connection pool do so by an algorithm that lets them obtain the connection they requested at the next tick, or be queued up if no connection is free at the time of the request. Similarly, on release, if there's a request in the queue, it gets scheduled to get the released connection at the next tick, or else the connection is put back in the pool. * The MongoDB client has no option of not using connection pool. Even if you set a pool of one connection, the client will still reach for that pool, thus needing `process.nextTick()`. * The MySQL/MariaDB client, in addition to using `process.nextTick()` in pool and pool clusters, also uses it when finalizing results from queries. See [the source of mysql2](https://github.com/sidorares/node-mysql2/blob/1d983fa46031a77c689faea5f69e6e0baa1b3de7/lib/commands/query.js#L84-L92) * The PostgreSQL client, in addition to using `process.nextTick()` in a connection pool, also uses it when handling errors with its non-native client. Any server errors (including f.e. wrong queries, read timeouts, etc.) or exceptions thrown from user supplied callbacks get (re)thrown in the next tick. If you are not using a connection pool, and are not using raw SQL queries, you should be able to safely use a faked `process.nextTick()` and handle uncaught exceptions only when you manually advance time. * The SQLite client does not support connection pool, but it does have the concept of cached database instances (see [sqlite3 docs](https://github.com/TryGhost/node-sqlite3/wiki/Caching)), which hands off the cached database instance at the next tick. This feature is not used by MikroORM, which means it is always safe to use MikroORM with SQLite. However, if you get the SQLite3 client directly and try to use a cached instance, you will run into SQLite's only use of `process.nextTick()`. ### Allowing a real `process.nextTick()` only when required[​](#allowing-a-real-processnexttick-only-when-required "Direct link to allowing-a-real-processnexttick-only-when-required") If you do know that you do need a faked `process.nextTick()` because your code is sensitive to the micro-tasks queue, and yet you also have MikroORM in the mix with a connection pool or MySQL, you will need to mock the parts that require `process.nextTick()` so that they use the real function only during that critical operation, and restore back the mock after that critical operation. So in the end, your application and MikroORM related code (pre-flush hooks, custom types' JS to DB conversion, etc.) can schedule what is needed to for the next tick, but not have those callbacks actually run. Those callbacks would only be executed (and may schedule new `process.nextTick()` callbacks that may or may not get executed) during the query, before the query results are in. After the query results are in, you would once again not have scheduled callbacks executing, until you manually advance time. Notably, this includes also callbacks scheduled during any MikroORM related code (post-flush hooks, custom types' DB to JS conversion, etc.). To accomplish this, you can use something like this snippet of code (tested to work with the version of Jest at the time of this writing): nextTickFixer.ts ``` export function wrappedSpy>>( object: T, method: T[M] extends jest.Func ? M : never, hooks: Readonly<{ beforeOriginal?: (...args: jest.ArgsType>[T[M] extends jest.Func ? M : never]>) => void, afterOriginal?: (result: ReturnType extends Promise ? R : ReturnType) => void, errorOriginal?: (error?: unknown) => void, }> ) { const originalSpy = jest.spyOn(object, method); const mockImpl: Parameters[0] = (...args) => { hooks.beforeOriginal?.(...args); try { const result = (object[method] as Function).apply(originalSpy.mock.contexts.at(-1), args); if (result instanceof Promise) { result.then((v) => { hooks.afterOriginal?.(v); return v; }).catch((e) => { hooks.errorOriginal?.(e); }).finally(() => { originalSpy.mockImplementationOnce(mockImpl!); }); } else { hooks.afterOriginal?.(result); originalSpy.mockImplementationOnce(mockImpl!); } return result; } catch (e) { hooks.errorOriginal?.(e); originalSpy.mockImplementationOnce(mockImpl!); throw e; } }; originalSpy.mockImplementationOnce(mockImpl); return originalSpy; } const finallyHook = () => { jest.useFakeTimers({ doNotFake: [], now: jest.now() }); }; export const fakeTimersHooks = { beforeOriginal: () => { jest.useFakeTimers({ doNotFake: ['nextTick'], now: jest.now() }); }, afterOriginal: finallyHook, errorOriginal: finallyHook, } as const satisfies Parameters[2]; ``` #### With MySQL/MariaDB[​](#with-mysqlmariadb "Direct link to With MySQL/MariaDB") If you're using MySQL or MariaDB, also add this to mock the individual methods that use `process.nextTick()`: fakeTimersFixer.ts ``` import { resolve, dirname } from 'node:path'; import { fakeTimersHooks, wrappedSpy } from './nextTickFixer'; export function enableFakeTimersWithMikroOrm() { const mysqlDir = dirname(require.resolve('mysql2')); return { mocks: [ wrappedSpy(require(resolve(mysqlDir, 'lib/commands/query.js')).prototype, 'done', executeHooks), wrappedSpy(require(resolve(mysqlDir, 'lib/commands/ping.js')).prototype, 'pingResponse', executeHooks), wrappedSpy(require(resolve(mysqlDir, 'lib/commands/register_slave.js')).prototype, 'registerResponse', executeHooks), wrappedSpy(require(resolve(mysqlDir, 'lib/pool.js')).prototype, 'getConnection', executeHooks), wrappedSpy(require(resolve(mysqlDir, 'lib/pool.js')).prototype, 'releaseConnection', executeHooks), wrappedSpy(require(resolve(mysqlDir, 'lib/pool_cluster.js')).prototype, 'end', executeHooks), ], mockRestore: function () { let mock: jest.SpyInstance | undefined; while (mock = this.mocks.pop()) { mock.mockRestore(); } } }; } ``` #### With PostgreSQL[​](#with-postgresql "Direct link to With PostgreSQL") If you are using PostgreSQL, consider adding `pg-native` as a dependency, to enable error handling without extra mocks. Alternatively, inspect which errors your tests produce, where they get thrown from, and mock the appropriate methods from `pg/client.js`. Regardless, if you are using connection pools, you will also need to add this: fakeTimersFixer.ts ``` import Pool from 'pg-pool'; import { fakeTimersHooks, wrappedSpy } from './nextTickFixer'; export function enableFakeTimersWithMikroOrm() { return { mocks: [ wrappedSpy(Pool.prototype, 'connect', executeHooks), ], mockRestore: function () { let mock: jest.SpyInstance | undefined; while (mock = this.mocks.pop()) { mock.mockRestore(); } } }; } ``` #### With MongoDB[​](#with-mongodb "Direct link to With MongoDB") If you are using MongoDB, add this to mock all individual methods of the Mongo client that use `process.nextTick()`. fakeTimersFixer.ts ``` import { Topology } from 'mongodb/lib/sdam/topology'; import { ConnectionPool } from 'mongodb/lib/cmap/connection_pool'; import { fakeTimersHooks, wrappedSpy } from './nextTickFixer'; function enableFakeTimersWithMikroOrm() { return { mocks: [ wrappedSpy(ConnectionPool, 'constructor', fakeTimersHooks), wrappedSpy(ConnectionPool.prototype, 'checkIn', fakeTimersHooks), wrappedSpy(ConnectionPool.prototype, 'checkOut', fakeTimersHooks), wrappedSpy(ConnectionPool.prototype, 'clear', fakeTimersHooks), wrappedSpy(ConnectionPool.prototype, 'destroyConnection', fakeTimersHooks), wrappedSpy(ConnectionPool.prototype, 'ensureMinPoolSize', fakeTimersHooks), wrappedSpy(ConnectionPool.prototype, 'processWaitQueue', fakeTimersHooks), wrappedSpy(Topology.prototype, 'serverUpdateHandler', fakeTimersHooks), wrappedSpy(Topology.prototype, 'selectServer', fakeTimersHooks), ], mockRestore: function () { let mock: jest.SpyInstance | undefined; while (mock = this.mocks.pop()) { mock.mockRestore(); } } }; } ``` #### Usage of fixed mocks[​](#usage-of-fixed-mocks "Direct link to Usage of fixed mocks") In your tests, call `enableFakeTimersWithMikroOrm` before you call any queries. You can call `mockRestore()` on the returned object to re-enable real timers use (or ensure that if queries are called, the test would freeze, rather than continue). e.g. example.test.ts ``` import { initORM } from './db';// See "Project Setup" import { enableFakeTimersWithMikroOrm } from './fakeTimersFixer'; // different based on your driver; see above test(() => { const orm = initORM({ //your test config }); jest.useFakeTimers(); const ormMock = enableFakeTimersWithMikroOrm(); // write your tests normally ormMock.restoreMock(); jest.useRealTimers(); }); ``` --- # Source: https://mikro-orm.io/docs/usage-with-js.md # Usage with JavaScript Since MikroORM 3.2, we can use `EntitySchema` helper to define own entities without decorators, which works also for Vanilla JavaScript. > Read more about `EntitySchema` in [this section](https://mikro-orm.io/docs/entity-schema.md). Here is an example of such entity: ./entities/Author.js ``` import { Collection, EntitySchema } from '@mikro-orm/core'; import { Book } from './Book.js'; import { BaseEntity } from './BaseEntity.js'; /** * @property {number} id * @property {Date} createdAt * @property {Date} updatedAt * @property {string} name * @property {string} email * @property {number} age * @property {boolean} termsAccepted * @property {string[]} identities * @property {Date} born * @property {Collection} books * @property {Book} favouriteBook * @property {number} version * @property {string} versionAsString */ export class Author extends BaseEntity { /** * @param {string} name * @param {string} email */ constructor(name, email) { super(); this.name = name; this.email = email; this.books = new Collection(this); this.createdAt = new Date(); this.updatedAt = new Date(); this.termsAccepted = false; } } export const schema = new EntitySchema({ class: Author, properties: { name: { type: 'string' }, email: { type: 'string', unique: true }, age: { type: 'number', nullable: true }, termsAccepted: { type: 'boolean', default: 0, onCreate: () => false }, identities: { type: 'string[]', nullable: true }, born: { type: DateType, nullable: true, length: 3 }, books: { kind: '1:m', entity: () => 'Book', mappedBy: book => book.author }, favouriteBook: { kind: 'm:1', type: 'Book' }, version: { type: 'number', persist: false }, }, }); ``` > Do not forget to provide `name` and `path` schema parameters as well as `entity` and `schema` exports. Reference `kind` parameter can be one of (where `SCALAR` is the default one): ``` enum ReferenceKind { SCALAR = 'scalar', ONE_TO_ONE = '1:1', MANY_TO_ONE = 'm:1', ONE_TO_MANY = '1:m', MANY_TO_MANY = 'm:n', EMBEDDED = 'embedded', } ``` We can register our entities as usual: ``` const orm = await MikroORM.init({ entities: [Author, Book, BookTag, BaseEntity], dbName: 'my-db-name', }); ``` > We can also pass the `EntitySchema` instance to the `entities` array. For more examples of plain JavaScript entity definitions take a look [Express JavaScript example](https://github.com/mikro-orm/express-js-example-app). --- # Source: https://mikro-orm.io/docs/usage-with-mongo.md # Usage with MongoDB To use MikroORM with mongo database, do not forget to install `@mikro-orm/mongodb` dependency. Then call `MikroORM.init()` as part of bootstrapping your app: > To access driver specific methods like `em.aggregate()` we need to specify the driver type when calling `MikroORM.init()`. Alternatively we can cast the `orm.em` to `EntityManager` exported from the driver package: > > ``` > import { EntityManager } from '@mikro-orm/mongodb'; > const em = orm.em as EntityManager; > const qb = em.aggregate(...); > ``` > We need to use `clientUrl` to set up hosts, using `host` or `port` is not supported. ``` import { MikroORM } from '@mikro-orm/mongodb'; // or any other driver package const orm = await MikroORM.init({ entities: [Author, Book, ...], dbName: 'my-db-name', clientUrl: '...', }); console.log(orm.em); // access EntityManager via `em` property ``` ## Defining entity[​](#defining-entity "Direct link to Defining entity") When defining entity, do not forget to define primary key like this: ``` @PrimaryKey() _id: ObjectId; @SerializedPrimaryKey() id!: string; // won't be saved in the database ``` > Only `_id: ObjectId` will be saved in the database. `id: string` is virtual and is also optional. ## ObjectId and string id duality[​](#objectid-and-string-id-duality "Direct link to ObjectId and string id duality") Every entity has both `ObjectId` and `string` id available, also all methods of `EntityManager` and `EntityRepository` supports querying by both of them. ``` const author = orm.em.getReference('...id...'); console.log(author.id); // returns '...id...' console.log(author._id); // returns ObjectId('...id...') // all of those will return the same results const article = '...article id...'; // string id const book = '...book id...'; // string id const repo = orm.em.getRepository(Author); const foo1 = await repo.find({ id: { $in: [article] }, favouriteBook: book }); const bar1 = await repo.find({ id: { $in: [new ObjectId(article)] }, favouriteBook: new ObjectId(book) }); const foo2 = await repo.find({ _id: { $in: [article] }, favouriteBook: book }); const bar2 = await repo.find({ _id: { $in: [new ObjectId(article)] }, favouriteBook: new ObjectId(book) }); ``` ## ManyToMany collections with inlined pivot array[​](#manytomany-collections-with-inlined-pivot-array "Direct link to ManyToMany collections with inlined pivot array") As opposed to SQL drivers that use pivot tables, in mongo we can leverage available array type to store array of collection items (identifiers). This approach has two main benefits: 1. Collection is stored on owning side entity, so we know how many items are there even before initializing the collection. 2. As there are no pivot tables, resulting database queries are much simpler. ## Transactions[​](#transactions "Direct link to Transactions") Starting with v3.4, MongoDB driver supports transactions. To use transactions, there are several things you need to respect: * you need to use replica set (see [run-rs](https://github.com/vkarpov15/run-rs)) * implicit transactions are disabled by default * use `implicitTransactions: true` to enable them globally * or use explicit transaction demarcation via `em.transactional()` * you need to explicitly create all collections before working with them * use `orm.schema.createSchema()` method to do so ``` # first create replica set $ run-rs -v 4.2.3 ``` ``` // make sure to import from the MongoDriver package import { MikroORM } from '@mikro-orm/mongodb'; const orm = await MikroORM.init({ entities: [Author, Book, ...], clientUrl: 'mongodb://localhost:27017,localhost:27018,localhost:27019/my-db-name?replicaSet=rs0', implicitTransactions: true, // defaults to false }); await orm.schema.createSchema(); ``` ## Indexes[​](#indexes "Direct link to Indexes") Starting with v3.4, MongoDB driver supports indexes and unique constraints. You can use `@Index()` and `@Unique()` as described in [Defining Entities section](https://mikro-orm.io/docs/defining-entities.md#indexes). To automatically create new indexes when initializing the ORM, you need to enable `ensureIndexes` option. ``` const orm = await MikroORM.init({ entities: [Author, Book, ...], dbName: 'my-db-name', ensureIndexes: true, // defaults to false }); ``` Alternatively you can call `ensureIndexes()` method on the `SchemaGenerator`: > SchemaGenerator support for mongo was introduced in v5. ``` await orm.schema.ensureIndexes(); ``` You can pass additional index/unique options via `options` parameter: ``` @Unique({ options: { partialFilterExpression: { name: { $exists: true } } }}) ``` You can also create text indexes by passing `type` parameter: ``` @Index({ properties: ['name', 'caption'], type: 'text' }) ``` If you provide only `options` in the index definition, it will be used as is, this allows to define any kind of index: ``` @Index({ options: { point: '2dsphere', title: -1 } }) ``` To set index weights, you can pass a tuple to the `options` parameter: ``` @Index({ options: [ { title: 'text', perex: 'text', key: 1 }, { weights: { title: 10, perex: 5 } }, ] }) ``` ## Native collection methods[​](#native-collection-methods "Direct link to Native collection methods") Sometimes you need to perform some bulk operation, or you just want to populate your database with initial fixtures. Using ORM for such operations can bring unnecessary boilerplate code. In this case, you can use one of `insert/nativeUpdate/nativeDelete` methods: ``` em.insert(entityName: string, data: any): Promise; em.nativeUpdate(entityName: string, where: FilterQuery, data: any): Promise; em.nativeDelete(entityName: string, where: FilterQuery | any): Promise; ``` Those methods execute native driver methods like Mongo's `insertOne/updateMany/deleteMany` collection methods respectively. This is common interface for all drivers, so for MySQL driver, it will fire native SQL queries. Keep in mind that they do not hydrate results to entities, and they do not trigger lifecycle hooks. They are also available as `EntityRepository` shortcuts: ``` EntityRepository.insert(data: any): Promise; EntityRepository.nativeUpdate(where: FilterQuery, data: any): Promise; EntityRepository.nativeDelete(where: FilterQuery | any): Promise; ``` There is also shortcut for calling `aggregate` method: ``` em.aggregate(entityName: string, pipeline: any[]): Promise; EntityRepository.aggregate(pipeline: any[]): Promise; ``` --- # Source: https://mikro-orm.io/docs/usage-with-nestjs.md # Using MikroORM with NestJS framework ## Installation[​](#installation "Direct link to Installation") Easiest way to integrate MikroORM to Nest is via [`@mikro-orm/nestjs` module](https://github.com/mikro-orm/nestjs). Simply install it next to Nest, MikroORM and underlying driver: ``` $ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mongodb # for mongo $ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mysql # for mysql/mariadb $ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mariadb # for mysql/mariadb $ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/postgresql # for postgresql $ yarn add @mikro-orm/core @mikro-orm/nestjs @mikro-orm/sqlite # for sqlite ``` or ``` $ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mongodb # for mongo $ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mysql # for mysql/mariadb $ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/mariadb # for mysql/mariadb $ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/postgresql # for postgresql $ npm i -s @mikro-orm/core @mikro-orm/nestjs @mikro-orm/sqlite # for sqlite ``` Once the installation process is completed, we can import the `MikroOrmModule` into the root `AppModule`. ``` @Module({ imports: [ MikroOrmModule.forRoot({ entities: ['./dist/entities'], entitiesTs: ['./src/entities'], dbName: 'my-db-name.sqlite3', }), ], controllers: [AppController], providers: [AppService], }) export class AppModule {} ``` The `forRoot()` method accepts the same configuration object as `init()` from the MikroORM package. Check [this page](https://mikro-orm.io/docs/configuration.md) for the complete configuration documentation. Alternatively we can [configure the CLI](https://mikro-orm.io/docs/quick-start.md#setting-up-the-commandline-tool) by creating a configuration file `mikro-orm.config.ts` and then call the `forRoot()` without any arguments. This won't work when you use a build tools that use tree shaking. ``` @Module({ imports: [ MikroOrmModule.forRoot(), ], ... }) export class AppModule {} ``` Afterward, the `EntityManager` will be available to inject across entire project (without importing any module elsewhere). ``` import { MikroORM } from '@mikro-orm/core'; import { EntityManager } from '@mikro-orm/mysql'; // Import EntityManager from your driver package or `@mikro-orm/knex` @Injectable() export class MyService { constructor(private readonly orm: MikroORM, private readonly em: EntityManager) { } } ``` > Notice that the `EntityManager` is imported from the `@mikro-orm/driver` package, where driver is `mysql`, `sqlite`, `postgres` or whatever driver you are using. > > In case you have `@mikro-orm/knex` installed as a dependency, you can also import the `EntityManager` from there. ## Repositories[​](#repositories "Direct link to Repositories") MikroORM supports the repository design pattern. For every entity we can create a repository. Read the complete [documentation on repositories here](https://mikro-orm.io/docs/repositories.md). To define which repositories shall be registered in the current scope you can use the `forFeature()` method. For example, in this way: > You should **not** register your base entities via `forFeature()`, as there are no repositories for those. On the other hand, base entities need to be part of the list in `forRoot()` (or in the ORM config in general). ``` // photo.module.ts @Module({ imports: [MikroOrmModule.forFeature([Photo])], providers: [PhotoService], controllers: [PhotoController], }) export class PhotoModule {} ``` and import it into the root `AppModule`: ``` // app.module.ts @Module({ imports: [MikroOrmModule.forRoot(...), PhotoModule], }) export class AppModule {} ``` In this way we can inject the `PhotoRepository` to the `PhotoService` using the `@InjectRepository()` decorator: ``` @Injectable() export class PhotoService { constructor( @InjectRepository(Photo) private readonly photoRepository: EntityRepository ) {} // ... } ``` ## Using custom repositories[​](#using-custom-repositories "Direct link to Using custom repositories") When using custom repositories, we can get around the need for `@InjectRepository()` decorator by naming our repositories the same way as `getRepositoryToken()` method do: ``` export const getRepositoryToken = (entity: EntityName) => `${Utils.className(entity)}Repository`; ``` In other words, as long as we name the repository same was as the entity is called, appending `Repository` suffix, the repository will be registered automatically in the Nest.js DI container. `**./author.entity.ts**` ``` @Entity({ repository: () => AuthorRepository }) export class Author { // to allow inference in `em.getRepository()` [EntityRepositoryType]?: AuthorRepository; } ``` `**./author.repository.ts**` ``` import { EntityRepository } from '@mikro-orm/mysql'; // Import EntityManager from your driver package or `@mikro-orm/knex` export class AuthorRepository extends EntityRepository { // your custom methods... } ``` As the custom repository name is the same as what `getRepositoryToken()` would return, we do not need the `@InjectRepository()` decorator anymore: ``` @Injectable() export class MyService { constructor(private readonly repo: AuthorRepository) { } } ``` ## Load entities automatically[​](#load-entities-automatically "Direct link to Load entities automatically") > `autoLoadEntities` option was added in v4.1.0 Manually adding entities to the entities array of the connection options can be tedious. In addition, referencing entities from the root module breaks application domain boundaries and causes leaking implementation details to other parts of the application. To solve this issue, static glob paths can be used. Note, however, that glob paths are not supported by webpack, so if you are building your application within a monorepo, you won't be able to use them. To address this issue, an alternative solution is provided. To automatically load entities, set the `autoLoadEntities` property of the configuration object (passed into the `forRoot()` method) to `true`, as shown below: ``` @Module({ imports: [ MikroOrmModule.forRoot({ // ... autoLoadEntities: true, }), ], }) export class AppModule {} ``` With that option specified, every entity registered through the `forFeature()` method will be automatically added to the entities array of the configuration object. > Note that entities that aren't registered through the `forFeature()` method, but are only referenced from the entity (via a relationship), won't be included by way of the `autoLoadEntities` setting. > Using `autoLoadEntities` also has no effect on the MikroORM CLI - for that we still need CLI config with the full list of entities. On the other hand, we can use globs there, as the CLI won't go through webpack. ## Request scoped handlers in queues[​](#request-scoped-handlers-in-queues "Direct link to Request scoped handlers in queues") > `@CreateRequestContext()` decorator is available in `@mikro-orm/core` package. > Before v6, `@CreateRequestContext()` was called `@UseRequestContext()`. As mentioned in the [docs](https://mikro-orm.io/docs/identity-map.md), we need a clean state for each request. That is handled automatically thanks to the `RequestContext` helper registered via middleware. But middlewares are executed only for regular HTTP request handles, what if we need a request scoped method outside of that? One example of that is queue handlers or scheduled tasks. We can use the `@CreateRequestContext()` decorator. It requires you to first inject the `MikroORM` instance to current context, it will be then used to create the context for you. Under the hood, the decorator will register new request context for your method and execute it inside the context. > `@CreateRequestContext()` should be used only on the top level methods. It should not be nested - a method decorated with it should not call another method that is also decorated with it. ``` @Controller() export class MyService { constructor(private readonly orm: MikroORM) { } @CreateRequestContext() async doSomething() { // this will be executed in a separate context } } ``` Alternatively you can provide a callback that will return the `MikroORM` instance. ``` import { DI } from '..'; export class MyService { @CreateRequestContext(() => DI.orm) async doSomething() { // this will be executed in a separate context } } ``` Another thing to look out for how you combine them with other decorators. For example if you use it in combination with NestJS's "[BullJS queues module](https://docs.nestjs.com/techniques/queues)", a safe bet is to extract the part of the code that needs a clean [docs](https://mikro-orm.io/docs/identity-map.md), either in a new method or inject a separate service. ``` @Processor({ name: 'example-queue', }) export class MyConsumer { constructor(private readonly orm: MikroORM) { } @Process() async doSomething(job: Job) { await this.doSomethingWithMikro(); } @CreateRequestContext() async doSomethingWithMikro() { // this will be executed in a separate context } } ``` As in this case, the `@Process()` decorator expects to receive an executable function, but if we add `@CreateRequestContext()` to the handler as well, if `@CreateRequestContext()` is executed before `@Process()`, the later will receive `void`. ## `@EnsureRequestContext()` decorator[​](#ensurerequestcontext-decorator "Direct link to ensurerequestcontext-decorator") Sometimes you may prefer to just ensure the method is executed inside a request context, and reuse the existing context if available. You can use the `@EnsureRequestContext()` decorator here, it behaves exactly like the `@CreateRequestContext`, but only creates new context if necessary, reusing the existing one if possible. ## Request scoping when using GraphQL[​](#request-scoping-when-using-graphql "Direct link to Request scoping when using GraphQL") The GraphQL module in NestJS uses `apollo-server-express` which enables `bodyparser` by default. ([source](https://github.com/mikro-orm/mikro-orm/issues/696#issuecomment-669846919)) As mentioned in "[RequestContext helper for DI containers](https://mikro-orm.io/docs/identity-map/#requestcontext-helper-for-di-containers)" this causes issues as the Middleware the NestJS MikroORM module installs needs to be loaded after `bodyparser`. At the same time make sure to disable body-parser in NestJs itself as well. This can be done by adding bodyparser to your main.ts file ``` import { NestFactory } from '@nestjs/core'; import express from 'express'; async function bootstrap() { const app = await NestFactory.create(AppModule,{ bodyParser: false }); app.use(express.json()); await app.listen(5555); } ``` And at the same time disabling the bodyparser in the GraphQL Module ``` @Module({ imports: [ GraphQLModule.forRoot({ bodyParserConfig: false, }), ], }) ``` ## App shutdown and cleanup[​](#app-shutdown-and-cleanup "Direct link to App shutdown and cleanup") By default, NestJS does not listen for system process termination signals (for example SIGTERM). Because of this, the MikroORM shutdown logic will never execute if the process is terminated, which could lead to database connections remaining open and consuming resources. To enable this, the `enableShutdownHooks` function needs to be called when starting up the application. ``` async function bootstrap() { const app = await NestFactory.create(AppModule); // Starts listening for shutdown hooks app.enableShutdownHooks(); await app.listen(3000); } ``` More information about [enableShutdownHooks](https://docs.nestjs.com/fundamentals/lifecycle-events#application-shutdown) ## Multiple Database Connections[​](#multiple-database-connections "Direct link to Multiple Database Connections") You can define multiple database connections by registering multiple `MikroOrmModule` and setting their `contextName`. If you want to use middleware request context you must disable automatic middleware and register `MikroOrmModule` with `forMiddleware()` or use NestJS `Injection Scope` ``` @Module({ imports: [ MikroOrmModule.forRoot({ contextName: 'db1', registerRequestContext: false, // disable automatic middleware ... }), MikroOrmModule.forRoot({ contextName: 'db2', registerRequestContext: false, // disable automatic middleware ... }), MikroOrmModule.forMiddleware() ], controllers: [AppController], providers: [AppService], }) export class AppModule {} ``` To access different `MikroORM`/`EntityManager` connections you have to use the new injection tokens `@InjectMikroORM()`/`@InjectEntityManager()` where you are required to pass the `contextName` in: ``` @Injectable() export class MyService { constructor(@InjectMikroORM('db1') private readonly orm1: MikroORM, @InjectMikroORM('db2') private readonly orm2: MikroORM, @InjectEntityManager('db1') private readonly em1: EntityManager, @InjectEntityManager('db2') private readonly em2: EntityManager) { } } ``` When defining your repositories with `forFeature()` method you will need to set which `contextName` you want it registered against: ``` // photo.module.ts @Module({ imports: [MikroOrmModule.forFeature([Photo], 'db1')], providers: [PhotoService], controllers: [PhotoController], }) export class PhotoModule {} ``` When using the `@InjectRepository` decorator you will also need to pass the `contextName` you want to get it from: ``` @Injectable() export class PhotoService { constructor( @InjectRepository(Photo, 'db1') private readonly photoRepository: EntityRepository ) {} // ... } ``` ## Serialization caveat[​](#serialization-caveat "Direct link to Serialization caveat") [NestJS built-in serialization](https://docs.nestjs.com/techniques/serialization) relies on [class-transformer](https://github.com/typestack/class-transformer). Since MikroORM wraps every single entity relation in a `Reference` or a `Collection` instance (for type-safety), this will make the built-in `ClassSerializerInterceptor` blind to any wrapped relations. In other words, if you return MikroORM entities from your HTTP or WebSocket handlers, all of their relations will NOT be serialized. Luckily, MikroORM provides a [serialization API](https://mikro-orm.io/docs/serializing) which can be used in lieu of `ClassSerializerInterceptor`. ``` @Entity() export class Book { @Property({ hidden: true }) // --> Equivalent of class-transformer's `@Exclude` hiddenField: number = Date.now(); @Property({ persist: false }) // --> Will only exist in memory (and will be serialized). Similar to class-transformer's `@Expose()` count?: number; @ManyToOne({ serializer: value => value.name, serializedName: 'authorName' }) // Equivalent of class-transformer's `@Transform()` author: Author; } ``` ## Testing[​](#testing "Direct link to Testing") The `@mikro-orm/nestjs` package exposes `getRepositoryToken()` function that returns prepared token based on a given entity to allow mocking the repository. > If we register the provider only via `getRepositoryToken()`, we need to use the `@InjectRepository` decorator. To be able to use custom repository without this decorator, we need to register it with `provide: PhotoRepository`. `provide`: ``` @Module({ providers: [ PhotoService, // required for `@InjectRepository` decorator { provide: getRepositoryToken(Photo), useValue: mockedRepository, }, // required for custom repositories if we don't want to use `@InjectRepository` { provide: PhotoRepository, useValue: mockedRepository, }, ], }) export class PhotoModule {} ``` ## Using `EventSubscriber`[​](#using-eventsubscriber "Direct link to using-eventsubscriber") Subscribers are normally registered only via the ORM config, but you can do so also dynamically via `EventManager.registerSubscriber()`. If you want your subscriber to use some dependencies from the Nest.js DI container, use the `@Injectable` decorator and register the subscriber manually in the constructor instead of passing it to the ORM config: ``` import { Injectable } from '@nestjs/common'; import { EntityName, EventArgs, EventSubscriber } from '@mikro-orm/core'; @Injectable() export class AuthorSubscriber implements EventSubscriber { constructor(em: EntityManager) { em.getEventManager().registerSubscriber(this); } getSubscribedEntities(): EntityName[] { return [Author]; } async afterCreate(args: EventArgs): Promise { // ... } async afterUpdate(args: EventArgs): Promise { // ... } } ``` ## GraphQL resolvers[​](#graphql-resolvers "Direct link to GraphQL resolvers") MikroORM supports [dataloaders](https://mikro-orm.io/docs/dataloaders.md) natively since v6 for `Reference.load()` and `Collection.load()` methods. ``` @Resolver(() => Book) class BookResolver { @ResolveField(() => Author) async author(@Parent() book: Book) { return book.author.load({ dataloader: true }); // can be also enabled globally } } ``` ## Example[​](#example "Direct link to Example") A real world example of NestJS with MikroORM can be found [here](https://github.com/mikro-orm/nestjs-realworld-example-app) --- # Source: https://mikro-orm.io/docs/usage-with-sql.md # Usage with MySQL, MariaDB, PostgreSQL or SQLite To use `mikro-orm` with MySQL database, install the `@mikro-orm/mysql` dependency and set the type option to `mysql` when initializing ORM. Since v4 it is no longer needed to install the `mysql2` package manually. * npm * Yarn * pnpm * Bun ``` # for mongodb npm install @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) npm install @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) npm install @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) npm install @mikro-orm/core @mikro-orm/postgresql # for sqlite npm install @mikro-orm/core @mikro-orm/sqlite # for better-sqlite npm install @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso npm install @mikro-orm/core @mikro-orm/libsql # for mssql npm install @mikro-orm/core @mikro-orm/mssql ``` ``` # for mongodb yarn add @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) yarn add @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) yarn add @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) yarn add @mikro-orm/core @mikro-orm/postgresql # for sqlite yarn add @mikro-orm/core @mikro-orm/sqlite # for better-sqlite yarn add @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso yarn add @mikro-orm/core @mikro-orm/libsql # for mssql yarn add @mikro-orm/core @mikro-orm/mssql ``` ``` # for mongodb pnpm add @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) pnpm add @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) pnpm add @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) pnpm add @mikro-orm/core @mikro-orm/postgresql # for sqlite pnpm add @mikro-orm/core @mikro-orm/sqlite # for better-sqlite pnpm add @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso pnpm add @mikro-orm/core @mikro-orm/libsql # for mssql pnpm add @mikro-orm/core @mikro-orm/mssql ``` ``` # for mongodb bun add @mikro-orm/core @mikro-orm/mongodb # for mysql (works with mariadb too) bun add @mikro-orm/core @mikro-orm/mysql # for mariadb (works with mysql too) bun add @mikro-orm/core @mikro-orm/mariadb # for postgresql (works with cockroachdb too) bun add @mikro-orm/core @mikro-orm/postgresql # for sqlite bun add @mikro-orm/core @mikro-orm/sqlite # for better-sqlite bun add @mikro-orm/core @mikro-orm/better-sqlite # for libsql/turso bun add @mikro-orm/core @mikro-orm/libsql # for mssql bun add @mikro-orm/core @mikro-orm/mssql ``` Then call `MikroORM.init` as part of bootstrapping your app: > To access driver specific methods like `em.createQueryBuilder()` you need to import the `MikroORM`/`EntityManager`/`EntityRepository` class from the driver package. Alternatively you can cast the `orm.em` to `EntityManager` exported from the driver package: > > ``` > import { EntityManager } from '@mikro-orm/postgresql'; > const em = orm.em as EntityManager; > const qb = em.createQueryBuilder(...); > ``` ``` import { MikroORM } from '@mikro-orm/postgresql'; // or any other SQL driver package const orm = await MikroORM.init({ entities: ['./dist/entities'], // path to your JS entities (dist), relative to `baseDir` dbName: 'my-db-name', }); console.log(orm.em); // access EntityManager via `em` property ``` ## Custom driver[​](#custom-driver "Direct link to Custom driver") If you want to use database that is not currently supported, you can implement your own driver. More information about how to create one can be [found here](https://mikro-orm.io/docs/custom-driver.md). Then provide the driver class via `driver` configuration option: ``` import { MyCustomDriver } from './MyCustomDriver.ts'; const orm = await MikroORM.init({ entities: [Author, Book, ...], dbName: 'my-db-name', driver: MyCustomDriver, // provide the class, not just its name }); ``` ## Schema[​](#schema "Direct link to Schema") Currently, you will need to maintain the database schema yourself. For initial dump, you can use [`SchemaGenerator` helper](https://mikro-orm.io/docs/schema-generator.md). ## ManyToMany collections with pivot tables[​](#manytomany-collections-with-pivot-tables "Direct link to ManyToMany collections with pivot tables") As opposed to `MongoDriver`, in MySQL we use pivot tables to handle `ManyToMany` relations: ``` CREATE TABLE `publisher_to_test` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `publisher_id` int(11) DEFAULT NULL, `test_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` You can adjust the name of pivot table via `pivotTable` option in `@ManyToMany` decorator defined on owning side: ``` // for unidirectional @ManyToMany({ entity: () => Test, owner: true, pivotTable: 'publisher2test' }) tests = new Collection(this); // for bidirectional @ManyToMany({ entity: () => BookTag, inversedBy: 'books', pivotTable: 'book2tag' }) tags = new Collection(this); ``` ## Using QueryBuilder to execute native SQL queries[​](#using-querybuilder-to-execute-native-sql-queries "Direct link to Using QueryBuilder to execute native SQL queries") When you need to execute some SQL query without all the ORM stuff involved, you can either compose the query yourself, or use the `QueryBuilder` helper to construct the query for you: ``` const qb = orm.em.createQueryBuilder(Author); qb.update({ name: 'test 123', type: PublisherType.GLOBAL }).where({ id: 123, type: PublisherType.LOCAL }); console.log(qb.getQuery()); // 'UPDATE `publisher2` SET `name` = ?, `type` = ? WHERE `id` = ? AND `type` = ?' console.log(qb.getParams()); // ['test 123', PublisherType.GLOBAL, 123, PublisherType.LOCAL] // run the query const res1 = await qb.execute(); // or run query without using QueryBuilder const driver = orm.em.getDriver(); const res2 = await driver.execute('SELECT ? + ?', [1, 2]); ``` `QueryBuilder` provides fluent interface with these methods: ``` QueryBuilder.select(fields: string | string[], distinct?: boolean): QueryBuilder; QueryBuilder.insert(data: any): QueryBuilder; QueryBuilder.update(data: any): QueryBuilder; QueryBuilder.delete(cond: any): QueryBuilder; QueryBuilder.count(fields: string | string[], distinct?: boolean): QueryBuilder; QueryBuilder.join(field: string, alias?: string): QueryBuilder; QueryBuilder.leftJoin(field: string, alias?: string): QueryBuilder; QueryBuilder.where(cond: any, operator: '$and' | '$or'): QueryBuilder; QueryBuilder.andWhere(cond: any): QueryBuilder; QueryBuilder.orWhere(cond: any): QueryBuilder; QueryBuilder.groupBy(fields: string | string[]): QueryBuilder; QueryBuilder.having(cond: any): QueryBuilder; QueryBuilder.populate(populate: string[]): QueryBuilder; QueryBuilder.limit(limit: number, offset?: number): QueryBuilder; QueryBuilder.offset(offset: number): QueryBuilder; QueryBuilder.getQuery(): string; QueryBuilder.getParams(): any; QueryBuilder.clone(): QueryBuilder; ``` For more examples of how to work with `QueryBuilder`, take a look at `QueryBuilder` tests in [`tests/QueryBuilder.test.ts`](https://github.com/mikro-orm/mikro-orm/blob/master/tests/QueryBuilder.test.ts). ## Transactions[​](#transactions "Direct link to Transactions") When you call `em.flush()`, all computed changes are queried [inside a database transaction](https://mikro-orm.io/docs/unit-of-work.md) by default, so you do not have to handle transactions manually. When you need to explicitly handle the transaction, you can use `em.transactional(cb)` to run callback in transaction. It will provide forked `EntityManager` as a parameter with clear isolated identity map - please use that to make changes. ``` // if an error occurs inside the callback, all db queries from inside the callback will be rolled back await orm.em.transactional(async (em: EntityManager) => { const god = new Author('God', 'hello@heaven.god'); await em.persist(god).flush(); }); ``` ## LIKE Queries[​](#like-queries "Direct link to LIKE Queries") SQL supports LIKE queries via native JS regular expressions: ``` const author1 = new Author2('Author 1', 'a1@example.com'); const author2 = new Author2('Author 2', 'a2@example.com'); const author3 = new Author2('Author 3', 'a3@example.com'); await orm.em.persist([author1, author2, author3]).flush(); // finds authors with email like '%exa%le.c_m' const authors = await orm.em.find(Author2, { email: /exa.*le\.c.m$/ }); console.log(authors); // all 3 authors found ``` ## Native Collection Methods[​](#native-collection-methods "Direct link to Native Collection Methods") Sometimes you need to perform some bulk operation, or you just want to populate your database with initial fixtures. Using ORM for such operations can bring unnecessary boilerplate code. In this case, you can use one of `insert/nativeUpdate/nativeDelete` methods: ``` em.insert(entityName: string, data: any): Promise; em.nativeUpdate(entityName: string, where: FilterQuery, data: any): Promise; em.nativeDelete(entityName: string, where: FilterQuery | any): Promise; ``` Those methods execute native SQL queries generated via `QueryBuilder` based on entity metadata. Keep in mind that they do not hydrate results to entities, and they do not trigger lifecycle hooks. They are also available as `EntityRepository` shortcuts: ``` EntityRepository.insert(data: any): Promise; EntityRepository.nativeUpdate(where: FilterQuery, data: any): Promise; EntityRepository.nativeDelete(where: FilterQuery | any): Promise; ``` Additionally, there is `execute()` method that supports executing raw SQL queries or `QueryBuilder` instances. To create `QueryBuilder`, you can use `createQueryBuilder()` factory method on both `EntityManager` and `EntityRepository` classes: ``` const qb = em.createQueryBuilder('Author'); qb.select('*').where({ id: { $in: [...] } }); const res = await em.getDriver().execute(qb); console.log(res); // unprocessed result of underlying database driver ``` ## Using SQLite extensions[​](#using-sqlite-extensions "Direct link to Using SQLite extensions") SQLite extensions like [sqlean](https://github.com/nalgeon/sqlean) can add many useful features that are notably missing by default (e.g. regexp). Once you've downloaded the binaries for the extensions you wish to use, they can be added by providing a `pool.afterCreate` handler in the SQLite initialization options. The handler should call `loadExtension` on the underlying database connection, passing the path to the extension binary: ``` const orm = await MikroORM.init({ // ... pool: { afterCreate: (conn: any, done: any) => { conn.loadExtension('/.../sqlean-macos-arm64/sqlean'); done(null, conn); }, }, }); ``` ## Using Turso database[​](#using-turso-database "Direct link to Using Turso database") To be able to connect to a remote [Turso](https://docs.turso.tech/introduction) database, you need to use the `@mikro-orm/libsql` driver. Use the `password` option to set the `authToken`. ``` import { defineConfig } from '@mikro-orm/libsql'; export default defineConfig({ dbName: process.env.LIBSQL_URL, password: process.env.LIBSQL_AUTH_TOKEN, }); ``` To set the additional options like `syncUrl` or `syncPeriod`, use the `driverOptions.connection`: ``` import { defineConfig } from '@mikro-orm/libsql'; export default defineConfig({ dbName: 'local.db', password: process.env.LIBSQL_AUTH_TOKEN, driverOptions: { connection: { syncUrl: process.env.LIBSQL_URL, syncPeriod: 0.5, // 500ms }, }, }); ``` ## MS SQL Server limitations[​](#ms-sql-server-limitations "Direct link to MS SQL Server limitations") * UUID values are returned in upper case * cycles in cascade paths are not supported * schema diffing capabilities are limited * no native support for fulltext search * upsert support is limited --- # Source: https://mikro-orm.io/docs/usage-with-transpilers.md # Usage with transpilers ## Babel[​](#babel "Direct link to Babel") When compiling TS via babel, decorators are by default handled different implementation than what `tsc` uses. To make the metadata extraction from decorators via Babel work, we need to do use following plugins: ``` { "plugins": [ "babel-plugin-transform-typescript-metadata", ["@babel/plugin-proposal-decorators", { "legacy": true }], ["@babel/plugin-proposal-class-properties", { "loose": true }] ] } ``` > Make sure to install the plugins first: `yarn add -D babel-plugin-transform-typescript-metadata @babel/plugin-proposal-decorators @babel/plugin-proposal-class-properties` Lastly we need to set the `BABEL_DECORATORS_COMPAT` environment variable to `true` to adjust the return value of decorators. More information about this topic can be found here: * * ## SWC[​](#swc "Direct link to SWC") When compiling TS via SWC, decorator metadata is not emitted by default, regardless of what you may have specified in `tsconfig.json`. In addition, class names are mangled by default when the target is "es5" which is SWC's default. This causes problems when the name of a table is inferred from the class name, as opposed to being explicitly specified as a decorator option. Telling SWC to preserve the class names in turn requires a target of "es2016" or higher. For the best overall performance, and because MikroORM is ultimately running on a server, you may want to set the target to "esnext". That way, SWC does the fewest transformations possible and produces the most modern code possible. So, to make the metadata extraction from decorators and class name preservation via SWC work correctly, we need the following config in our `.swcrc` file: ``` { "jsc": { "parser": { "syntax": "typescript", "decorators": true }, "transform": { "decoratorMetadata": true, "legacyDecorator": true }, "target": "esnext", "minify": false } } ``` If you'd like to enable minification, you may also need to set `jsc.keepClassNames` to `true`, as well as the equivalent "mangle" and "compress" options to preserve class names. More information about this topic can be found here: * * * * --- # Source: https://mikro-orm.io/docs/using-bigint-pks.md # Using native BigInt PKs (MySQL and PostgreSQL) Since v6, `bigint`s are represented by the native `BigInt` type, and as such, they don't require explicit type in the decorator options: ``` @PrimaryKey() id: bigint; ``` You can also specify the target type you want your bigints to be mapped to: ``` @PrimaryKey({ type: new BigIntType('bigint') }) id1: bigint; @PrimaryKey({ type: new BigIntType('string') }) id2: string; @PrimaryKey({ type: new BigIntType('number') }) id3: number; ``` > JavaScript cannot represent all the possible values of a `bigint` when mapping to the `number` type - only values up to `Number.MAX_SAFE_INTEGER` (2^53 - 1) are safely supported. --- # Source: https://mikro-orm.io/versions.md [Skip to main content](#__docusaurus_skipToContent_fallback) ⭐️ If you like MikroORM, give it a star on [GitHub](https://github.com/mikro-orm/mikro-orm) and consider [sponsoring](https://github.com/sponsors/mikro-orm) its development! ⭐️ [![MikroORM](/img/logo.svg)![MikroORM](/img/logo.svg)](https://mikro-orm.io/index.md) [****](https://mikro-orm.io/index.md) [6.6](https://mikro-orm.io/docs/quick-start.md) * [7.0 (next)](https://mikro-orm.io/docs/next/quick-start) * [6.6](https://mikro-orm.io/docs/quick-start.md) * [5.9](https://mikro-orm.io/docs/5.9/installation) [Docs](https://mikro-orm.io/docs/quick-start.md)[API](https://mikro-orm.io/api.md)[FAQ](https://mikro-orm.io/docs/faq.md)[Blog](https://mikro-orm.io/blog.md)[Changelog](https://mikro-orm.io/api/core/changelog.md) [latest: v6.6.4](https://mikro-orm.io/versions.md)[Discord](https://discord.gg/w8bjxFHS7X "Chat on Discord")[GitHub](https://github.com/mikro-orm/mikro-orm "View on GitHub")[Twitter](https://twitter.com/MikroORM "Twitter") Search # MikroORM documentation versions ### Latest version (Stable) Here you can find the latest documentation. | 6.6.4 | [Documentation](https://mikro-orm.io/docs/quick-start.md) | [Release Notes](https://github.com/mikro-orm/mikro-orm/releases/tag/v6.6.4) | | ----- | --------------------------------------------------------- | --------------------------------------------------------------------------- | ### Next version (Unreleased) Here you can find the documentation for unreleased version. | master | [Documentation](https://mikro-orm.io/docs/next/quick-start) | [Source Code](https://github.com/mikro-orm/mikro-orm) | | ------ | ----------------------------------------------------------- | ----------------------------------------------------- | ### Past Versions Here you can find documentation for previous versions of MikroORM. | 5.9 | [Documentation](https://mikro-orm.io/docs/5.9/installation) | [Release Notes](https://github.com/mikro-orm/mikro-orm/releases/tag/v5.9.0) | | --- | ----------------------------------------------------------- | --------------------------------------------------------------------------- | #### Docs * [Quick Start](https://mikro-orm.io/docs/quick-start.md) * [Getting Started](https://mikro-orm.io/docs/guide.md) * [Migration from v5 to v6](https://mikro-orm.io/docs/upgrading-v5-to-v6.md) * [Version 5.9 docs](https://mikro-orm.io/docs/5.9/installation) #### Community * [Discord](https://discord.gg/w8bjxFHS7X) * [Slack](https://join.slack.com/t/mikroorm/shared_invite/enQtNTM1ODYzMzM4MDk3LWM4ZDExMjU5ZDhmNjA2MmM3MWMwZmExNjhhNDdiYTMwNWM0MGY5ZTE3ZjkyZTMzOWExNDgyYmMzNDE1NDI5NjA) * [Stack Overflow](https://stackoverflow.com/questions/ask?tags=mikro-orm) #### Social * [Blog](https://mikro-orm.io/blog.md) * [Twitter](https://twitter.com/MikroORM) * [GitHub](https://github.com/mikro-orm/mikro-orm) * [Sponsor B4nan](https://ghbtns.com/github-btn.html?user=mikro-orm\&type=sponsor) ![MikroORM](/img/logo-header.svg) Copyright © 2018-2026 Martin Adámek. Built with Docusaurus. Icons made by [surang](https://www.flaticon.com/authors/surang "surang") and [Skyclick](https://www.flaticon.com/authors/skyclick "Skyclick"). --- # Source: https://mikro-orm.io/docs/virtual-entities.md # Virtual Entities Virtual entities don't represent any database table. Instead, they dynamically resolve to an SQL query (or an aggregation in MongoDB), allowing to map any kind of results onto an entity. Such entities are meant for read purposes, they don't have a primary key and therefore cannot be tracked for changes. In a way they are similar to (currently unsupported) database views, and you can use them to proxy your native views already. > Virtual entities can contain scalar properties as well as to-one relations (M:1 and 1:1 owners). Such relations are always populated via `select-in` strategy. To define a virtual entity, provide an `expression`, either as a string (SQL query): > You need to use the virtual column names based on current naming strategy. Note the `authorName` property being represented as `author_name` column. * reflect-metadata * ts-morph * defineEntity * EntitySchema ./entities/BookWithAuthor.ts ``` @Entity({ expression: ` select b.title, a.name as author_name, ( select group_concat(distinct t.name) from book b join tags_ordered bt on bt.book_id = b.id join book_tag t on t.id = bt.book_tag_id where b.author_id = a.id group by b.author_id ) as tags from author a group by a.id ` }) export class BookWithAuthor { @Property() title!: string; @Property() authorName!: string; @Property() tags!: string[]; } ``` ./entities/BookWithAuthor.ts ``` @Entity({ expression: ` select b.title, a.name as author_name, ( select group_concat(distinct t.name) from book b join tags_ordered bt on bt.book_id = b.id join book_tag t on t.id = bt.book_tag_id where b.author_id = a.id group by b.author_id ) as tags from author a group by a.id ` }) export class BookWithAuthor { @Property() title!: string; @Property() authorName!: string; @Property() tags!: string[]; } ``` ./entities/BookWithAuthor.ts ``` import { type InferEntity, defineEntity } from '@mikro-orm/core'; export const BookWithAuthor = defineEntity({ name: 'BookWithAuthor', expression: ` select b.title, a.name as author_name, ( select group_concat(distinct t.name) from book b join tags_ordered bt on bt.book_id = b.id join book_tag t on t.id = bt.book_tag_id where b.author_id = a.id group by b.author_id ) as tags from author a group by a.id `, properties: p => ({ title: p.string(), authorName: p.string(), tags: p.type('string[]').$type(), }), }); export interface IBookWithAuthor extends InferEntity {} ``` ./entities/BookWithAuthor.ts ``` export interface IBookWithAuthor{ title: string; authorName: string; tags: string[]; } export const BookWithAuthor = new EntitySchema({ name: 'BookWithAuthor', expression: ` select b.title, a.name as author_name, ( select group_concat(distinct t.name) from book b join tags_ordered bt on bt.book_id = b.id join book_tag t on t.id = bt.book_tag_id where b.author_id = a.id group by b.author_id ) as tags from author a group by a.id `, properties: { title: { type: 'string' }, authorName: { type: 'string' }, tags: { type: 'string[]' }, }, }); ``` Or as a callback: * reflect-metadata * ts-morph * defineEntity * EntitySchema ./entities/BookWithAuthor.ts ``` @Entity({ expression: (em: EntityManager) => { return em.createQueryBuilder(Book, 'b') .select(['b.title', 'a.name as author_name', 'group_concat(t.name) as tags']) .join('b.author', 'a') .join('b.tags', 't') .groupBy('b.id'); }, }) export class BookWithAuthor { @Property() title!: string; @Property() authorName!: string; @Property() tags!: string[]; } ``` ./entities/BookWithAuthor.ts ``` @Entity({ expression: (em: EntityManager) => { return em.createQueryBuilder(Book, 'b') .select(['b.title', 'a.name as author_name', 'group_concat(t.name) as tags']) .join('b.author', 'a') .join('b.tags', 't') .groupBy('b.id'); }, }) export class BookWithAuthor { @Property() title!: string; @Property() authorName!: string; @Property() tags!: string[]; } ``` ./entities/BookWithAuthor.ts ``` export const BookWithAuthor = defineEntity({ name: 'BookWithAuthor', expression: (em: EntityManager) => { return em.createQueryBuilder(Book, 'b') .select(['b.title', 'a.name as author_name', 'group_concat(t.name) as tags']) .join('b.author', 'a') .join('b.tags', 't') .groupBy('b.id'); }, properties: p => ({ title: p.string(), authorName: p.string(), tags: p.type('string[]').$type(), }), }); ``` ./entities/BookWithAuthor.ts ``` export interface IBookWithAuthor{ title: string; authorName: string; tags: string[]; } export const BookWithAuthor = new EntitySchema({ name: 'BookWithAuthor', expression: (em: EntityManager) => { return em.createQueryBuilder(Book, 'b') .select(['b.title', 'a.name as author_name', 'group_concat(t.name) as tags']) .join('b.author', 'a') .join('b.tags', 't') .groupBy('b.id'); }, properties: { title: { type: 'string' }, authorName: { type: 'string' }, tags: { type: 'string[]' }, }, }); ``` In MongoDB, you can use aggregations, although it is not very ergonomic due to their nature. Following example is a rough equivalent of the previous SQL ones. > The `where` query as well as the options like `orderBy`, `limit` and `offset` needs to be explicitly handled in your pipeline. ``` @Entity({ expression: (em: EntityManager, where, options) => { const $sort = { ...options.orderBy } as Dictionary; $sort._id = 1; const pipeline: Dictionary[] = [ { $project: { _id: 0, title: 1, author: 1 } }, { $sort }, { $match: where ?? {} }, { $lookup: { from: 'author', localField: 'author', foreignField: '_id', as: 'author', pipeline: [{ $project: { name: 1 } }] } }, { $unwind: '$author' }, { $set: { authorName: '$author.name' } }, { $unset: ['author'] }, ]; if (options.offset != null) { pipeline.push({ $skip: options.offset }); } if (options.limit != null) { pipeline.push({ $limit: options.limit }); } return em.aggregate(Book, pipeline); }, }) export class BookWithAuthor { @Property() title!: string; @Property() authorName!: string; } ``` --- # Source: https://mikro-orm.io/api/core/function/wrap.md # wrap wraps entity type with WrappedEntity internal properties and helpers like init/isInitialized/populated/toJSON use `preferHelper = true` to have access to the internal `__` properties like `__meta` or `__em` ### Callable * ****wrap**\(entity, preferHelper): IWrappedEntityInternal\ * ****wrap**\(entity, preferHelper): [IWrappedEntity](https://mikro-orm.io/api/core/interface/IWrappedEntity.md)\ *** * returns WrappedEntity instance associated with this entity. This includes all the internal properties like `__meta` or `__em`. *** #### Parameters * ##### entity: T * ##### preferHelper: true #### Returns IWrappedEntityInternal\