Packages

@mikro-orm/mariadb

7.2.11 · 20 Nov 2026MIT316.2k / weekRepositoryHomepagenpmAtom feed

Your version

5.5.0

23 Oct 2022Where it was published

5.9.8 is the newest release of 5.x.

In short

1 breaking19 new3 faster16 fixed

  • Breaking

    It is no longer possible to do collection.add(...items) with a generic array - it only works with a tuple. The solution is to do collection.add(items) instead, which will type check and is also more performant (no array copies).

Release note

Bug Fixes

  • cli: fix using npx --workspace with mikro-orm-esm

  • cli: improve success message of schema:update/drop commands

  • core: always compare boolean properties as booleans (c30c680), closes #3576

  • core: do not ignore default option in version properties

  • core: do not ignore falsy version values like 0

  • core: fix assigning objects to collections

  • core: fix changing 1:1 relations value (7b6e6f7), closes #3614

  • core: fix removing entities with complex composite keys (6d6e9f4), closes #3543

  • core: fix validation of EM param in assign (6572a59), closes #3571

  • core: hydrate mapToPk properties with the PK value

  • core: improve entity path detection with SWC 1.3.4+

  • core: merge entity automatically via em.create(E, {}, { managed: true }) (24d206f), closes #3571

  • core: propagate entity removal to collection properties

  • core: rework handling of orphan removal for 1:m collections (925c798), closes #3564

  • core: serialize embedded JSON properties correctly when used in inline embeddable (feef8b3), closes #3519

  • mongo: fix populating 1:1 owners from inverse side

  • query-builder: support top level $not operator in join condition

Features

  • core: add defineConfig helper

  • core: add em.refresh(entity) method

  • core: add em.upsert() method (#3525) (3285cdb), closes #3515

  • core: add MikroORM and Options exports to each driver package

  • core: add the offset into FindOneOptions

  • core: automatically detect src/dist/build folders and adjust configuration

  • core: enable persistOnCreate by default

  • core: maintain identity for the Reference wrapper (da1a0ef), closes #3582

  • core: provide meta and prop on custom mapped type instance (c1251d0), closes #3538

  • core: track changes on entity references

  • core: validate missing items in enum definition

  • core: validate missing types in EntitySchema definition (0716566), closes #3603

  • migrations: allow configuring snapshot name (4bbe355), closes #3562

  • mongo: do not expand array queries to $in operator when nested inside $eq

  • postgres: add qb.distinctOn() support

  • query-builder: validate modification of finalized QB (b23f015), closes #3534

  • schema: add ability to ignore specific column changes (#3503) (05fb1ce), closes #1904 #1904

  • schema: try to infer runtime default values automatically

  • sqlite: enable returning statements in both SQLite drivers

Performance Improvements

  • core: don't propagate serialization context to hidden relations

  • core: improve support for large collections

  • schema: improve schema inspection speed in SQL drivers

Type-level breaking changes

  • Breaking

    It is no longer possible to do collection.add(...items) with a generic array - it only works with a tuple. The solution is to do collection.add(items) instead, which will type check and is also more performant (no array copies).

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.