@mikro-orm/mssql
7.2.11 · 20 Nov 2026MIT288.7k / weekRepositoryHomepagenpmAtom feed
7.2.11 is the newest release of 7.x.
In short
1 removed49 new8 faster63 fixed2 internal
- Removed
seeder: remove
tinyglobbydependency, addseedersListoption
Release note
Release blogpost: mikro-orm.io/blog/mikro-orm-7-released
Upgrading guide: mikro-orm.io/docs/upgrading-v6-to-v7
Features
Add JSR publishing support
Change default
loadStrategytobalancedcli: support various TS loaders
core: add
$sizecollection operatorcore: add
collationsupport and MongoDB query optionscore: add
EntityNamesymbol for decorator-based Kysely type inferencecore: add
EntitySchema.newhelper to create entity instancescore: add
forceObjectoption todefineEntitycore: add
populateHintsoption toFindOptionsfor per-relation populate overridescore: add entity-level default
orderByoptioncore: add slow query logging support (#7271) (13b97f5), closes #4695
core: add support for polymorphic relations
core: add support for streaming
core: add support for Table-Per-Type inheritance
core: add support for view entities
core: add WHERE clause support to upsert via
onConflictWhereoptioncore: allow reusing raw query fragments
core: execute transaction events on child transactions
core: improve formula callback to provide more information about the table and column mapping
core: improve type safety of various decorators
core: move file discovery to separate file
core: propagate persist stack in
em.transactionalforkcore: support FKs pointing to non-PK columns via
targetKeyoptioncore: support null values in cursor-based pagination
core: support pre-compiled functions for eval-free runtimes
core: validate dangerous property names
decorators: introduce
@mikro-orm/decoratorspackage with legacy and ES decorator definitionsdefineEntity: allow extending generated class with custom methods
entity-generator: add
manyToManyPropertyNametoNamingStrategykysely: add
MikroKyselyPluginto support various ORM features with kyselymigrations: remove umzug dependency, improve bundler support
oracle: add Oracle DB driver
postgres: add support for materialized views
query-builder: add support for common table expressions (CTE)
schema: add native support for advanced index features
schema: allow changing defaults for
update/deleteRuleand remove inference fromcascadeoptionschema: allow skipping views
- Removed
seeder: remove
tinyglobbydependency, addseedersListoption sql: add
$elemMatchoperator for JSON array propertiessql: improve
QueryBuildertype safety with context-aware typessql: infer Database for kysely
sql: replace knex with kysely
sql: replace knex with native implementation of query and schema building
sql: strictly type
SelectQueryBuilder.execute()return typesql: support aliasing formula and regular properties in
QueryBuilderselectsql: support UNION-based where clauses as index-friendly alternative to
$orsql: transparent querying of embedded array properties (#7264) (c9f13bb), closes #1887
sqlite: add
ATTACH DATABASEsupport for multiple database filessqlite: enable down migrations
sqlite: simplify using other sqlite libraries like
node:sqlite
Bug Fixes
core: allow using property accessor on to-one relations (621d10a), closes #7211
core: always check the database when querying by PK with filters (8bd62b2), closes #7084
core: do not convert custom types in
em.refresh(3f8abdf), closes #7073core: do not propagate cursor related options to populate queries (e667290), closes #7148
core: duplicate discovery of embeddables with defineEntity
core: enable
forceUtcTimezoneby default for all SQL drivers (#7087) (c89890b), closes #5591core: ensure
populatehint won't includeundefinedfor optional relationscore: ensure column name conflicts in M:N are propagated to STI child entities (562515c), closes #7123
core: ensure no collisions in polymorphic embeddables with shadowed properties
core: ensure owning FK is selected for to-many inverse sides
core: fix applying filters on nested relation conditions
core: fix double processing of JSON properties when reloading an entity
core: fix enum arrays with
defineEntityfailing on metadata validationcore: fix findOne with entity refs for composite PKs with shared FK columns (b8a39e2), closes #5629
core: fix processing filters on to-many relations
core: fix result caching for custom types (10a4044), closes #7112
core: improve handling of deeply nested composite keys in
em.create(28261a0), closes #6894core: improve intellisense for partial loading in
em.populatecore: make entity prototype
toJSONnon-enumerable to prevent data leakscore: map arrays inside object embeddables to JSON arrays by default
core: normalize
populateoption inCollection.matching()for M:N relationscore: only respect
Hiddentype on scalar properties (#7097) (36372a2), closes #7062core: preserve embeddable properties in
toPOJOregardless of partial loading hintscore: preserve function expression indexes through metadata cache round-trip
core: prevent double JSON-encoding of nested embeddable arrays
core: prevent property mutation during polymorphic embeddable discovery (#7270) (c3a5978), closes #6522
core: respect
excludehint in implicit serialization viatoObjectcore: respect
excludeoption on eager propertiescore: respect
orphanRemovalon 1:1 relations when inverse side is a PKcore: respect custom repositories with
InferEntitycore: respect EM schema when joining a wildcard entity from a static schema entity (69ca26c), closes #7082
core: respect explicit
tableNamewhen computing join table namescore: respect loaded hint for
Refrelations inside array embeddablescore: support overlapping properties with different field names in STI (5d83d0f), closes #5813
core: support querying by all keys of discriminated union types (21b7a80), closes #7111
core: support schema parameter in formula query when using QB with partial loading
core: support wildcard
wrap(e).populate()hints on type levelcore: use full hydration in
mergeDatafor initialized entities (32a0baa), closes #7205core: use less strict
repositoryoption type to fix issues withdefineEntityand cyclesdefineEntity: fix inference issues in
hooksdefinitionentity-generator: strip schema prefix from FK property names
Guard prototype.toJSON against being called on prototype itself (#7152) (0392156), closes #7151
migrations: delete snapshot file after
migration:downmigrations: normalize snapshots and write on both up/down
migrations: skip snapshot write on
migration:upto support read-only filesystemsmigrations: support emitting multiline comments
mongo: fix field name conversion when querying object embedded entities
mongo: fix support for deno by handling
TypedArraywhen cloningmongo: rework support for serialized primary keys
postgres: fix phantom diffs for complex check constraints
postres: fix casting of object embedded relation properties
query-builder: apply
WHEREconditions toORDER BYjoins in paginated queries (128e58b), closes #6160schema: disable FK checks by default only for
orm.schema.clear()in MySQLschema: do not ignore changes to entity level comments (4087704), closes #7187
schema: do not infer nullability of to-one relations based on
cascadeoption (56be7f3), closes #6972sql: always alias virtual properties in where query (37f35af), closes #7196
sql: cross-schema JOINs no longer inherit main entity's schema
sql: fix populating M:N relations with
pivotEntitythat usesmapToPk: true(cdd8f85), closes #7107sql: handle $not operator inside relation filters
sql: ignore missing tables during schema clear
sql: qualify cross-schema FK references with
dbNameon MySQL/MariaDBsql: skip pagination subquery and force balanced strategy for virtual entities (e2c1287), closes #7195
sti: ensure stable order in the generated discriminator map (b51d6fd), closes #6455
Performance Improvements
core: improve
defineEntitytype performancecore: improve
InferEntityperformance whenextendsis usedcore: improve
Loadedtype performance by optimizing field selectioncore: improve inference via
InferEntitytypecore: optimize
AutoPathandLoadedtype instantiation costscore: optimize
em.assigntypingcore: optimize type instantiation costs with structural shapes
core: rework auto-flush detection to rely on explicit
em.persistcalls
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.