Packages

@mikro-orm/sqlite

7.2.11 · 20 Nov 2026MIT347.8k / weekRepositoryHomepagenpmAtom feed

Your version

7.0.0

major11 Mar 2026Where it was published

7.2.11 is the newest release of 7.x.

In short

1 removed49 new8 faster63 fixed2 internal

  • Removed

    seeder: remove tinyglobby dependency, add seedersList option

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 loadStrategy to balanced

  • cli: support various TS loaders

  • core: add $size collection operator

  • core: add collation support and MongoDB query options

  • core: add EntityName symbol for decorator-based Kysely type inference

  • core: add EntitySchema.new helper to create entity instances

  • core: add forceObject option to defineEntity

  • core: add populateHints option to FindOptions for per-relation populate overrides

  • core: add entity-level default orderBy option

  • core: 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 onConflictWhere option

  • core: 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.transactional fork

  • core: support FKs pointing to non-PK columns via targetKey option

  • core: 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/decorators package with legacy and ES decorator definitions

  • defineEntity: allow extending generated class with custom methods

  • entity-generator: add manyToManyPropertyName to NamingStrategy

  • kysely: add MikroKyselyPlugin to support various ORM features with kysely

  • migrations: 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/deleteRule and remove inference from cascade option

  • schema: allow skipping views

  • Removed

    seeder: remove tinyglobby dependency, add seedersList option

  • sql: add $elemMatch operator for JSON array properties

  • sql: improve QueryBuilder type safety with context-aware types

  • sql: 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 type

  • sql: support aliasing formula and regular properties in QueryBuilder select

  • sql: support UNION-based where clauses as index-friendly alternative to $or

  • sql: transparent querying of embedded array properties (#7264) (c9f13bb), closes #1887

  • sqlite: add ATTACH DATABASE support for multiple database files

  • sqlite: 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 #7073

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

  • core: duplicate discovery of embeddables with defineEntity

  • core: enable forceUtcTimezone by default for all SQL drivers (#7087) (c89890b), closes #5591

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

  • core: 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 defineEntity failing on metadata validation

  • core: 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 #6894

  • core: improve intellisense for partial loading in em.populate

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

  • core: map arrays inside object embeddables to JSON arrays by default

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

  • core: only respect Hidden type on scalar properties (#7097) (36372a2), closes #7062

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

  • core: 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 exclude hint in implicit serialization via toObject

  • core: respect exclude option on eager properties

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

  • core: respect custom repositories with InferEntity

  • core: respect EM schema when joining a wildcard entity from a static schema entity (69ca26c), closes #7082

  • core: respect explicit tableName when computing join table names

  • core: respect loaded hint for Ref relations inside array embeddables

  • core: 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 level

  • core: use full hydration in mergeData for initialized entities (32a0baa), closes #7205

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

  • defineEntity: fix inference issues in hooks definition

  • entity-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:down

  • migrations: normalize snapshots and write on both up/down

  • migrations: skip snapshot write on migration:up to support read-only filesystems

  • migrations: support emitting multiline comments

  • mongo: fix field name conversion when querying object embedded entities

  • mongo: fix support for deno by handling TypedArray when cloning

  • mongo: 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 WHERE conditions to ORDER BY joins in paginated queries (128e58b), closes #6160

  • schema: disable FK checks by default only for orm.schema.clear() in MySQL

  • schema: do not ignore changes to entity level comments (4087704), closes #7187

  • schema: do not infer nullability of to-one relations based on cascade option (56be7f3), closes #6972

  • sql: 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 pivotEntity that uses mapToPk: true (cdd8f85), closes #7107

  • sql: handle $not operator inside relation filters

  • sql: ignore missing tables during schema clear

  • sql: qualify cross-schema FK references with dbName on MySQL/MariaDB

  • sql: 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 defineEntity type performance

  • core: improve InferEntity performance when extends is used

  • core: improve Loaded type performance by optimizing field selection

  • core: improve inference via InferEntity type

  • core: optimize AutoPath and Loaded type instantiation costs

  • core: optimize em.assign typing

  • core: optimize type instantiation costs with structural shapes

  • core: rework auto-flush detection to rely on explicit em.persist calls

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.