Skip to main content
Version: 6.4

Changelog

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

6.4.0 (2024-11-11)

Note: Version bump only for package @mikro-orm/mongodb

6.3.13 (2024-10-06)

Note: Version bump only for package @mikro-orm/mongodb

6.3.12 (2024-10-01)

Bug Fixes

6.3.11 (2024-09-26)

Bug Fixes

  • core: fix diffing of object properties (55df57f), closes #6050

Features

  • mongo: improve error logging for ensureIndexes (faa2a00), closes #4486

6.3.10 (2024-09-15)

Note: Version bump only for package @mikro-orm/mongodb

6.3.9 (2024-09-09)

Bug Fixes

  • mongo: allow ordering by object embedded properties (2a9ffa3), closes #6002

6.3.8 (2024-09-04)

Note: Version bump only for package @mikro-orm/mongodb

6.3.7 (2024-08-28)

Note: Version bump only for package @mikro-orm/mongodb

6.3.6 (2024-08-14)

Note: Version bump only for package @mikro-orm/mongodb

6.3.5 (2024-08-11)

Note: Version bump only for package @mikro-orm/mongodb

6.3.4 (2024-08-06)

Note: Version bump only for package @mikro-orm/mongodb

6.3.3 (2024-08-03)

Note: Version bump only for package @mikro-orm/mongodb

6.3.2 (2024-08-01)

Note: Version bump only for package @mikro-orm/mongodb

6.3.1 (2024-07-25)

Note: Version bump only for package @mikro-orm/mongodb

6.3.0 (2024-07-18)

