Mikro Orm Versions Save

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, MariaDB, MS SQL Server, PostgreSQL and SQLite/libSQL databases.

v6.1.1

4 months ago

6.1.1 (2024-02-10)

Bug Fixes

  • core: consider star populates on nested positions only for one level (65d1575), closes #5213
  • core: do not enforce discriminatorColumn type (d2a016e), closes #5224
  • core: fix change detection on STI entities (3c43251), closes #5224
  • core: fix optimistic locking on STI entities (36ad806), closes #5224
  • core: respect star in parent.* populate hints (39910ab), closes #5213
  • postgres: declare dependency on postgres-array (e73fd1a)
  • postgres: fix parsing of date properties inside object embeddables (760ec77), closes #5216
  • reflection: only validate known types to allow using type aliases (d6b93be), closes #5221

Features

  • entity-generator: support functions in extension hooks (#5218) (b28321c)

v6.1.0

4 months ago

6.1.0 (2024-02-04)

Bug Fixes

  • core: allow CacheAdapter.get to return Promise<undefined> (#5200) (98ce1e5), closes #5199
  • core: fix broken inference of AutoPath in TS 5.4 (#5197) (8bbc252)
  • core: handle possible match between virtual property name and another property's field name (7fc779f), closes #5191
  • core: make wrap(e, true).__em correctly typed to EntityManager (35d607c)
  • core: process upsert data to allow using entity instances in place of relations (9305653), closes #5165
  • core: respect upsertMany options when batching (d6d1381), closes #5209
  • core: respect hidden properties of composite PKs during serialization (3d1cba3), closes #5203
  • postgres: improve diffing of native postgres enums (49d6b4d), closes #5108
  • query-builder: support convertToJSValueSQL on returning statement of update queries (2e1d6c8), closes #5176

Features

  • core: add second EM parameter to onCreate and onUpdate callback (a964aeb), closes #5201
  • core: allow declarative partial loading of collection items (#5210) (5e4fa60), closes #4963
  • core: allow mapping array columns to arrays of objects via ArrayType (#5204) (42cc9cc), closes #5188
  • entity-generator: allow post processing the metadata (#5113) (e82058f), closes #5010
  • knex: add loggerContext parameter to em.execute (b6d46df)

v5.9.8

4 months ago

5.9.8 (2024-02-04)

Bug Fixes

  • core: do not mutate data provided to em.upsert/Many (5acb4eb), closes #5136
  • core: ensure em.insertMany returns array of PKs for a single item too (#5180) (b9a55e5), closes #5179
  • core: process upsert data to allow using entity instances in place of relations (42e3c5e), closes #5165
  • mongo: ensure assign on object properties won't ignore changes (bd22d7c), closes #5158
  • postgres: parse timestamp dates less than year 1000 (#5071) (63eb5c5)

v6.0.7

4 months ago

6.0.7 (2024-01-30)

Bug Fixes

  • core: consider PrimaryKeyProp as optional properties for em.create() (69522f2), closes #5187
  • core: do not add undefined to null types in EntityDTO (d661c68), closes #5186
  • core: fix ignoring function properties when they are optional (fb33934)
  • reflection: fix validation of string enums when loading via QueryBuilder (908864c), closes #5185

Features

  • postgres: add support for interval type (659a613), closes #5181

v6.0.6

4 months ago

6.0.6 (2024-01-29)

Bug Fixes

  • core: ensure em.insertMany returns array of PKs for a single item too (#5180) (0d58aaf), closes #5179
  • core: fix TypeError caused by validation of duplicate field names (01d8c26), closes #5163
  • core: make PK properties non-nullable in EntityDTO (dc4fc6f)
  • core: respect optionality in EntityDTO type (1691a79)
  • core: validate missing populate hint for cursor based pagination on relation properties (ea48db0), closes #5155
  • mongo: ensure assign on object properties won't ignore changes (a360300), closes #5158
  • query-builder: only map the first result with qb.getSingleResult() (0e56fe1), closes #5182

v6.0.5

4 months ago

6.0.5 (2024-01-18)

Bug Fixes

  • cli: try to respect windows ESM binary (57e91e2), closes #5147
  • core: do not infer populate: ['*'] from fields: ['*'] (f658376), closes #5139
  • core: do not mutate data provided to em.upsert/Many (3d8c242), closes #5136
  • core: don't convert mapped types for constructor parameters when creating new entity (37befd3), closes #5150
  • core: fix bigint mode detection when hydrating new entity from returning statement (a42321d), closes #5146
  • core: merge serialization hints when lazy populating (f1d2487), closes #5138
  • query-builder: cache knex QB instance to get around issues with raw fragments (f6e76d8)
  • reflection: improve detection of Ref types with FK as PK (c8858d2), closes #5144

v6.0.4

4 months ago

6.0.4 (2024-01-15)

Bug Fixes

  • core: respect reloaded properties of partially loaded entity during serialization (f7b6497), closes #5128

Features

  • core: allow reusing single raw fragment in multiple keys (fc967e2), closes #5129

v6.0.3

5 months ago

6.0.3 (2024-01-13)

Bug Fixes

  • core: allow raw fragments as keys with multiple conditions (d0d5de8), closes #5112
  • core: fix leaking raw fragments cache (9638410)
  • core: respect raw fragments in orderBy and populateOrderBy (7bf986c), closes #5110
  • core: support raw fragments in order by with pagination (67ee6f5), closes #5110
  • core: do not map array types as Loaded when partially loaded (75d035d), closes #5123
  • core: provide mapped custom types into constructor with forceEntityConstructor (b293789), closes #5118

Features

  • core: export AutoPath and UnboxArray types (000c50c), closes #5124
  • core: map double and decimal properties to number or string based on the runtime type (312f293), closes #5120

v6.0.2

5 months ago

6.0.2 (2024-01-09)

Bug Fixes

  • core: allow calling em.remove with not managed entity (88e055e), closes #5103
  • core: allow calling load() on references and collections of not managed entities (3b94bf9), closes #5082
  • core: respect logging options in em.count (481d02e), closes #5085
  • core: support $some/$none/$every on nested relations (2b3bd4d), closes #5099
  • reflection: fix processing of Opt and Hidden types when used in intersection (2bd612e)

Features

  • core: add wrap(entity).isManaged() (5931649)
  • entity-generator: allow customizing entity name based on schema name (1e5afb8), closes #5084

v6.0.1

5 months ago

6.0.1 (2024-01-08)

Bug Fixes

  • core: adjust peer dependencies versions