Skip to content

Releases: mikro-orm/mikro-orm

v5.0.2

16 Feb 19:25

Choose a tag to compare

5.0.2 (2022-02-16)

Bug Fixes

  • core: allow passing entity instance in repo.nativeInsert() (791c009)
  • core: do not ignore schema name from config in em.getReference() (58680fc)
  • core: do not ignore schema name in batch queries (b47393e)
  • core: do not ignore schema name in collection updates (d688dc1)
  • core: do not ignore value from database even if we only have a getter (35103b3), closes #2760
  • core: respect global schema (b569686)
  • postgres: do not ignore custom PK constraint names (3201ef7), closes #2762
  • seeder: declare missing dependency on globby (0599032)
  • typing: remove overloads for em.nativeInsert() (e21d470)

v5.0.1

13 Feb 17:41

Choose a tag to compare

5.0.1 (2022-02-13)

Bug Fixes

  • core: allow cloning QB with raw conditions (04d9d88), closes #2748
  • core: allow using 0 as PK (a2e423c), closes #2729
  • core: do not propagate removal to FK as PK (a0a19c2), closes #2723
  • core: fix support for complex composite (nested) PKs (a7fc7a1), closes #2647
  • core: ignore ORM packages where we failed to extract version (b1627c5), closes #2732
  • core: respect null in Loaded type (72385b3), closes #2750
  • core: return entity type from em.create() instead of New<T> (8ff277d), closes #2727
  • core: support special characters in clientUrl (43e28b8), closes #2730
  • core: use createRequire instead of dynamic import for JSON files (f567d2d), closes #2738
  • embeddables: fix loading inline embeddables with joined strategy (adaa5c6), closes #2717
  • esm: fix getting ORM version on windows with ESM (eb3a1be)
  • mongo: fix caching populated results in mongo (42ea5be), closes #2754
  • query-builder: respect explicit entity schema (717aa5e), closes #2740
  • schema: fix explicit schema name support (#2752) (68631ea)
  • seeder: fix Factory type for entity with constructor params (#2745) (8b7b977)
  • typing: exclude symbols and functions from FilterQuery (1d24eb8), closes #2742

Features

  • core: add getContext parameter to @UseRequestContext() (9516b48), closes #2721
  • query-builder: allow autocomplete on qb.orderBy() (fdf03c3), closes #2747
  • schema: ensure database when calling refreshDatabase() (7ce12d6)
  • seeder: refactor seeder to support running compiled files (#2751) (8d9c4c0), closes #2728

v5.0.0

06 Feb 18:43

Choose a tag to compare

5.0.0 (2022-02-06)

https://medium.com/@b4nan/mikro-orm-5-stricter-safer-smarter-b8412e84cca4

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 (c069960)
  • core: allow empty strings in postgres arrays (#2680) (5a33722)
  • core: allow using MongoNamingStrategy with SQL drivers (c38c66c)
  • core: fix pivot tables for wild card schema entities (623dc91)
  • core: fix populating entities with wildcard schema (98d0bfb)
  • core: fix support for nested composite PKs (14dcff8)
  • core: handle file:// urls in normalizePath (#2697) (127b0ae)
  • core: respect request context when creating QB (a2b7b84)
  • core: respect specified schema when populating (select-in) (#2676) (21a1be0)
  • 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 (94acc18)
  • core: do not check stack trace when detecting ts-node (06cca85)
  • core: do not override existing values via prop.onCreate (fb67ea6)
  • core: do not propagate mapToPk properties (b93c59e)
  • 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 (#2532) (eb3ea4a)
  • 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 (#2259) (d4b8c2c)
  • 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 (63eb4e6)
  • migrations: respect baseDir and allow absolute paths for sqlite dbName (36a3ae5)
  • postgres: allow type casting in nested conditions (bbd0eb4), closes #2227
  • postgres: fix runtime support for native pg enum arrays (#2584) (fcdb9b0)
  • 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 (2607266)
  • query-builder: respect 0 as limit (#2700) (3f284ed)
  • query-builder: fix nested ordered pagination (#2351) (c5a5c6b)
  • query-builder: support joining same property multiple times ([b62fb05](b62fb0533d8e8...
Read more

v4.5.10

26 Dec 14:36

Choose a tag to compare

4.5.10 (2021-12-26)

Bug Fixes

  • core: allow putting not managed entities to remove stack (0edb72e), closes #2395
  • core: defer cascading of persist operation (7d18310), closes #2161
  • core: do not override internal EM instance when forking EM (fb0abf9), closes #2342
  • core: do not save entity state in merge when it's not initialized (bdd7452), closes #1927
  • core: fix assigning to object property without value (aca56e1), closes #2492
  • core: fix collection state when forceEntityConstructor is used (53d4c39), closes #2406 #2409
  • core: fix reflection of enums in babel (05dee1d), closes #2198
  • core: fix serialization of self referencing collections (fdbe4f4), closes #2059
  • core: rehydrate custom types when using metadata cache (3ea37a6), closes #2489
  • core: remove entity from its bidirectional relations after delete (c754a62), closes #2238
  • embeddables: add missing serialization options to @Embedded() (aca6d08), closes #2464
  • embeddables: ensure order of discovery does not matter for embeddables (e3f9dbc), closes #2242
  • embeddables: fix validating nullable object embeddables (d60dded), closes #2233
  • mongo: allow using pool.min/max options in mongo driver (830179d), closes #2228
  • mongo: do not use separate update queries for M:N collections if not needed (f6383a0), closes #2483
  • postgres: add extra array operators (#2467) (a1fd357)
  • reflection: relative paths not stripped completely (#2164) (cbe7503)
  • sqlite: patch dialect only once (a7fe71e), closes #2422
  • sti: fix prototype of child entity after it gets loaded (e78942a), closes #2493 #2364
  • sti: respect custom table names (b17aea9), closes #2356
  • validation: validate missing 1:m mappedBy key in factory (7ef40c0), closes #2393
  • update mysql2 dependency to 2.3.2 (#2376) (f9c417a)

Performance Improvements

  • core: define Reference properties on prototype (4ef2623)
  • core: do not redefine Collection properties as non-enumerable (523addd), closes #2543
  • core: reuse EntityComparator on fork() (#2496) (bd2ccfd)
  • core: use shared memory for cycles when computing change sets (c12ff4b), closes #2379
  • core: various small performance improvements in UoW (d8ea1c2)

v4.5.9

24 Aug 20:20

Choose a tag to compare

4.5.9 (2021-08-24)

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

v4.5.8

24 Aug 17:41

Choose a tag to compare

4.5.8 (2021-08-24)

Bug Fixes

  • core: detect ts-jest usage (d54ccc2)
  • core: do not apply limit/offset to populate pivot table queries (1f2d430), closes #2121
  • core: do not propagate mapToPk properties (c37f42e)
  • query-builder: do not wipe previously defined conditions with qb.delete() (380fe3d), closes #2136
  • reflection: support virtual method properties (3a8c344)

v4.5.7

30 Jun 22:16

Choose a tag to compare

4.5.7 (2021-06-30)

Bug Fixes

  • core: fix clearing 1:m collections (29cd17b), closes #1914
  • core: fix M:N relations with custom type PKs (ed399b1), closes #1930
  • core: fix removing of m:n items when one is composite (8084845), closes #1961
  • core: fix transaction context in nested transactions (d88dd8b), closes #1910
  • core: make entity helper property non-enumerable (ce99eb2)
  • core: respect filters defined on base entities (4657d05), closes #1979
  • embeddables: allow using more than 10 embedded arrays (ab8e706), closes #1912
  • entity-generator: fix boolean default values (219fc0c), closes #1917
  • mysql: use current schema when reading enum definitions (c769871), closes #1923 #1866
  • postgres: fix propagation of PKs with custom names (9ce0c37), closes #1990

Features

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

v4.5.6

06 Jun 12:19

Choose a tag to compare

4.5.6 (2021-06-06)

Bug Fixes

  • core: fix extraction of child condition when populating 2 (f22eec1), closes #1882
  • core: fix hydrating of inlined embeddables via em.create() (34391cd), closes #1840
  • core: fix joined strategy with FK as PK (adaa59b), closes #1902
  • core: mark entity generator and migrations as peer deps of knex (4ad80af), closes #1879
  • core: propagate unsetting of 1:1 from inverse side (903d484), closes #1872
  • core: reset current transaction before running afterFlush event (539311e), closes #1824
  • core: support getters in EntitySchema property types (0b831d0), closes #1867
  • core: use tsconfig-paths loadConfig function (#1854) (fbfb148), closes #1849
  • entity-generator: do not infer cascade value based on update/delete rules (dca4f21), closes #1857
  • mongo: fix extraction of child condition when populating (3cf30e1), closes #1891

Features

  • core: add PlainObject class that DTO's can extend to treat class as POJO (#1837) (2e9c361)

v4.5.5

17 May 08:45

Choose a tag to compare

4.5.5 (2021-05-17)

Bug Fixes

  • core: allow using updateNestedEntities flag with collections (db77e8b), closes #1717
  • core: convert custom types for onCreate & onUpdate (34c1aa5), closes #1751
  • core: convert custom types for collection items in joined strategy (bea37e0), closes #1754
  • core: convert custom types on PKs in update and delete queries (1b5270d), closes #1798
  • core: do not ignore qb.onConflict(...).merge() without params (68b570e), closes #1774
  • core: ensure correct aliasing when auto-joining PKs in group conditions (ec971b6), closes #1734
  • core: ensure correct casting in deep JSON queries with operators (0441967), closes #1734
  • core: fix findAndCount with populate (61bc7cf), closes #1736
  • core: fix ordering by json properties (53bef71)
  • core: issue delete queries after extra/collection updates (fc48890)
  • core: support extending in tsconfig.json (#1804) (6597552), closes #1792
  • core: use $and for merging of multiple filter conditions (19f3f1d), closes #1776
  • mongo: validate usage of migrator and entity generator (e41d1c5), closes #1801
  • query-builder: allow passing array of keys to qb.onConflict().merge() (fc3cf01), closes #1774
  • query-builder: validate missing onConflict calls (d9ae997), closes #1803

v4.5.4

26 Apr 07:24

Choose a tag to compare

4.5.4 (2021-04-26)

Bug Fixes

  • core: consider non-plain objects as PKs (82387ad), closes #1721
  • core: fix QueryFlag.PAGINATE with joined loading strategy (11aa0a3)
  • core: fix assigning embedded arrays (9ee8f5c), closes #1699
  • core: fix persisting complex composite keys in m:1 relations (a932366), closes #1687
  • core: fix querying by complex composite keys via entity instance (b1b7894), closes #1695
  • core: fix querying by JSON properties (bc5e1a9), closes #1673
  • core: fix state of entities from result cached (8d0f076), closes #1704
  • core: initialize empty collections when fetch joining (6fb9560)
  • core: update version values in batch updates (f5c8ed8), closes #1703

Features

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