Bug Fixes

  • core: improve handling of JSON properties to support numeric strings in all drivers (#5780) (fc50c5f), closes #5773
  • core: support for TS 5.5 (2fd7359)

Features

  • core: allow passing raw() into onConflictFields of upsert methods (#5691) (bff90f2), closes #5668
  • core: allow upserting without a unique value (#5726) (75a4706)
  • core: check for ORM extensions dynamically (#5651) (68a3c1f)

6.2.9 (2024-05-31)

Note: Version bump only for package @mikro-orm/mongodb

6.2.8 (2024-05-21)

Note: Version bump only for package @mikro-orm/mongodb

6.2.7 (2024-05-18)

Bug Fixes

  • mongo: ensure JSON values are properly diffed (577166a), closes #5572

6.2.6 (2024-05-14)

Note: Version bump only for package @mikro-orm/mongodb

6.2.5 (2024-05-05)

Note: Version bump only for package @mikro-orm/mongodb

6.2.4 (2024-05-02)

Note: Version bump only for package @mikro-orm/mongodb

6.2.3 (2024-04-24)

Note: Version bump only for package @mikro-orm/mongodb

6.2.2 (2024-04-20)

Note: Version bump only for package @mikro-orm/mongodb

6.2.1 (2024-04-12)

Note: Version bump only for package @mikro-orm/mongodb

6.2.0 (2024-04-09)

Bug Fixes

  • core: respect custom EntityManager type in em.fork() (bb1a3f9), closes #5415

6.1.12 (2024-03-24)

Note: Version bump only for package @mikro-orm/mongodb

6.1.11 (2024-03-18)

Note: Version bump only for package @mikro-orm/mongodb

6.1.10 (2024-03-14)

Note: Version bump only for package @mikro-orm/mongodb

6.1.9 (2024-03-10)

Note: Version bump only for package @mikro-orm/mongodb

6.1.8 (2024-03-06)

Note: Version bump only for package @mikro-orm/mongodb

6.1.7 (2024-03-04)

Note: Version bump only for package @mikro-orm/mongodb

6.1.6 (2024-02-28)

Note: Version bump only for package @mikro-orm/mongodb

6.1.5 (2024-02-21)

Note: Version bump only for package @mikro-orm/mongodb

6.1.4 (2024-02-16)

Note: Version bump only for package @mikro-orm/mongodb

6.1.3 (2024-02-13)

Note: Version bump only for package @mikro-orm/mongodb

6.1.2 (2024-02-11)

Note: Version bump only for package @mikro-orm/mongodb

6.1.1 (2024-02-10)

Note: Version bump only for package @mikro-orm/mongodb

6.1.0 (2024-02-04)

Note: Version bump only for package @mikro-orm/mongodb

6.0.7 (2024-01-30)

Note: Version bump only for package @mikro-orm/mongodb

6.0.6 (2024-01-29)

Note: Version bump only for package @mikro-orm/mongodb

6.0.5 (2024-01-18)

Note: Version bump only for package @mikro-orm/mongodb

6.0.4 (2024-01-15)

Note: Version bump only for package @mikro-orm/mongodb

6.0.3 (2024-01-13)

Note: Version bump only for package @mikro-orm/mongodb

6.0.2 (2024-01-09)

Bug Fixes

  • core: respect logging options in em.count (481d02e), closes #5085

6.0.1 (2024-01-08)

Note: Version bump only for package @mikro-orm/mongodb

6.0.0 (2024-01-08)

Bug Fixes

  • core: respect context in virtual entity expression callback (94e4322)
  • mongo: don't rename id to _id for embeddables and entities without serialized PK (0cee82d), closes #4960

Features

BREAKING CHANGES

  • core: FindOptions.fields now accepts only array of strings, like populate.

5.9.2 (2023-11-02)

Note: Version bump only for package @mikro-orm/mongodb

5.9.1 (2023-10-31)

Note: Version bump only for package @mikro-orm/mongodb

5.9.0 (2023-10-24)

Note: Version bump only for package @mikro-orm/mongodb

5.8.10 (2023-10-18)

Note: Version bump only for package @mikro-orm/mongodb

5.8.9 (2023-10-15)

Note: Version bump only for package @mikro-orm/mongodb

5.8.8 (2023-10-11)

Note: Version bump only for package @mikro-orm/mongodb

5.8.7 (2023-10-05)

Note: Version bump only for package @mikro-orm/mongodb

5.8.6 (2023-10-02)

Note: Version bump only for package @mikro-orm/mongodb

5.8.5 (2023-09-30)

Bug Fixes

  • core: pin all internal dependencies (f4868ed), closes #4764

5.8.4 (2023-09-27)

Note: Version bump only for package @mikro-orm/mongodb

5.8.3 (2023-09-24)

Note: Version bump only for package @mikro-orm/mongodb

5.8.2 (2023-09-20)

Note: Version bump only for package @mikro-orm/mongodb

5.8.1 (2023-09-12)

Note: Version bump only for package @mikro-orm/mongodb

5.8.0 (2023-09-10)

Features

5.7.14 (2023-07-27)

Bug Fixes

  • mongo: do not create collections for embeddable entities (0759df0), closes #4495

5.7.13 (2023-07-16)

Bug Fixes

  • mongo: drop migrations table when requested (278ba3a), closes #4513

5.7.12 (2023-06-10)

Bug Fixes

  • core: respect undefined when assigning to object properties (217ff8f), closes #4428

5.7.11 (2023-06-01)

Note: Version bump only for package @mikro-orm/mongodb

5.7.10 (2023-05-23)

Note: Version bump only for package @mikro-orm/mongodb

5.7.9 (2023-05-22)

Note: Version bump only for package @mikro-orm/mongodb

5.7.8 (2023-05-21)

Note: Version bump only for package @mikro-orm/mongodb

5.7.7 (2023-05-14)

Note: Version bump only for package @mikro-orm/mongodb

5.7.6 (2023-05-13)

Features

  • core: log number of results (261b3d9)

5.7.5 (2023-05-09)

Bug Fixes

5.7.4 (2023-05-01)

Note: Version bump only for package @mikro-orm/mongodb

5.7.3 (2023-04-28)

Note: Version bump only for package @mikro-orm/mongodb

5.7.2 (2023-04-25)

Note: Version bump only for package @mikro-orm/mongodb

5.7.1 (2023-04-25)

Note: Version bump only for package @mikro-orm/mongodb

5.7.0 (2023-04-23)

Bug Fixes

Features

5.6.16 (2023-04-04)

Reverts

  • Revert "chore(release): v5.6.16 [skip ci]" (49faac9)

5.6.15 (2023-03-18)

Note: Version bump only for package @mikro-orm/mongodb

5.6.14 (2023-03-12)

Note: Version bump only for package @mikro-orm/mongodb

5.6.13 (2023-03-01)

Note: Version bump only for package @mikro-orm/mongodb

5.6.12 (2023-02-26)

Bug Fixes

5.6.11 (2023-02-17)

Note: Version bump only for package @mikro-orm/mongodb

5.6.10 (2023-02-17)

Note: Version bump only for package @mikro-orm/mongodb

5.6.9 (2023-02-10)

Note: Version bump only for package @mikro-orm/mongodb

5.6.8 (2023-01-25)

Features

  • mongo: add missing MongoEntityRepository.getCollection() shortcut (5e4e126), closes #3951

5.6.7 (2023-01-13)

Note: Version bump only for package @mikro-orm/mongodb

5.6.6 (2023-01-10)

Bug Fixes

  • core: do not allow functions and symbols in FilterQuery (85b1fc1), closes #3928
  • core: make FilterQuery strict again! (5427097)

5.6.5 (2023-01-09)

Note: Version bump only for package @mikro-orm/mongodb

5.6.4 (2023-01-04)

Bug Fixes

  • core: improve inference of driver exported MikroORM.init() (497f274)
  • mongo: respect field names in batch update conditions (3466c86), closes #3897

5.6.3 (2022-12-28)

Note: Version bump only for package @mikro-orm/mongodb

5.6.2 (2022-12-25)

Note: Version bump only for package @mikro-orm/mongodb

5.6.1 (2022-12-20)

Note: Version bump only for package @mikro-orm/mongodb

5.6.0 (2022-12-09)

Bug Fixes

  • core: make ChangeSet.getPrimaryKey() response stable (d32c956)

Features

5.5.3 (2022-11-10)

Features

  • mongo: allow passing transaction options to the mongo client (d52c747), closes #3703

5.5.2 (2022-11-07)

Note: Version bump only for package @mikro-orm/mongodb

5.5.1 (2022-11-05)

Note: Version bump only for package @mikro-orm/mongodb

5.5.0 (2022-10-23)

Bug Fixes

  • mongo: fix populating 1:1 owners from inverse side (25ee03a)

Features

Performance Improvements

  • schema: improve schema inspection speed in SQL drivers (#3549) (74dc3b1)

5.4.2 (2022-09-12)

Note: Version bump only for package @mikro-orm/mongodb

5.4.1 (2022-09-08)

Bug Fixes

  • core: change internal dependencies to use ~ instead of ^ (fdbf67c), closes #3468

5.4.0 (2022-09-01)

Bug Fixes

  • core: update to TypeScript 4.8 and improve EntityDTO type (#3389) (f2957fb)
  • knex: support em.count() on virtual entities (5bb4ebe)

5.3.1 (2022-08-04)

Note: Version bump only for package @mikro-orm/mongodb

5.3.0 (2022-08-01)

Features

  • add support for full text searches (#3317) (8b8f140)
  • core: add support for virtual entities (#3351) (dcd62ac)
  • mongo: add support for migrations in mongo driver (#3347) (c5c6115)
  • mongo: allow reusing mongo client via driverOptions (df59ebf), closes #3352

5.2.4 (2022-07-25)

Note: Version bump only for package @mikro-orm/mongodb

5.2.3 (2022-07-08)

Bug Fixes

5.2.2 (2022-07-03)

Bug Fixes

  • mongo: retry only 3 times if ensuring indexes fails (#3272) (299a028)

5.2.1 (2022-06-21)

Bug Fixes

  • mongo: recreate indexes when they differ (60fc7f6), closes #3118
  • mongo: use $unset when property value is undefined (f059811), closes #3233

5.2.0 (2022-06-10)

Bug Fixes

  • typing detection with typescript 4.7 node16 (#3163) (08322fa)

5.1.5 (2022-05-29)

Note: Version bump only for package @mikro-orm/mongodb

5.1.4 (2022-05-19)

Bug Fixes

  • core: allow asterisk in FindOptions.fields on TS level (43e1d0b), closes #3127
  • core: improve type of em.getContext() (158f077), closes #3120

5.1.3 (2022-04-27)

Bug Fixes

  • mongo: fix ensuring indexes with polymorphic embeddables (aa5e4d2), closes #3013

5.1.2 (2022-04-10)

Note: Version bump only for package @mikro-orm/mongodb

5.1.1 (2022-03-20)

Note: Version bump only for package @mikro-orm/mongodb

5.1.0 (2022-03-13)

Features

  • core: allow better control over connection type when using read-replicas (#2896) (e40ae2d)

5.0.5 (2022-02-27)

Note: Version bump only for package @mikro-orm/mongodb

5.0.4 (2022-02-22)

Note: Version bump only for package @mikro-orm/mongodb

5.0.3 (2022-02-20)

Bug Fixes

  • core: do not trigger global context validation from repositories (f651865), closes #2778

Features

  • core: add SchemaGenerator.clearDatabase() (ecad9c6), closes #2220

5.0.2 (2022-02-16)

Note: Version bump only for package @mikro-orm/mongodb

5.0.1 (2022-02-13)

Features

  • query-builder: allow autocomplete on qb.orderBy() (fdf03c3), closes #2747
  • schema: ensure database when calling refreshDatabase() (7ce12d6)

5.0.0 (2022-02-06)

Bug Fixes

  • core: declare peer dependencies on driver packages (1873e8c), closes #2110
  • mongo: allow using pool.min/max options in mongo driver (9223055), closes #2228

chore

  • upgrade typescript to v4.5.2 (2bd8220)

Code Refactoring

  • use options parameters in IDatabaseDriver (#2204) (9a32ac0)

Features

  • core: add support for ESM via gen-esm-wrapper (aa71065), closes #1010
  • core: add support for polymorphic embeddables (#2426) (7b7c3a2), closes #1165
  • core: allow passing arrays in orderBy parameter (#2211) (0ec22ed), closes #2010
  • core: allow providing custom Logger instance (#2443) (c7a75e0)
  • core: make FindOptions.fields strictly typed (dot notation) (fd43099)
  • core: make populate parameter strictly typed with dot notation (3372f02)
  • core: validate version mismatch in ORM packages (cf70219)
  • embeddables: allow using m:1 properties inside embeddables (#1948) (ffca73e)
  • mongo: add SchemaGenerator support for mongo (#2658) (cc11859)
  • mongo: upgrade node-mongodb to v4 (#2425) (2e4c135)
  • sql: allow setting transaction isolation level (6ae5fbf), closes #819
  • typings: make em.create() and other methods strict (#1718) (e8b7119), closes #1456

BREAKING CHANGES

  • Previously it was possible to call em.populate() with a single entity input, and the output would be again just a single entity.

Due to issues with TS 4.5, this method now always return array of entities. You can use destructing if you want to have a single entity return type:

const [loadedAuthor] = await em.populate(author, ...);
  • core: Embeddable instances are now created via EntityFactory and they respect the forceEntityConstructor configuration. Due to this we need to have EM instance when assigning to embedded properties.

Using em.assign() should be preferred to get around this.

Deep assigning of child entities now works by default based on the presence of PKs in the payload. This behaviour can be disable via updateByPrimaryKey: false in the assign options.

mergeObjects option is now enabled by default.

  • Most of the methods on IDatabaseDriver interface now have different signature.
  • core: Populate parameter is now strictly typed and supports only array of strings or a boolean. Object way is no longer supported. To set loading strategy, use FindOptions.strategy.
  • sql: - em.transactional() signature has changed, the parameter is now options object
  • em.begin() signature has changed, the parameter is now options object
  • typings: Some methods are now strictly typed, so previously fine usages might be restricted on TS level. To get around those, we might either cast as any, provide the generic T type as any, or use expr helper.
em.create(User, { someNotDefinedProp: 123 }); // throws if someNotDefinedProp not on the User
em.create(User, { [expr('someNotDefinedProp')]: 123 }); // works, using expr
em.create<any>(User, { someNotDefinedProp: 123 }); // works, using type cast
em.create(User, { someNotDefinedProp: 123 } as any); // works, using type cast

4.5.10 (2021-12-26)

Bug Fixes

  • mongo: allow using pool.min/max options in mongo driver (830179d), closes #2228

4.5.9 (2021-08-24)

Note: Version bump only for package @mikro-orm/mongodb

4.5.8 (2021-08-24)

Note: Version bump only for package @mikro-orm/mongodb

4.5.7 (2021-06-30)

Note: Version bump only for package @mikro-orm/mongodb

4.5.6 (2021-06-06)

Note: Version bump only for package @mikro-orm/mongodb

4.5.5 (2021-05-17)

Note: Version bump only for package @mikro-orm/mongodb

4.5.4 (2021-04-26)

Note: Version bump only for package @mikro-orm/mongodb

4.5.3 (2021-04-09)

Note: Version bump only for package @mikro-orm/mongodb

4.5.2 (2021-04-06)

Note: Version bump only for package @mikro-orm/mongodb

4.5.1 (2021-03-27)

Note: Version bump only for package @mikro-orm/mongodb

4.5.0 (2021-03-21)

Note: Version bump only for package @mikro-orm/mongodb

4.4.4 (2021-02-21)

Note: Version bump only for package @mikro-orm/mongodb

4.4.3 (2021-02-14)

Note: Version bump only for package @mikro-orm/mongodb

4.4.2 (2021-02-04)

Note: Version bump only for package @mikro-orm/mongodb

4.4.1 (2021-02-01)

Note: Version bump only for package @mikro-orm/mongodb

4.4.0 (2021-01-24)

Bug Fixes

  • core: allow using lazy flag with formulas (4b2b5ce), closes #1229
  • mongo: fix using custom field name on relations (44becca), closes #1279

Features

4.3.4 (2020-12-11)

Note: Version bump only for package @mikro-orm/mongodb

4.3.3 (2020-12-04)

Note: Version bump only for package @mikro-orm/mongodb

4.3.2 (2020-11-24)

Note: Version bump only for package @mikro-orm/mongodb

4.3.1 (2020-11-20)

Note: Version bump only for package @mikro-orm/mongodb

4.3.0 (2020-11-13)

Bug Fixes

  • core: pin dependencies (0f3a8e5), closes #961
  • deps: update dependency @types/mongodb to v3.5.33 (#1045) (81514d8)
  • mongo: do not create collections for embeddables (a0cc877), closes #1040

Features

  • core: maintain transaction context automatically (#959) (e0064e4)
  • query-builder: allow mapping of complex joined results (#988) (60dd2d8), closes #932

4.2.3 (2020-10-24)

Note: Version bump only for package @mikro-orm/mongodb

4.2.2 (2020-10-22)

Note: Version bump only for package @mikro-orm/mongodb

4.2.1 (2020-10-20)

Note: Version bump only for package @mikro-orm/mongodb

4.2.0 (2020-10-18)

Bug Fixes

  • core: update umzug types to 2.3 (4668e78), closes #926

Features

  • core: allow defining multiple entities in single file (e3ab336), closes #922
  • core: allow storing embeddables as objects (#927) (ba881e6), closes #906

4.1.0 (2020-10-12)

Bug Fixes

  • mongo: filter by serialized PK inside group condition (a492a64), closes #908
  • typings: improve inference of the entity type (67f8015), closes #876

Performance Improvements

  • core: implement bulk updates in mongo driver (5f347c1), closes #732
  • core: implement bulk updates in sql drivers (b005353), closes #732
  • core: optimize entity hydration (6c56a05), closes #732
  • core: use bulk inserts in all drivers (10f2e55), closes #732
  • core: use dedicated identity maps for each entity (84667f9), closes #732
  • core: use faster way to check number of object keys (82f3ee4), closes #732
  • core: use JIT compiled PK getters/serializers (0ec99dc), closes #732

4.0.7 (2020-09-24)

Features

  • core: add groupBy, having and schema to CountOptions (d3c3858)

Performance Improvements

  • core: use batch inserts in UoW (postgres & mongodb) (#865) (54ad928), closes #732

4.0.6 (2020-09-22)

Note: Version bump only for package @mikro-orm/mongodb

4.0.5 (2020-09-21)

Note: Version bump only for package @mikro-orm/mongodb

4.0.4 (2020-09-19)

Note: Version bump only for package @mikro-orm/mongodb

4.0.3 (2020-09-15)

Note: Version bump only for package @mikro-orm/mongodb

4.0.2 (2020-09-11)

Note: Version bump only for package @mikro-orm/mongodb

4.0.1 (2020-09-10)

Note: Version bump only for package @mikro-orm/mongodb

Page Options