Packages

@mikro-orm/core

7.2.11 · 20 Nov 2026MIT1.6M / weekRepositoryHomepagenpmAtom feed

Upgrading @mikro-orm/core From 5.1.5 to 6.6.10

149 releases in betweenevery note read

Other targets from 5.1.5Newest 5.x5.9.8Latest7.2.11
  1. 5.1.5yours
  2. 10 releases
  3. 5.5.0breaking
  4. 3 releases
  5. 5.6.0breaking
  6. 42 releases
  7. 5.9.0breaking
  8. 8 releases
  9. 6.0.0major
  10. 81 releases
  11. 6.6.10target
  12. 30 pre

Start here

Before you upgrade

Tick each one off as you go
  • Breaking5.9.0
  • Breaking5.6.0
  • Breaking5.5.0
  • Deprecated6.6.2
  • Deprecated5.8.4
  • Deprecated5.7.13
  • Deprecated5.7.7
  • Deprecated5.7.5
  • Deprecated5.7.0
  • Deprecated5.6.0

Security

Fixes 2 advisories affecting 5.1.5

  • core: prevent prototype pollution in Utils.merge

    6.6.10

Release by release

  1. 6.6.10

    Security fix26 Mar 20263 fixes
    • Security

      core: prevent prototype pollution in Utils.merge

    • Fixed

      core: handle JSON column type conversion in em.refresh() for detached entities (e41b500), closes #7383

    • Fixed

      core: tighten query construction validation

    • Fixed

      schema: escape single quotes in enum CHECK constraints (#7397) (db19731), closes #7396 #7395

  2. 6.6.9

    5 Mar 20266 fixes
    • Fixed

      core: fix findOne with entity refs for composite PKs with shared FK columns (6f95f72), closes #5629

    • Fixed

      core: make entity prototype toJSON non-enumerable to prevent data leaks

    • Fixed

      core: prevent double JSON-encoding of nested embeddable arrays (309b278), closes #7233

    • Fixed

      migrations: normalize snapshots and write on both up/down (#7236) (a07aca6), closes #7234

    • Fixed

      migrations: skip snapshot write on migration:up to support read-only filesystems (c8584e8), closes #7232

    • Fixed

      mysql: fix table.bigincrements() producing int instead of bigint (5660607), closes #7246

  3. 6.6.8

    1 Mar 20268 fixes
    • Fixed

      core: allow using property accessor on to-one relations (06978c9), closes #7211

    • Fixed

      core: fix double processing of JSON properties when reloading an entity

    • Fixed

      core: preserve embeddable properties in toPOJO regardless of partial loading hints

    • Fixed

      core: preserve function expression indexes through metadata cache round-trip (#7229) (9ae8d20), closes #7238

  4. 6.6.7

    15 Feb 20261 new · 7 fixes
    • New

      core: add WHERE clause support to upsert via onConflictWhere option

    • Fixed

      core: do not propagate cursor related options to populate queries (e6b9a6a), closes #7148

    • Fixed

      core: ignore empty conditions produced by filters

    • Fixed

      Guard prototype.toJSON against being called on prototype itself (#7152) (fa5290e), closes #7151

  5. 6.6.6

    30 Jan 20266 fixes
    • Fixed

      core: ensure column name conflicts in M:N are propagated to STI child entities (5be76ae), closes #7123

    • Fixed

      core: ensure no collisions in polymorphic embeddables with shadowed properties

    • Fixed

      core: fix result caching for custom types (b0ed700), closes #7112

    • Fixed

      core: respect exclude option on eager properties

    • Fixed

      core: support schema parameter in formula query when using QB with partial loading (30b37f7), closes #7102

    • Fixed

      core: use less strict repository option type to fix issues with defineEntity and cycles

  6. 6.6.5

    21 Jan 20261 new · 6 fixes
    • New

      core: improve formula callback to provide more information about the table and column mapping (#7105) (059bf97), closes #7102

    • Fixed

      core: always check the database when querying by PK with filters (bd44c82), closes #7084

    • Fixed

      core: ensure populate hint won't include undefined for optional relations

    • Fixed

      core: improve handling of deeply nested composite keys in em.create (8caae8f), closes #6894

    • Fixed

      core: normalize populate option in Collection.matching() for M:N relations

    • Fixed

      core: support overlapping properties with different field names in STI (badbc00), closes #5813

    • Fixed

      sql: fix populating M:N relations with pivotEntity that uses mapToPk: true (0ab55fe), closes #7107

  7. 6.6.4

    14 Jan 20267 fixes
    • Fixed

      core: do not convert custom types in em.refresh (143a4ed), closes #7073

    • Fixed

      core: fix applying filters on nested relation conditions

    • Fixed

      core: fix processing filters on to-many relations

    • Fixed

      core: respect orphanRemoval on 1:1 relations when inverse side is a PK

    • Fixed

      core: support wildcard wrap(e).populate() hints on type level

    • Fixed

      mongo: fix field name conversion when querying object embedded entities

    • Fixed

      postres: fix casting of object embedded relation properties

  8. 6.6.3

    4 Jan 20266 fixes
    • Fixed

      core: do not connect to database when calling orm.close() (79cabd7), closes #7041

    • Fixed

      core: don't reset entity identifiers when using assign on entity references

    • Fixed

      core: handle custom types properly in em.refresh

    • Fixed

      defineEntity: avoid circular type inference in meta

    • Fixed

      query-builder: do not reset schema when creating subquery for collection operators (4f4ea6d), closes #7053

    • Fixed

      schema: ensure SchemaGenerator respects skipTables option when diffing a schema

3 internal lines (docs, tests, tooling) left out.

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.