@mikro-orm/mysql
7.2.11 · 20 Nov 2026MIT388.9k / weekRepositoryHomepagenpmAtom feed
251 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
6.6.15
17 Jun 2026core: avoid stack overflow in IdentityMap.keys()/values() for large maps
Bug Fixes
core: avoid crash on STI subclass narrowing an inverse collection (#7868) (49d73a5), closes #7636 #7867
core: avoid stack overflow in IdentityMap.keys()/values() for large maps
core: preserve sibling conditions next to
$and/$oron relation filters (#7791) (5c5e4c9), closes #7790core: reload suppressed entities from partially-suppressed upsertMany (#7780) (65e1967), closes #7779 #7775
knex: resolve target entity schema in nested collection operators (#7898) (6040aa1), closes #7895 #7894
6.6.14
4 May 2026core: avoid crash on STI subclass @ManyToOne override targeting same hierarchy (#7646) (1df1632), closes #7599 #7598
core: escape embedded quote characters in quoteIdentifier
Bug Fixes
core: avoid crash on STI subclass @ManyToOne override targeting same hierarchy (#7646) (1df1632), closes #7599 #7598
core: drop entity from persist/remove stacks in uow.unsetIdentity() (#7661) (8bc4c77), closes #7639
core: escape embedded quote characters in quoteIdentifier
core: escape JSON path keys in getSearchJsonPropertyKey
core: merge nested fields paths into explicit populate (#7664) (f73568a), closes #7605
core: recognize TypeScript's __esDecorate helper in decorator path lookup (#7665) (3b53296), closes #7584 #7583
core: respect hidden flag with populate: ['*'] in serialize() (#7660) (752c108), closes #7637
core: skip getter-only properties in assignDefaultValues (#7659) (ff65622), closes #7575
postgres: schema-qualify generated drop index statements (#7662) (d588a02), closes #7603
postgres: treat timetz / time with time zone as aliases in schema diff (#7663) (686d2f8), closes #7618
6.6.13
10 Apr 2026Bug Fixes
core: guard prototype-installed methods and accessors against
this === prototype(#7512) (62928f1), closes #7508 #7151 #7151core: resolve EntityIdentifier in composite FK with shared join columns (#7478) (dcf89d7), closes #7477
core: skip composite PK inlining when operator value is an array (#7525) (030d82b), closes #7524
core: skip inverse collections when deduplicating ownColumns (#7505) (132a8d2), closes #7504 #7492
core: skip overwriting loaded entities with uninitialized references during transaction merge (#7532) (7ab9769), closes #7531 #7528
core: skip shared join columns with null value in mapDataToFieldNames (#7492) (eaa2712), closes #7490
6.6.12
1 Apr 2026Bug Fixes
core: recursively nullify nested inline embeddable columns when parent is null (#7465) (a711523), closes #6966 #7463
core: skip FK nullification on orphan removal when FK is part of PK (#7461) (7cc10c0), closes #7439 #7436
knex: use pivot entity schema for wildcard check in M:N joins (#7467) (795d62b), closes #7466
migrations: save transaction ref before prefix() deletes it from options (#7443) (586f5b9), closes #7424
6.6.11
31 Mar 2026core: prevent incorrect nullification of 1:1 inverse relations during joined loading
knex: allow contextual type inference for
raw()with string inputs
Bug Fixes
core: fire orphan removal for OneToOne replacement when inverse already set (#7439) (674efd0), closes #7436
core: prevent incorrect nullification of 1:1 inverse relations during joined loading
knex: allow contextual type inference for
raw()with string inputssql: pass transaction context through schema introspection to avoid deadlock (#7431) (03bd640), closes #7426 #7424
6.6.10
26 Mar 2026- Security
core: prevent prototype pollution in
Utils.merge core: tighten query construction validation
Bug Fixes
6.6.9
5 Mar 2026core: make entity prototype
toJSONnon-enumerable to prevent data leaks
Bug Fixes
core: fix findOne with entity refs for composite PKs with shared FK columns (6f95f72), closes #5629
core: make entity prototype
toJSONnon-enumerable to prevent data leakscore: prevent double JSON-encoding of nested embeddable arrays (309b278), closes #7233
migrations: normalize snapshots and write on both up/down (#7236) (a07aca6), closes #7234
migrations: skip snapshot write on
migration:upto support read-only filesystems (c8584e8), closes #7232mysql: fix
table.bigincrements()producingintinstead ofbigint(5660607), closes #7246
6.6.8
1 Mar 2026core: fix double processing of JSON properties when reloading an entity
core: preserve embeddable properties in
toPOJOregardless of partial loading hints
Bug Fixes
core: allow using property accessor on to-one relations (06978c9), closes #7211
core: fix double processing of JSON properties when reloading an entity
core: preserve embeddable properties in
toPOJOregardless of partial loading hintscore: preserve function expression indexes through metadata cache round-trip (#7229) (9ae8d20), closes #7238
core: use full hydration in
mergeDatafor initialized entities (5529308), closes #7205knex: handle $not operator inside relation filters (#7227) (d0dac2f), closes #7226
migrations: delete snapshot file after
migration:down(dfcc8c6), closes #7210postgres: fix phantom diffs for check constraints
6.6.7
15 Feb 2026core: ignore empty conditions produced by filters
Bug Fixes
core: do not propagate cursor related options to populate queries (e6b9a6a), closes #7148
core: ignore empty conditions produced by filters
Guard prototype.toJSON against being called on prototype itself (#7152) (fa5290e), closes #7151
migrations: support emitting multiline queries (fcf360a), closes #7185
schema: do not ignore changes to entity level comments (b421c9d), closes #7187
sql: always alias virtual properties in where query (2f7492d), closes #7196
sql: skip pagination subquery and force balanced strategy for virtual entities (260a2e0), closes #7195
Features
core: add WHERE clause support to upsert via
onConflictWhereoption
6.6.6
30 Jan 2026core: ensure no collisions in polymorphic embeddables with shadowed properties
Bug Fixes
core: ensure column name conflicts in M:N are propagated to STI child entities (5be76ae), closes #7123
core: ensure no collisions in polymorphic embeddables with shadowed properties
core: fix result caching for custom types (b0ed700), closes #7112
core: respect
excludeoption on eager propertiescore: support schema parameter in formula query when using QB with partial loading (30b37f7), closes #7102
core: use less strict
repositoryoption type to fix issues withdefineEntityand cycles
6.6.5
21 Jan 2026core: ensure
populatehint won't includeundefinedfor optional relations
Bug Fixes
core: always check the database when querying by PK with filters (bd44c82), closes #7084
core: ensure
populatehint won't includeundefinedfor optional relationscore: improve handling of deeply nested composite keys in
em.create(8caae8f), closes #6894core: normalize
populateoption inCollection.matching()for M:N relationscore: support overlapping properties with different field names in STI (badbc00), closes #5813
sql: fix populating M:N relations with
pivotEntitythat usesmapToPk: true(0ab55fe), closes #7107
Features
6.6.4
14 Jan 2026core: fix applying filters on nested relation conditions
core: fix processing filters on to-many relations
Bug Fixes
core: do not convert custom types in
em.refresh(143a4ed), closes #7073core: fix applying filters on nested relation conditions
core: fix processing filters on to-many relations
core: respect
orphanRemovalon 1:1 relations when inverse side is a PKcore: support wildcard
wrap(e).populate()hints on type levelmongo: fix field name conversion when querying object embedded entities
postres: fix casting of object embedded relation properties
6.6.3
4 Jan 2026core: don't reset entity identifiers when using
assignon entity referencescore: handle custom types properly in
em.refresh
Bug Fixes
core: do not connect to database when calling
orm.close()(79cabd7), closes #7041core: don't reset entity identifiers when using
assignon entity referencescore: handle custom types properly in
em.refreshdefineEntity: avoid circular type inference in meta
query-builder: do not reset schema when creating subquery for collection operators (4f4ea6d), closes #7053
schema: ensure
SchemaGeneratorrespectsskipTablesoption when diffing a schema
6.6.2
7 Dec 2025Reading the note…
6.6.1
25 Nov 2025Reading the note…
6.6.0
11 Nov 2025Bug Fixes
core: do not ignore updating the whole inlined embedded property to
null(d0913f1), closes #6966core: ensure base properties in STI entities won't be ignored when overridden in one child (b31ffec), closes #6957
core: ensure original entity data are in correct shape after merging (7a30cca), closes #6951
core: rehydrate nullable to-one properties that were discarded via filters with select-in strategy (3d58538), closes #6460
core: support falsy values in scalar references
core: support type detection on classes with dots in their names like
Temporal.Instant(8cca4a8), closes #6953postgres: allow executing schema queries via knex in migrations (5196f24), closes #6949
reflection: support string literal properties
Features
core: allow control over relation filters in entity definition (#6959) (28a7e44), closes #6457
core: allow defining filters on nullable relations as strict (#6952) (1dae6cf), closes #6784 #6943 #6784
core: allow disabling filters on relations (7798e57), closes #6457
core: support private properties with get/set accessors (#6967) (659ca93), closes #6932
entity-generator: allow generating enums as type or JS dictionary (#6956) (ccf24df), closes #6457
entity-generator: support generating
defineEntity()definitionsentity-generator: support native postgres enums
knex: reexport
rawhelper that supportsQueryBuilderandKnex.QueryBuilder(#6955) (897cc7f), closes #6751 #6782postgres: skip left joined relations from pessimistic locks automatically (ffb71a1), closes #6412
6.5.9
23 Oct 2025Reading the note…
6.5.8
13 Oct 2025Reading the note…
6.5.7
6 Oct 2025Reading the note…
6.5.6
25 Sep 2025Reading the note…
6.5.5
21 Sep 2025Reading the note…
6.5.4
17 Sep 2025Reading the note…
6.5.3
13 Sep 2025Reading the note…
6.5.2
2 Sep 2025Reading the note…
6.5.1
27 Aug 2025Reading the note…
6.5.0
27 Aug 2025mikro-orm.io/blog/mikro-orm-6-5-released
Bug Fixes
core: allow querying embeddables for
nullvalues via collection operators (d7b25a7), closes #6736core: do not fail version mismatch checks when getting the current version fails (086d767), closes #6765
core: do not propagate changes to collections when partially loaded (7068b35), closes #6732 #6734
core: ensure
em.transactionalcontext propagation won't result in breaking identity map (2b608fc), closes #6764core: ensure correct runtime value of
decimalandfloatproperties (#6807) (7cd8b1c), closes #6806 #6806core: fix extra updates after
em.refreshon nested entities with embeddables (640985c), closes #6705core: fix fetching of autoincrement PK when upserting without a unique value (0dccac7), closes #6755
core: fix hydration with select-in strategy and PKs with custom types (#6808) (4770462), closes #6726
core: fix querying by a nested FK as PK
core: hydrate persisted getters without setters unless explicitly disabled (459329a), closes #6723
core: ignore properties with
hydrate: falsefrom change tracking (4a6fb9b), closes #6723core: improve detection of empty flush
core: respect joined filters in
em.count(323ffef), closes #6666core: respect logger context in queries from
flushand others (#6777) (083a1ee), closes #6776core: support cursor based pagination with
ScalarReferenceproperties (84d20b1), closes #6793core: use
defaultfor missing values in multi insert for custom types (eae635f), closes #6727postgres: quote string array values with
''instead of\'postgres: support
primary keywith generated identity columns (382d5b3), closes #6693query-builder: fix
qb.leftJoinAndSelectwith a subquery on M:N relationsquery-builder: fix hydrating 1:1 inverse side via joined strategy
query-builder: support group operators inside join conditions (#6796) (efe5a56), closes #6795
reflection: unwrap
runtimeTypeto support correct hydration of scalar references (ff6a7ae), closes #5557reflection: unwrap
ScalarRef<T>andEntityRef<T>type (6b1a349), closes #5557schema: properly handle array defaults in mysql (#6703) (534193c), closes #6688
sql: correctly handle lazy scalar properties with custom types
sql: fix computing
order byclause when ordering by a not populated relation (b8a7984), closes #6757
Features
core: add
balancedloading strategy (#6787) (a7bff86), closes #6129core: add
loadOrFailtoScalarReferencewrappercore: add
RequiredNullablehelper type (#6756) (71f5153), closes 6744core: add comprehensive transaction propagation support (#6802) (19ebac4), closes #6788
core: allow defining entities with inferred interfaces (#6253) (1e6961a), closes #6242
core: allow triggering
onCreatehooks duringem.createcore: support
contextNamein@Transactionaldecoratorschema: allow disabling foreign key constraint creation, per relation (#6702) (79e6cb0), closes 2548
schema: allow wilcard-schema friendly index expression (#6706) (688043a), closes #6446
sql: refactor handling of filters on relations (2d1b889), closes #6760 #6784
Performance Improvements
core: make
em.refreshfaster for reloading large entity graphssql: speed up hydration of large to-many collections with joined strategy
6.4.16
30 May 2025Reading the note…
6.4.15
9 May 2025Reading the note…
6.4.14
5 May 2025Reading the note…
6.4.13
12 Apr 2025Reading the note…
6.4.12
6 Apr 2025Reading the note…
6.4.11
21 Mar 2025Reading the note…
6.4.10
16 Mar 2025Reading the note…
6.4.9
7 Mar 2025Reading the note…
6.4.8
6 Mar 2025Reading the note…
6.4.7
22 Feb 2025Reading the note…
6.4.6
12 Feb 2025Reading the note…
6.4.5
30 Jan 2025Reading the note…
6.4.4
23 Jan 2025Reading the note…
6.4.3
8 Jan 2025Reading the note…
6.4.2
22 Dec 2024Reading the note…
6.4.1
8 Dec 2024Reading the note…
6.4.0
11 Nov 2024mikro-orm.io/blog/mikro-orm-6-4-released
Bug Fixes
core: allow upserting POJO with embeddded instances (159fd4a), closes #6198
core: check that inverse side exists when mapping collection items via dataloader (#6149) (f580598), closes #6148
core: ensure decimal type that maps to number won't produce extra updates
core: fix double processing of custom types in
em.nativeUpdate(1b39846), closes #6206core: fix explicit serialization typing via
wrap().serializeandBaseEntity.serializecore: ignore collection properties when entity constructors are enforced
core: improve comparison of decimal values (66e60cb), closes #6194
core: improve error handling for comparing invalid dates
core: pass correct values to constructor for props using custom types
core: rename
tsNodeoption topreferTscore: revert workaround for
Dateproperties inclone()helper (c1af3db), closes #6118core: use db value for identity map key of PKs with custom type (aa1dd3c), closes #6150
entity-generator: output inverse sides for pure pivot tables when outputted (#6196) (e4b048b), closes #6192
mssql: map property names to field names when processing composite keys (cf687e8), closes #6204
postgres: make upsert where conditions fully qualified (b4b3cab), closes #6203
postgres: return all results for multi statement raw queries (adcef5f), closes #6009
postgres: support
rawfragments inqb.distinctOn()query-builder: fix detection of raw fragments in update queries with not matching field names (22b918f), closes #6177
query-builder: fix serialization of nested relations (3850c1e), closes #6194
Features
core: add
@Transactional()decoratorcore: add
onQueryhookcore: add
prefixModeoption to embeddables (#6113) (5df26e1), closes #6112core: allow defining multiple named configurations in one config file (#6201) (cecea34), closes #6067
core: improve support for sharing columns in multiple properties
core: schedule orphan removal on old 1:1 relations regardless of their init state (fc9a1c1), closes #5213
core: upsert managed entities (#6197) (a3b5e57), closes #6055
core: validate non-persistent relations are not composite
entity-generator: added support for forceUndefined being false
migrations: allow passing list of classes to
migrationsList(#6102) (35d84ac), closes #6099migrations: allow subscribing to migrator events (18a425c), closes #5763
mssql: add support for smalldatetime type (#6128) (998509b), closes #5904
query-builder: add
qb.andHaving()andqb.orHaving()methods (c36d4c8), closes #5796query-builder: allow joins on update queries (782e227), closes #6150
schema: diff foreign keys also by the constraint name (93ade9d), closes #6146
Performance Improvements
6.3.13
6 Oct 2024Reading the note…
6.3.12
1 Oct 2024Reading the note…
6.3.11
26 Sep 2024Reading the note…
6.3.10
15 Sep 2024Reading the note…
6.3.9
9 Sep 2024Reading the note…
6.3.8
4 Sep 2024Reading the note…
6.3.7
28 Aug 2024Reading the note…
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.