Packages

@mikro-orm/sqlite

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

Your version

5.0.0

major6 Feb 2022Where it was published

5.9.8 is the newest release of 5.x.

In short

72 new1 faster57 fixed1 internal

Release note

medium.com/@b4nan/mikro-orm-5-stricter-safer-sm…

Bug Fixes

  • assign: do not convert FK to entity when assigning to mapToPK property (b14c8fb), closes #2337

  • cli: validate configuration in CLI cache commands (#2146) (544583b), closes #2145

  • core: allow calling em.create() with reference wrapper

  • core: allow empty strings in postgres arrays

  • core: allow using MongoNamingStrategy with SQL drivers

  • core: fix pivot tables for wild card schema entities

  • core: fix populating entities with wildcard schema

  • core: fix support for nested composite PKs

  • core: handle file:// urls in normalizePath

  • core: respect request context when creating QB

  • core: respect specified schema when populating (select-in)

  • core: allow non-standard property names (hyphens, spaces, ...) (cc68230), closes #1958

  • core: allow propagation to multiple matching inverse sides (cf7d538), closes #2371

  • core: consider objects without prototype as POJO (b49807f), closes #2274

  • core: declare peer dependencies on driver packages (1873e8c), closes #2110

  • core: detect ts-jest usage

  • core: do not check stack trace when detecting ts-node

  • core: do not override existing values via prop.onCreate

  • core: do not propagate mapToPk properties

  • core: fix conversion of custom type PKs in some cases (28e83ef), closes #1263

  • core: fix nested query with fk as pk (#2650) (cc54ff9), closes #2648

  • core: fix ordering by pivot table with explicit schema name (eb1f9bb), closes #2621

  • core: fix propagation of locking option with select-in population (f3990d0), closes #1670

  • core: improve partial loading of 1:m relations (3ddde1e), closes #2651

  • core: issue early delete queries for recreating unique properties (decfd10), closes #2273

  • core: propagate em.remove() to 1:m collections (c23c39c), closes #2395

  • core: propagate em.remove() to m:1 properties of 1:m relations (e6fa2f7), closes #2636

  • core: reload default values after flush in mysql/sqlite (d57a6a9), closes #2581

  • core: respect read replica options (#2152) (9ec668d), closes #1963

  • core: rework orphan removal and cascading

  • core: save collection snapshots recursively after flush (3f5ba2f), closes #2410 #2411

  • core: schedule orphan removal on 1:1 inverse sides when relation nulled (a904fe8), closes #2273

  • core: support loading lazy scalar properties via em.populate() (c20fe88), closes #1479

  • core: sync MigrateOptions type in core with migrations package

  • core: truly load the whole entity graph when populate: true (3c21663), closes #1134

  • core: use clean internal identity map with disableIdentityMap (0677d74), closes #1307

  • embeddables: order of discovery of embeddables should not matter (d955b29), closes #2149

  • knex: quote version column (#2402) (5bbbd15), closes #2401

  • migrations: clear the migrations table in migration:fresh

  • migrations: respect baseDir and allow absolute paths for sqlite dbName

  • postgres: allow type casting in nested conditions (bbd0eb4), closes #2227

  • postgres: fix runtime support for native pg enum arrays

  • postgres: limit index names to 64 characters (48c105a), closes #1915

  • postgres: support comparing array columns via $eq (6eb320e), closes #2462

  • query-builder: fix mapping of formula properties

  • query-builder: respect 0 as limit

  • query-builder: fix nested ordered pagination

  • query-builder: support joining same property multiple times (b62fb05), closes #2602

  • query-builder: translate field names in qb.merge() (5aead23), closes #2177

  • query-builder: validate missing onConflict calls (30392bc), closes #1803

  • schema: do not ignore entity level indexes with just expression

  • schema: improve diffing of default values for strings and dates (d4ac638), closes #2385

  • seeder: fork EM in the seeder manager so we dont use global context

  • sql: split $and branches when auto joining to-many relations

  • sti: allow m:n relations between two STI entities (6c797e9), closes #2246

  • ts-morph: fix validation of embedded polymorphic arrays

  • types: fix populate type hints for nullable properties

  • validation: throw when calling qb.update/delete() after qb.where() (96893e0), closes #2390

Features

  • cli: validate CLI package is installed locally

  • cli: add database:create command (#1778) (7e9d97d), closes #1757

  • cli: allow exporting async functions from CLI config

  • cli: improve loading of CLI settings from package.json (03f9ddd), closes #545

  • cli: only warn with useTsNode: true without ts-node available (5aff134), closes #1957

  • core: add em.clearCache(key) method

  • core: add persistOnCreate option and enable it for seeder

  • core: add custom table check constraint support for postgres

  • core: allow defining check constraints via callback

  • core: expose referencedColumnNames on m:1/1:1 decorators

  • core: make em.create() respect required properties

  • core: validate required properties before flushing new entities

  • core: validate version mismatch in ORM packages

  • core: add EventType.onLoad that fires after entity is fully loaded

  • core: add freshEventManager to em.fork() options (a0f3fd0), closes #1741

  • core: add populateWhere option

  • core: add QueryFlag.AUTO_JOIN_ONE_TO_ONE_OWNER (be9d9e1), closes #1660

  • core: add Reference.createFromPK() helper method

  • core: add callback parameter to Collection.remove() (0b37654), closes #2398

  • core: add index/key name to naming strategy

  • core: add PlainObject class that DTO's can extend to treat class as POJO

  • core: add support for advanced locking (0cbed9c), closes #1786

  • core: add support for concurrency checks

  • core: add support for custom property ordering

  • core: add support for ESM via gen-esm-wrapper (aa71065), closes #1010

  • core: add support for multiple schemas (including UoW) (#2296) (d64d100), closes #2074

  • core: add support for polymorphic embeddables (#2426) (7b7c3a2), closes #1165

  • core: allow configuring aliasing naming strategy

  • core: allow passing arrays in orderBy parameter (#2211) (0ec22ed), closes #2010

  • core: allow providing custom Logger instance

  • core: allow using short lived tokens in config (4499838), closes #1818

  • core: automatically infer populate hint based on fields (0097539), closes #2468

  • core: conditionally support folder based discovery of ESM (8c8f0d0), closes #2631

  • core: implement auto-flush mode (#2491) (f1d8bf1), closes #2359

  • core: implement auto-refreshing of loaded entities (#2263) (9dce38c), closes #2292

  • core: implement partial loading support for joined loading strategy (2bebb5e), closes #1707

  • core: keep collection state of dirty collections after initializing (49ed651), closes #2408

  • core: make FindOptions.fields strictly typed (dot notation)

  • core: make populate parameter strictly typed with dot notation

  • core: move @UseRequestContext() decorator to core package

  • core: rework deep assigning of entities and enable it by default

  • core: support column names with spaces (00b54b4), closes #1617

  • core: use AsyncLocalStorage instead of domain API

  • core: validate populate hint on runtime for joined strategy too (94877e3), closes #2527

  • core: validate usage of global context

  • embeddables: allow using m:1 properties inside embeddables

  • embeddables: support onCreate and onUpdate (288899d), closes #2283 #2391

  • entity-generator: add support for generating M:N properties

  • entity-generator: add enum generation support

  • entity-generator: allow specifying schema (beb2993), closes #1301

  • filters: add em parameter to the filter callback parameters (6858986), closes #2214

  • knex: export also global knex function

  • migrations: allow providing custom MigrationGenerator (3cc366b), closes #1913

  • migrations: allow using migrations with ES modules (072f23f), closes #2631

  • migrations: ensure the database exists when using migrator (02dd67c), closes #1757

  • migrations: store migrations without extensions (4036716), closes #2239

  • migrations: use snapshots for generating diffs in new migrations

  • mongo: add SchemaGenerator support for mongo

  • query-builder: add qb.getCount() method (f773736), closes #2066

  • query-builder: allow awaiting the QueryBuilder instance

  • query-builder: improve typing of qb.execute() (c4cfedb), closes #2396

  • schema: add support for timestamp columns in mysql (a224ec9), closes #2386

  • schema: allow disabling foreign key constraints (fcdb236), closes #2548

  • schema: rework schema diffing (#1641) (05f15a3), closes #1486 #1518 #579 #1559 #1602 #1480 #1687

  • seeder: use community driven faker fork and reexport it

  • seeder: add seeder package (#929) (2b86e22), closes #251

  • sql: add qb.indexHint() method that appends to the from clause (ce89e1f), closes #1663

  • sql: add callback signature to expr() with alias parameter (48702c7), closes #2405

  • sql: allow setting transaction isolation level (6ae5fbf), closes #819

  • sql: allow tuple comparison via expr helper (90777a7), closes #2399

  • sql: generate down migrations automatically

  • typings: make em.create() and other methods strict (#1718) (e8b7119), closes #1456

  • typings: make toObject() and similar strict

  • Support flushing via Promise.all() (f788773), closes #2412

Performance Improvements

  • core: do not update entity state on forking EM

Breaking changes

Please see the upgrading guide.

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.