Skip to content

Latest commit

 

History

History
2048 lines (1241 loc) · 211 KB

CHANGELOG.md

File metadata and controls

2048 lines (1241 loc) · 211 KB

Change Log

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

5.1.1 (2022-03-20)

Bug Fixes

  • core: fix custom pivot table entities for unidirectional relations (01bdbf6)
  • knex: order by with a formula field should not include as for sub-queries (#2929) (74751fb)
  • postgres: allow explicit schema name in prop.pivotTable (1860ff5), closes #2919
  • postgres: fix pagination with order by UUID PK (042626c), closes #2910
  • postgres: respect known schema when loading wild card entity relations (61d1e85), closes #2909
  • schema: respect disableForeignKeys in schema generator (f1b8e46), closes #2912

Features

  • core: validate em.begin was called when using em.commit/rollback (67fa076), closes #2918

5.1.0 (2022-03-13)

Bug Fixes

  • core: do not alias JSON conditions on update/delete queries (5c0674e), closes #2839
  • core: ensure all entities from inner context are merged to the upper one (7b3a6b4), closes #2882
  • core: fix object key utilities for null prototype objects (#2847) (b2cf01e), closes #2846
  • core: fix ordering by complex composite PKs (dde11d3), closes #2886
  • core: fix strict type for orderBy when entity has length property (ef45871), closes #2829
  • core: type global entityRepository option weakly (3faf8bc)
  • knex: order by with a formula field should not include as (#2848) (09e8bfa)
  • knex: fully qualify sub-query order-by fields (#2835) (f74dc73)
  • mysql: mark FK columns as unsigned for mixed composite PKs (67806cb), closes #2844
  • postgres: respect schema name in migration storage (fbf9bfa), closes #2828

Features

  • core: allow better control over connection type when using read-replicas (#2896) (e40ae2d)
  • core: allow specifying custom pivot table entity (#2901) (8237d16)
  • core: allow using hooks for interface entities (#2895) (aee99b1)
  • core: enable QueryFlag.PAGINATE automatically for em.find() (ccb4223), closes #2867
  • core: map check constraint failures to specific error type (ebcbdff), closes #2836

5.0.5 (2022-02-27)

Bug Fixes

  • core: fix auto-joining multiple 1:1 properties (0566e74), closes #2821
  • core: respect orphanRemoval in 1:1 relations (#2816) (55ff07b)
  • knex: respect explicit transaction in em.count() (#2818) (2d26a63)
  • migrations: ensure executedAt is a Date when listing executed migrations (c8753ee), closes #2817
  • query-builder: use paginate flag automatically based on to-many joins (db9963f), closes #2823

5.0.4 (2022-02-22)

Bug Fixes

  • core: always create new entities as initialized (bbb30c5)
  • core: fix mapping default values of relation properties (bc57ed0)
  • core: fix propagation of FK as PK with not flushed entity (25be857), closes #2810
  • core: fix unsetting identity of orphans (1:1 with orphan removal) (91e7315), closes #2806
  • core: respect schema from config when adding new entities to context (7a6b6e2)
  • core: respect load strategy specified in property definition (1a6b4b2), closes #2803
  • entity-generator: fix property names for columns with dashes (#2813) (c920d5f)
  • schema: escape table/column comments (fff1581), closes #2805

5.0.3 (2022-02-20)

Bug Fixes

  • core: do not trigger global context validation from repositories (f651865), closes #2778
  • core: fix processing of onUpdate properties (9cf454e), closes #2781
  • core: fix processing of multiple onUpdate properties on one entity (4f0e4cc), closes #2784
  • core: hydrate not-null embeddable prop even with all null values (09aee05), closes #2774
  • core: register entity to identity map as early as possible (d8f3613), closes #2777
  • core: respect onDelete: cascade when propagating removal (f1e8578), closes #2703
  • core: revert to require() when getting ORM version to fix webpack support (6cfb526), closes #2799
  • migrations: generate snapshot too when using --initial (4857be7), closes #2800
  • postgres: consider int8 as numeric when inferring autoincrement value (64bc99d), closes #2791
  • sqlite: respect autoincrement: false in schema diffing (b39b6ad), closes #2800
  • typing: fix populate hints on collections where both type args are provided (e39ef5b), closes #2771

Features

  • add better-sqlite driver (#2792) (1b39d66)
  • core: add connect config option (8aaad33)
  • core: add SchemaGenerator.clearDatabase() (ecad9c6), closes #2220
  • core: add populate option to Reference.load and Collection.loadItems (1527c1a), closes #2796

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)

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

5.0.0 (2022-02-06)

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), 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 (0ee9c4d)
  • 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 (022a1cc)
  • sql: split $and branches when auto joining to-many relations (70c795a)
  • sti: allow m:n relations between two STI entities (6c797e9), closes #2246
  • ts-morph: fix validation of embedded polymorphic arrays (b6a068a)
  • types: fix populate type hints for nullable properties (bc1bf76)
  • validation: throw when calling qb.update/delete() after qb.where() (96893e0), closes #2390

Features

  • cli: validate CLI package is installed locally (8952149)
  • cli: add database:create command (#1778) (7e9d97d), closes #1757
  • cli: allow exporting async functions from CLI config (912728d)
  • 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 (1ccfad8)
  • core: add persistOnCreate option and enable it for seeder (f0fec1b)
  • core: add custom table check constraint support for postgres (#2688) (89aca5f)
  • core: allow defining check constraints via callback (965f740)
  • core: expose referencedColumnNames on m:1/1:1 decorators (2f5a5e1)
  • core: make em.create() respect required properties (2385f1d)
  • core: validate required properties before flushing new entities (9eec3a9)
  • core: validate version mismatch in ORM packages (cf70219)
  • core: add EventType.onLoad that fires after entity is fully loaded (14c2fa9)
  • core: add freshEventManager to em.fork() options (a0f3fd0), closes #1741
  • core: add populateWhere option (#2660) (16c5e91)
  • core: add QueryFlag.AUTO_JOIN_ONE_TO_ONE_OWNER (be9d9e1), closes #1660
  • core: add Reference.createFromPK() helper method (2217154)
  • core: add callback parameter to Collection.remove() (0b37654), closes #2398
  • core: add index/key name to naming strategy (a842e3e)
  • core: add PlainObject class that DTO's can extend to treat class as POJO (#1837) (645b27a)
  • core: add support for advanced locking (0cbed9c), closes #1786
  • core: add support for concurrency checks (#2437) (acd43fe)
  • core: add support for custom property ordering (#2444) (40ae4d6)
  • 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 (#2419) (89d63b3)
  • core: allow passing arrays in orderBy parameter (#2211) (0ec22ed), closes #2010
  • core: allow providing custom Logger instance (#2443) (c7a75e0)
  • 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) (fd43099)
  • core: make populate parameter strictly typed with dot notation (3372f02)
  • core: move @UseRequestContext() decorator to core package (253216d)
  • core: rework deep assigning of entities and enable it by default (#1978) (8f455ad)
  • core: support column names with spaces (00b54b4), closes #1617
  • core: use AsyncLocalStorage instead of domain API (be27bf7)
  • core: validate populate hint on runtime for joined strategy too (94877e3), closes #2527
  • core: validate usage of global context (#2381) (f0cbcc2)
  • embeddables: allow using m:1 properties inside embeddables (#1948) (ffca73e)
  • embeddables: support onCreate and onUpdate (288899d), closes #2283 #2391
  • entity-generator: add support for generating M:N properties (c0628c5)
  • entity-generator: add enum generation support (#2608) (1e0b411)
  • 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 (383bc24)
  • 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 (#1815) (9c37f61)
  • mongo: add SchemaGenerator support for mongo (#2658) (cc11859)
  • mongo: upgrade node-mongodb to v4 (#2425) (2e4c135)
  • query-builder: add qb.getCount() method (f773736), closes #2066
  • query-builder: allow awaiting the QueryBuilder instance (#2446) (c1c4d51)
  • 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 (3c9f8e9)
  • 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 (#2139) (7d78d0c)
  • typings: make em.create() and other methods strict (#1718) (e8b7119), closes #1456
  • typings: make toObject() and similar strict (#1719) (c202396)
  • support flushing via Promise.all() (f788773), closes #2412

Performance Improvements

  • core: do not update entity state on forking EM (de3191c)

BREAKING CHANGES

Please see the upgrading guide.

4.5.10 (2021-12-26)

Bug Fixes

  • core: allow putting not managed entities to remove stack (7a47151), closes #2395
  • core: defer cascading of persist operation (6abb3b0), closes #2161
  • core: do not override internal EM instance when forking EM (8139174), closes #2342
  • core: do not save entity state in merge when it's not initialized (4141539), closes #1927
  • core: fix assigning to object property without value (90165ab), closes #2492
  • core: fix collection state when forceEntityConstructor is used (674abbb), closes #2406 #2409
  • core: fix reflection of enums in babel (a5b8ee9), closes #2198
  • core: fix serialization of self referencing collections (79c2a10), closes #2059
  • core: rehydrate custom types when using metadata cache (3bcb9a5), closes #2489
  • core: remove entity from its bidirectional relations after delete (7e40b5c), closes #2238
  • embeddables: add missing serialization options to @Embedded() (9f91578), closes #2464
  • embeddables: ensure order of discovery does not matter for embeddables (b095d9e), closes #2242
  • embeddables: fix validating nullable object embeddables (8ab2941), closes #2233
  • mongo: allow using pool.min/max options in mongo driver (9223055), closes #2228
  • mongo: do not use separate update queries for M:N collections if not needed (e57984d), closes #2483
  • postgres: add extra array operators (#2467) (576117e)
  • reflection: relative paths not stripped completely (#2164) (ab3f1c6)
  • sqlite: patch dialect only once (ea6a764), closes #2422
  • sti: fix prototype of child entity after it gets loaded (a0827f5), closes #2493 #2364
  • sti: respect custom table names (42a9522), closes #2356
  • validation: validate missing 1:m mappedBy key in factory (e75fcff), closes #2393

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)

4.5.9 (2021-08-24)

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

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)

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

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)

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

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

4.5.3 (2021-04-09)

Bug Fixes

  • core: do not auto-join composite relations when not needed (b1420a6), closes #1658
  • core: ensure eager loaded relations are actually loaded (897c7bd), closes #1657
  • core: fix aliasing of embeddables in update query (#1650) (6cb5f62)
  • discovery: fix metadata validation of nested embeddables (1d7c123), closes #1616
  • knex: find by custom types with object subconditions (#1656) (d8c328a)
  • postgres: improve extra updates logic for batch updates (84b40bc), closes #1664

Features

  • postgres: fix batch inserts with PKs with custom field name (4500ca7), closes #1595
  • query-builder: allow passing raw query bindings via qb.raw() (aa423a5), closes #1654

4.5.2 (2021-04-06)

Bug Fixes

  • core: fix mapping of complex composite keys (c0c658e), closes #1624
  • core: fix querying embeddables over cast fields (#1639) (cb5b25c)
  • core: support advanced custom types in batch queries (88cc71e), closes #1625
  • core: support native bigint as primary key (#1626) (bce7afe)
  • knex: find entity by advanced custom types (#1630) (ef945d5)

4.5.1 (2021-03-27)

Bug Fixes

  • core: create child entities that use Reference wrapper as new (b14cdcb), closes #1592
  • core: support Collection.loadCount for unidirectional M:N (27e4dd2), closes #1608
  • core: support nested embeddables inside embedded arrays (088c65d), closes #1585
  • core: support sql fragments in custom types with joined strategy (527579d), closes #1594

4.5.0 (2021-03-21)

Bug Fixes

  • core: apply filters when populating M:N relations (cd8330a), closes #1232
  • core: do not process knex.ref() via custom types (ba2ee70), closes #1538
  • core: do not update entity state when cascade merging (6c74109), closes #1523
  • core: expose filters in some repository methods (a1e1553), closes #1236
  • core: fix auto-joining with $not operator (8071fd0), closes #1537
  • core: support operators in json property queries (cb5e715), closes #1487
  • sqlite: ensure booleans are hydrated as booleans (4e36df2), closes #1553
  • sqlite: fix calling em.find() from hooks (fec3285), closes #1503

Features

  • cli: allow mikro-orm config to return Promise (#1495) (629aae9)
  • core: add Collection.matching() method to allow pagination (#1502) (1ad3448), closes #334
  • core: add close method to CacheAdapter interface (2795b5a), closes #1509
  • core: allow updating nested 1:1 and m:1 references with EntityAssigner (#1535) (c1dd048)
  • core: infer configuration from environment variables (#1498) (1ff07a7), closes #1472
  • core: support custom types in embeddables (53305d3), closes #1519
  • core: support embeddable arrays (#1496) (57b605c), closes #1369
  • reflection: support enum arrays and custom types (dc65527), closes #1497
  • validation: validate correct reference types (381b5b9), closes #1568

4.4.4 (2021-02-21)

Bug Fixes

  • cli: fix debug command with file globs (5ec60e2), closes #1465
  • core: allow extending existing custom types (cc34d7e), closes #1442
  • core: do not define dynamic id property if not needed (e13188f), closes #1444
  • core: improve quoting of advanced custom types (cda3638)

Performance Improvements

  • core: improve processing of 1:m relations (#1450) (f5c1818)

4.4.3 (2021-02-14)

Bug Fixes

  • core: handle convertToJSValueSQL at QB level too (fbb2825), closes #1432
  • core: ignore falsy values in Collection.remove() (3447039), closes #1408
  • core: propagate custom join columns to inverse side (m:n) (3f0a7b2), closes #1429
  • core: quote custom type aliases (#1415) (6f6d1ec)
  • core: respect mergeObjects only for POJOs in assign helper (c5bbcee), closes #1406
  • core: use generic comparison for object properties (e9073cf), closes #1395

4.4.2 (2021-02-04)

Features

4.4.1 (2021-02-01)

Bug Fixes

  • core: alias pivot fields when loading m:n relations (56682be), closes #1346 #1349
  • core: allow assigning null to embeddable property (#1356) (f3a091e)
  • core: fix eager relations with joined loading strategy (ba94e28), closes #1352
  • migrations: fix generation of empty migrations (#1362) (7ec9f30)
  • sti: respect child types when querying for STI entity (df298a1), closes #1252
  • typing: improve handling of array properties (9d82ffb), closes #1077

4.4.0 (2021-01-24)

Bug Fixes

  • core: em.create() should not mutate the input object (b83b211), closes #1294
  • core: allow using lazy flag with formulas (4b2b5ce), closes #1229
  • core: always make new entity snapshot (1dacf1e), closes #1334
  • core: apply discriminator condition when loading STI entities (9c62370), closes #1252
  • core: clear inverse references to removed entities (3a1d927), closes #1278
  • core: fix creating entity graph from deeply nested structures (833d246), closes #1326
  • core: fix custom types with joined loading strategy (f64e657), closes #1237
  • core: fix nullable embeddables in object mode (bb8dbce), closes #1296
  • core: fix pessimistic locking via em.findOne() (a0419a4), closes #1291
  • core: improve custom sql expression detection (cf8c5cd), closes #1261
  • core: make PK property of Reference required (5e1cf23)
  • core: respect context when working with filter params (97ed314), closes #1312
  • core: support FK as PK in Collection.getIdentifiers() (#1225) (f8024c9), closes #1224
  • entity-generator: emit collection name in decorator (#1338) (33574e8), closes #1328
  • mongo: fix using custom field name on relations (44becca), closes #1279
  • mysql: enforce 64 character limit for identifier names in SQL (#1297) (9c83b6d), closes #1271
  • schema: fix index name with explicit schema (b62d9ec), closes #1215
  • schema: fix renaming of multiple columns at the same time (677a2b7), closes #1262
  • sql: sort fetch-joined properties on their orderBy (#1336) (f18cd88), closes #1331

Features

  • core: add support for nested embedddables (#1311) (aee2abd), closes #1017
  • core: add support for nested partial loading (#1306) (3878e6b), closes #221
  • core: allow disabling identity map and change set tracking (#1307) (03da184), closes #1267
  • core: allow using native private properties (fc35c22), closes #1226
  • core: implement transaction lifecycle hooks (#1213) (0f81ff1), closes #1175
  • core: support handling Set as array-like input (#1277) (2945b8c)
  • mysql: allow specifying collation globally (cd95572), closes #1012
  • query-builder: add support for onConflict() (b97ecb5), closes #1240

Performance Improvements

  • core: make IdentityMap iterable (e13757a)

4.3.4 (2020-12-11)

Bug Fixes

  • core: hydrate embeddable scalar properties (#1192) (eb73093)
  • core: validate overridden properties by embeddables (#1172) (6629a08), closes #1169
  • knex: reject in commit() method if commit statement fails (#1177) (f3beb7f), closes #1176
  • mariadb: fix transforming of raw results in run mode (417a4c9)
  • sql: ensure correct order of results when fetch joining (7453816), closes #1171
  • sql: use __ when aliasing fetch-joined properties (1479366), closes #1171

Features

  • core: auto-discover base entities (33bda07)

4.3.3 (2020-12-04)

Bug Fixes

  • cli: print both entities and entitiesTs in debug command (90b85e4), closes #1139
  • core: fix em.create() with nested relations (dde119f), closes #1150
  • core: fix populating 1:m where the owner uses mapToPk (85a7c9d), closes #1128
  • core: fix propagating of changes to 1:m with mapToPk (b38df3e), closes #1128
  • core: fix snapshotting of composite properties (b5f19f2), closes #1079
  • schema: allow using const enums (e02ffea), closes #1096
  • schema: fix diffing tables in other than default schema (429d832), closes #1142 #1143
  • sql: allow no results in em.count() (bc3cdf6), closes #1135
  • sqlite: fix querying by 1:1 relation with composite PK (0da6347), closes #1157

4.3.2 (2020-11-24)

Bug Fixes

  • core: disable propagation when mapToPk is used (6f6a204), closes #1124
  • core: do not use custom toJSON when storing result cache (86ec3b3)
  • core: fix comparison of object properties and bigints (2119a65), closes #1117
  • core: fix computing changesets with reference as PK (5504436), closes #1111
  • core: fix serialization of properties with same name (d4d9c48), closes #1115
  • sql: allow using raw value for JSON prop with custom type (2a17c59), closes #1112

4.3.1 (2020-11-20)

Bug Fixes

  • core: assign embedded properties from class objects (#1087) (c2b4972), closes #1083
  • core: do not interpolate escaped question marks (c54c2a2)
  • core: rework unique property extra updates (bd19d03), closes #1025 #1084
  • postgres: use ->> to search in object embeddables (78c9373), closes #1091
  • ts-morph: fix discovery of IdentifiedReference with ts-morph (d94bd91), closes #1088

4.3.0 (2020-11-13)

Bug Fixes

  • cli: add missing peer dependencies (#1057) (83bd6b3)
  • core: always check remove stack when cascade persisting (a9a1bee), closes #1003
  • core: do not override child class properties (#1000) (6d91f1f)
  • core: ensure correct grouping and commit order for STI (8b77525), closes #845
  • core: ensure correct handling of empty arrays (c9afabb)
  • core: ensure correct handling of empty arrays (1c4ba75)
  • core: ensure we store the right value for bigint PKs (7d7a1c9), closes #1038
  • core: fix cascading when assigning collections (d40fcfa), closes #1048
  • core: pin dependencies (0f3a8e5), closes #961
  • deps: update dependency @docusaurus/core to v2.0.0-alpha.66 (#978) (475d3b0)
  • deps: update dependency @types/mongodb to v3.5.33 (#1045) (81514d8)
  • discovery: allow using absolute paths in entities (584854c), closes #1073
  • mongo: do not create collections for embeddables (a0cc877), closes #1040
  • schema: do not add unique constraint to PKs (a7da03d), closes #1064
  • schema: ensure we do not ignore some columns (5d7dfc1), closes #1009
  • schema: fix diffing FKs in MySQL 8 (#1030) (b6f31a5)
  • schema: pass entity name to joinKeyColumnName() (fe4b7bd), closes #1026
  • sql: allow using dot inside custom order by expression (11e8c56), closes #1067
  • sql: convert custom types at query builder level (83d3ab2)
  • sql: do not batch update unique properties (87b722a), closes #1025
  • sql: fix populating M:N via joined strategy with conditions (7113827), closes #1043
  • sql: implement diffing of simple scalar indexes (dc81ef0), closes #957
  • sql: inline array parameters when formatting queries (a21735f), closes #1021
  • sql: interpolate ?? as identifier (a3d4c09), closes #983
  • sql: take snapshots of collections populated via joined strategy (5f3288a), closes #1041
  • validation: don't validate inherited STI props (#998) (63d1f57), closes #997

Features

  • core: allow calling Collection.set() on not initialized collections (1d0bb85), closes #1048
  • core: allow extending embeddables (#1051) (89d3250), closes #1049
  • core: allow mapping null to undefined optionally (55de84e), closes #1019
  • core: allow using multiple ORM instances with RequestContext (e11040d), closes #872
  • core: maintain transaction context automatically (#959) (e0064e4)
  • count: initial implementation of loadCount (#955) (3371415), closes #949
  • query-builder: allow mapping of complex joined results (#988) (60dd2d8), closes #932
  • release: add automatic nightly releases (7f8a10c), closes #339

4.2.3 (2020-10-24)

Bug Fixes

  • core: ensure qb.getFormattedQuery() works with postgres (63b2521)
  • core: ensure global filters are enabled by default (#952) (28124fb)
  • core: rework access to target entity metadata from collections (10ca335), closes #956

4.2.2 (2020-10-22)

Bug Fixes

  • core: fix mapping of params with custom types (e5049b1), closes #940
  • schema: make sure we do not create FK columns twice in sqlite (1eb6374), closes #942
  • only create migrations folder if migrationsList is not used (#941) (1e5c5e8), closes #907
  • core: fix wrongly inferred 1:m metadata (82f7f0a), closes #936

Features

  • core: add MetadataStorage.clear() to clear the global storage (c6fa0f4), closes #936

4.2.1 (2020-10-20)

Bug Fixes

  • core: make sure refreshing of loaded entities works (45f3f42)
  • core: validate object embeddable values on flush (cd38e17), closes #466
  • core: validate the object passed to em.persist() (90678c2)

4.2.0 (2020-10-18)

Bug Fixes

  • core: fix propagation of conditions with operators (05acd34)
  • core: reset the working state of UoW after failures (6423cf7)
  • core: update umzug types to 2.3 (4668e78), closes #926
  • core: use entity ctors also when all PKs are provided in em.create() (b45b60b), closes #924
  • schema: fix automatic discriminator map values in STI (7cd3c6f), closes #923
  • schema: improve column type equality check (#925) (152f399)

Features

  • core: add basic (in-memory) result caching (2f8253d)
  • core: add native support for enum arrays (9053450), closes #476
  • core: allow defining multiple entities in single file (e3ab336), closes #922
  • core: allow mapping m:1/1:1 relations to PK (#921) (894f17e), closes #750
  • core: allow storing embeddables as objects (#927) (ba881e6), closes #906
  • serialization: rework handling of cycles (1a2d026)

4.1.1 (2020-10-14)

Bug Fixes

  • postgres: escape question marks in parameters (813e3cd), closes #920

4.1.0 (2020-10-12)

Bug Fixes

  • core: allow defining PKs inside @BeforeCreate() (0a2299f), closes #893 #892
  • core: do not cascade remove FK primary keys (37415ce), closes #915
  • core: do not fire onInit event twice (9485f48), closes #900
  • core: ensure custom types are comparable (3714a51), closes #864
  • core: fix detection of custom type PKs with object value (61095ce), closes #910
  • core: fix mapping of returning zero values in embeddables (e42ae4a), closes #905
  • core: skip index initialization for abstract entities (#881) (a2d381f)
  • migrations: always ensure the migrations folder exists (a1e0703), closes #907
  • migrations: respect custom file names when running by name (80e5b58), closes #883
  • mongo: filter by serialized PK inside group condition (a492a64), closes #908
  • postgres: do not convert date type columns to Date js objects (2cfb145), closes #864
  • schema: allow using non-abstract root entity in STI (9dd3aed), closes #874
  • schema: make STI metadata discovery order independent (f477a48), closes #909
  • sqlite: rework schema support for composite keys in sqlite (82e2efd), closes #887
  • typings: improve inference of the entity type (67f8015), closes #876

Features

  • core: add EntityRepository.merge() method (f459334), closes #868

Performance Improvements

  • core: implement bulk updates in mongo driver (5f347c1), closes #732
  • core: implement bulk updates in sql drivers (b005353), closes #732
  • core: improve hydration performance (3cafbf3), closes #732
  • core: interpolate query parameters at ORM level (742b813), closes #732
  • core: optimize entity hydration (6c56a05), closes #732
  • core: use batching in uow deletes (8cbb22a), 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 compilation for diffing entities (60f10a4), closes #732
  • core: use JIT compilation for snapshotting entities (5612759), closes #732
  • core: use JIT compilation in hydrator (1f06a52), closes #732
  • core: use JIT compiled PK getters/serializers (0ec99dc), closes #732
  • core: use raw sql for batch updates (1089c57), closes #732

4.0.7 (2020-09-24)

Bug Fixes

  • core: do not store original data for references (0a9ef65), closes #864

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)

Bug Fixes

  • deps: update dependency escaya to ^0.0.49 (#854) (d4737b6)
  • migrations: migrate only one version down with explicit tx (50567dd), closes #855
  • query-builder: do not select 1:1 owner when auto-joining (86c3032), closes #858
  • query-builder: fix auto-joining of 1:m PKs (920995f), closes #857
  • query-builder: fix count query with auto-joining of 1:1 (9b8056c), closes #858
  • query-builder: wrap nested array conditions with $in operator (939989a), closes #860

4.0.5 (2020-09-21)

Bug Fixes

  • core: fix merging results from QB to existing entity (218098a)
  • schema: defer creating of composite indexes + implement diffing (f57b457), closes #850

Features

  • mapping: make @Unique and @Index (optionally) typesafe (afe6801), closes #850

4.0.4 (2020-09-19)

Bug Fixes

  • core: allow filter condition callbacks without arguments (5b3401f), closes #847
  • core: allow filter condition callbacks without arguments (da8fbfc), closes #847
  • core: allow querying ArrayType with a value (e505358), closes #844
  • core: improve metadata validation of STI relations (0b97af8), closes #845
  • core: update filter typing to allow async condition (#848) (2188f62)
  • deps: update dependency escaya to ^0.0.44 (#839) (fedb41c)
  • deps: update dependency escaya to ^0.0.45 (#842) (d9f9f05)
  • query-builder: fix mapping of 1:1 inverse sides (a46281e), closes #849
  • query-builder: fix mapping of nested 1:1 properties (9799e70)

Features

  • core: allow setting loading strategy globally (e4378ee), closes #834
  • migrations: allow providing transaction context (1089c86), closes #851

Performance Improvements

  • move reference to metadata to entity prototype + more improvements (#843) (f71e4c2), closes #732

Reverts

  • Revert "refactor: return target from decorator definition" (e021617)

4.0.3 (2020-09-15)

Bug Fixes

  • core: make a copy of custom type values to allow array diffing (6ae72ae)

Features

  • core: allow using AsyncLocalStorage for request context (47cd9a5), closes #575

Performance Improvements

  • core: create the helper instance early (f4f90eb)
  • core: do not generate internal entity uuid (9f46aa4)
  • core: do not use em.merge() internally (6a1a6d6)
  • core: remove WrappedEntity.__internal map (2228fcb)
  • core: skip processing of hooks when there are no hooks (425784b)
  • core: store entity identifier on entity helper (403acca)
  • core: store original entity data on entity helper (6a91b01)

4.0.2 (2020-09-11)

Bug Fixes

  • core: simplify Collection type args (1fb6cec)

Features

  • entity-generator: do not use ts-morph (478a7bb)
  • migrations: do not use ts-morph in migrations (9800dc1)

4.0.1 (2020-09-10)

Bug Fixes

  • core: hydrate user defined discriminator columns (#831) (8671440), closes #827
  • core: refactor internals to reduce number of cycles (#830) (3994767)

4.0.0 (2020-09-08)

Bug Fixes

  • cli: custom tsconfig gets wrong path (#597) (3cdb5dd)
  • core: add RequestContext.createAsync() for Koa (ae3bc0f), closes #709
  • core: allow date to be used as primary key (#609) (d421be8)
  • core: allow having same property name as entity name (6b9d4cd), closes #655
  • core: allow hiding PKs in toObject() (0a920dd), closes #644
  • core: allow populating FK as PK in toJSON() (e05d780)
  • core: do not cascade merge new entities (2b0f208)
  • core: do not lookup in identity map with non-PK conditions (4fb0e52), closes #625
  • core: do not merge entity instances in em.create() (50aaef8)
  • core: fix em.create() with deeply nested data (#683) (a302473), closes #678
  • core: fix default value for cache.enabled (9be725f)
  • core: fix extracting PK out of reference wrapper (db037dc), closes #589
  • core: map values from returning clause via hydrator (c5384b4), closes #725
  • core: mark all properties as populated for new entities (5f7fb8f), closes #784
  • core: reset collections when assigning to those not initialized (e19a6b4)
  • core: support comments in tsconfig.json (6506695), closes #730
  • core: support nullable bigints (3bb2a2d), closes #631
  • core: support self referencing with Reference wrapper (fd1e158), closes #610
  • core: throw when trying to call em.remove(..., null) (77c52dd)
  • mapping: support mixed M:N with composite PK on one side only (a951918)
  • mariadb: enable bigNumberStrings toggle (ee90c64), closes #578
  • mongo: add support for $re operator in mongo (13fe6e5), closes #613
  • postgres: time column type should be a string (#774) (237ddbf)
  • query-builder: make sure $or and $and combined works correctly (c8d3a34), closes #792
  • query-builder: make sure we use the right alias in complex $and queries (522787e), closes #786
  • query-builder: use correct operators in complex and/or conditions (#803) (aca0e10)
  • schema: do not create indexes for each composite PK (91b38cb), closes #760
  • postgres: keep bigint/numeric types as string (014f3b5), closes #324
  • sql: pivot joining of m:n when no target entity needed directly (2b0bb72), closes #549
  • sql: pivot joining of m:n when target entity is null (3b05a59), closes #548
  • sql: rework implicit m:n pivot joining (7928c50)
  • sql: support composite keys in EntityCaseNamingStrategy (8d07727)
  • sql: use composite FKs instead in schema generator (f5c2302)
  • utils: ts-node check now runs in a webpack environment (#657) (4384019)

Features

  • core: add driver.nativeInsertMany() method (#688) (78b2341), closes #442
  • core: add em.begin/commit/rollback methods (#717) (5414c52)
  • core: add EntityRepositoryType symbol (#698) (ffae0a8), closes #696
  • core: add expr helper to allow custom expressions in EM API (39ced1b), closes #802
  • core: add property serializers (3d94b93), closes #809
  • core: add support for entity and property comment (#668) (c01b338)
  • core: add support for filters/scopes (#663) (c1025b9), closes #385
  • core: add support for flush events (#642) (1f12aff), closes #637
  • core: add support for ordering by NULLS (#677) (74ee0cb), closes #675
  • core: allow persisting 1:m collections (#686) (379b289), closes #467
  • core: allow using knex.raw in query params (e6b9f0e), closes #802
  • core: allow using destructing assignments in entity ctors (06a5490), closes #781
  • core: execute hooks via EventManager (#623) (6a7f627), closes #622
  • core: expose populate parameter in wrap(e).init() (d33432a), closes #814
  • core: readonly entity (#738) (7581592)
  • core: refactor internal dependencies to support Yarn PnP (#645) (7e21bb8)
  • core: refactor merging to allow querying by custom type (#800) (bfbc5f8), closes #739
  • core: support globs in entities (#618) (ee81b61), closes #605
  • core: type safe references (#691) (77d64ba), closes #214
  • core: use custom errors for failHandler and metadata (6db22af), closes #611
  • migrations: add Migration.execute() method (5c1f60a), closes #770
  • migrations: add support for initial migrations (#818) (26b2228), closes #772
  • migrations: allow specifying list of migrations (#741) (5a0f2a6), closes #705
  • migrations: allow using knex in migrations (fc2fbaa), closes #799
  • postgres: add $ilike, $overlap, $contains, $contained (3c59885), closes #641
  • query-builder: allow ordering by custom expressions (e4674c7), closes #707
  • query-builder: make sure we do not prefix virtual props (fd0766c), closes #734
  • cli: allow the use of TS path mapping (#554) (2444192)
  • core: accept references in collection add/remove/set methods (26d132f)
  • core: add connect: boolean param to MikroORM.init() (43a9ce9)
  • core: add having to FindOptions (952fd2f)
  • core: add custom types for array, blob and json (#559) (7703cc5), closes #476
  • core: add pagination support (QueryFlag.PAGINATE) (#544) (d43241e)
  • core: add support for alternative loading strategies (#556) (0b89d4a), closes #440
  • core: add support for event subscribers (#614) (1281356), closes #516
  • core: add support for lazy scalar properties (#585) (cd8c683), closes #427
  • core: add support for Node.js 14 (#522) (2093af8)
  • core: add support for single table inheritance (#503) (8c45339), closes #33
  • core: allow adding items to not initialized collections (#489) (8be8a4d)
  • core: allow adding items to not initialized collections (#489) (ca5eb64)
  • core: do not cache metadata for other than ts-morph provider (#569) (49fb4eb)
  • core: pass entity as parameter in onCreate and onUpdate (#564) (3044a19)
  • core: split project into multiple packages (#475) (636e861)
  • core: use custom exceptions for driver related errors (#539) (2c30679)
  • discovery: use both entity name and path as key in Metadat… (#488) (72f0aca)
  • mapping: add support for embeddables (#514) (0fa06b1)
  • migrations: support custom migration names (8ea71b6), closes #449
  • mongo: add getCollection() method to MongoEntityManager (79a9a7d)
  • mongo: allow creating any kind of index in mongo (8fbe48a)
  • mongo: allow using different primary key types than ObjectId (#568) (e523794), closes #349
  • postgres: use jsonb column type by default (b6c0578)
  • sql: add execute() method to SqlEntityManager (e389d40)
  • sql: add groupBy to FindOptions (2f6687a)
  • sql: add qb.raw() to allow using raw snippets in QB (c09a5b6), closes #598
  • sql: add support for computed properties via @Formula() (#553) (68b9336)
  • sql: add support for sub-queries (#525) (e07f8ad)
  • sql: allow delete queries with auto-joining via sub-queries (#538) (e44bc56), closes #492
  • sql: allow update queries with auto-joining via sub-queries (#537) (cff9a3a), closes #319
  • sql: ensure correct table order in schema generator (#617) (b3949cf)
  • sql: initialize query builder in select mode (#565) (3e3abe7)
  • ts-morph: add ORM version to cache invalidation logic (f28119a)
  • ts-morph: infer nullability from property types (4c45e00)
  • ts-morph: use .d.ts files for ts-morph discovery (#616) (54ce064)

Performance Improvements

  • cli: transpile only when using ts-node in CLI (f739f39)
  • core: do not generate sql when logging disabled (f232bb3), closes #732
  • core: implement bulk deletes (#757) (d83f648), closes #732
  • core: improve performance of QB a bit (efc044f), closes #732
  • core: improve speed of inserting new items (bfeb2e3), closes #732
  • core: optimize QB for simple cases (99cfca7), closes #732
  • core: reduce usage of wrap helper internally (66ffc3b), closes #732
  • core: simplify MetadataStorage.find() method (9abbe03), closes #732
  • core: use actual Map for identity maps (3645a20), closes #732
  • core: use Set instead of array for cycle lookups (dff0c9d), closes #732
  • core: use Set instead of array for stacks in UoW (12ba811), closes #732

BREAKING CHANGES

Please see the upgrading guide.

3.6.15 (2020-06-05)

Bug Fixes

  • core: do not merge entity instances in em.create() (30010f8)
  • core: fix extracting PK out of reference wrapper (79a4f5a), closes #589
  • mapping: support mixed M:N with composite PK on one side only (a55ea22)

3.6.14 (2020-05-21)

Bug Fixes

  • core: do not extend domain typings (collides with sentry) (#563) (e3cd0bd)
  • core: propagate PKs created via prop.onCreate (#561) (83873ec)
  • mapping: fix handling of fieldName vs joinColumn in m:1/1:1 (#573) (6e2f200)
  • validation: throw when trying to call em.flush() from hooks (#574) (c3d0ce6), closes #493

3.6.13 (2020-05-03)

Bug Fixes

  • core: avoid evaluating virtual properties on find (d234178), closes #535
  • core: fix lazy initializing of composite PK collections (a4c56ed), closes #529
  • core: fix propagation of query when populating (23b2d06), closes #533
  • schema: support empty string in @Property({ default: '' }) (4ec19c7), closes #534

3.6.12 (2020-04-28)

Bug Fixes

  • core: fix qb.count() with composite keys (#520) (51f229a)
  • mapping: do not require method definitions in EntitySchema (58c9643), closes #512
  • mongo: restrict object id conversion only to known properties (86cd027), closes #401
  • schema: use utf8mb4 charset in mysql schema (82fa93d), closes #513

3.6.11 (2020-04-23)

Bug Fixes

  • core: throw when trying to call em.remove(..., null) (f6e3a39)
  • schema: improve diffing of nullable columns (#508) (166a29f), closes #507

3.6.10 (2020-04-22)

Bug Fixes

  • core: do not run onUpdate when persisting new entity (10c0c40), closes #504
  • postgres: do not map returned values that are already present (99a4f01), closes #501 #465

3.6.9 (2020-04-19)

Bug Fixes

  • mariadb: fix diffing nullable columns in mariadb 10.4 (#496) (c36b495), closes #491
  • schema: fix handling of FKs in updateSchema() (#498) (72088ba), closes #494

3.6.8 (2020-04-18)

Bug Fixes

  • core: do not override internal copy of entity data when merging (40830d5), closes #486
  • core: ignore removed entities during commit discovery (7581a3d)

3.6.7 (2020-04-16)

Bug Fixes

  • core: do not propagate remove action to m:1 with orphan removal (94c71c8), closes #482
  • core: export AbstractSqlConnection from mikro-orm (d38cdde), closes #483
  • metadata: fix validation of inversedBy/mappedBy (d2c3ce6)

Features

  • mongo: add support for mongodb text indexes (#481) (75f20f6)
  • mongo: add support for nullable unique indexes (#485) (e8424a0)

3.6.6 (2020-04-12)

Bug Fixes

  • discovery: ignore files that does not return classes (0226137), closes #474
  • postgres: handle case sensitive table names correctly (aa3a087), closes #472
  • sql: do not prefix virtual columns in QueryBuilder (38eaae3), closes #473
  • typings: improve support for Reference wrapper in FilterQuery (7497c45)

3.6.5 (2020-04-08)

Bug Fixes

  • core: do not take snapshots of collection in assign() (b9fe617), closes #467
  • typings: add customType to PropertyOptions (46edde0)
  • typings: improve typing of PropertyOptions.type (587f81d)
  • typings: improve typing of onDelete and onUpdateIntegrity (0a6ae55)

3.6.4 (2020-04-07)

Bug Fixes

  • core: fix conversion of date strings to Date objects (6342ff0)
  • schema: inherit indexes from base entities (bae46c7), closes #463

3.6.3 (2020-04-06)

Bug Fixes

  • mapping: support multiple base entities (A extends B extends C) (6e72881), closes #459
  • mapping: support returning knex.raw from custom type (3dd41ad), closes #372

3.6.2 (2020-04-04)

Bug Fixes

  • cli: respect baseDir in migrations.path (943b0d9), closes #448
  • cli: respect baseDir in debug command (aa653f1), closes #447
  • core: fix circular dependency in EntityGenerator (b886abe), closes #451
  • core: map prop.name to prop.fieldName when it does not match (98d4328)
  • mapping: fix inference of chained PK column type (05b86cf), closes #446
  • migrations: enforce single connection usage for transactions (9fc1e25), closes #444
  • sql: fix support for cross schema m:n collections (36cf26c), closes #450

3.6.1 (2020-04-02)

Bug Fixes

  • core: do not call convertToJSValue when we already have an entity (3cf3da6), closes #435
  • schema: rework enum handling in schema generator (#445) (c041b54), closes #397 #432

3.6.0 (2020-03-30)

Bug Fixes

  • core: fix explicit usage of joinColumn option (bcf2546), closes #425

Features

  • core: allow for the number zero as a primary key (#426) (88b979a)
  • core: improve ts-node detection (f1afaa6)
  • core: support indexes in entity generator (#437) (90c0162), closes #421
  • schema: add safe and dropTables options to schema generator (2d2c73d), closes #416

3.5.2 (2020-03-23)

Bug Fixes

  • mapping: respect columnType option (e96d63d), closes #420
  • sql: simplify transactions handling with knex (9a5763b)

3.5.1 (2020-03-22)

Bug Fixes

  • mysql: add timezone config option and fix TZ docs (e0a5597), closes #418
  • typings: simplify FilterQuery type, remove UnionOfArrays (d919eec)

3.5.0 (2020-03-21)

Bug Fixes

  • core: export ValidationError directly (e3e02ea), closes #404
  • mongodb: do not convert payloads to ObjectId (9a9d9e0), closes #401
  • mongodb: keep topmost transaction context when nesting (d921bc1), closes #400
  • schema: fix schema generator in MySQL 8 (#398) (955b0ac)
  • sql: do not serialize db values from custom types (894e055), closes #372
  • webpack: do not analyze enum values when already provided (3efd6ca), closes #413

Features

  • core: add support for composite keys (#395) (0574dc8), closes #66
  • core: allow manually specifying on update/on delete clause (fc9d86a)
  • discovery: validate not discovered entities used in relations (12338da)
  • migrations: do not create empty migrations without -b (564e988), closes #399
  • mongo: allow passing additional index options (dd3f795), closes #415
  • sql: use collection snapshots to compute precise diff (#405) (d4bda99)

3.4.1 (2020-03-09)

Bug Fixes

  • build: ignore MongoDB data directory (#394) (fea6df0)
  • postgres: ignore other than the current schema (c05bec1), closes #386

3.4.0 (2020-03-08)

Features

3.3.6 (2020-03-06)

Bug Fixes

  • core: add tableName alias for collection (9d19263)
  • core: make dbName optional (infer from clientUrl) (30427c5)
  • mysql: normalize false to 0 in defaults (caff3fd)
  • postgres: fix mapping of double type (8f0547f)
  • schema: postpone FK constraints in schema updates (d0c5fdf), closes #327
  • sqlite: support pivot tables with composite key (25598e2), closes #382

3.3.5 (2020-03-03)

Bug Fixes

  • core: improve default value handling in postgres (#381) (154aab2), closes #380
  • mapping: infer correct type of enums with ts-morph (2aae486)
  • mapping: throw when only abstract entities were discovered (00d7543)
  • utils: improve path detection based in decorators (#378) (c3c5a43)
  • validation: throw when multiple property decorators are used (5a8d3f2)

3.3.4 (2020-03-02)

Bug Fixes

  • core: do not cascade persist removed entities (d2fd33f), closes #369
  • query-builder: substitute top level operators with primary keys (861a0ca)

3.3.3 (2020-02-27)

Bug Fixes

  • core: allow entity in constructor params in em.create() (2846ab4)
  • mapping: allow using custom types on primary keys (ff2b7c9), closes #361
  • mapping: create dirty collections via em.create() (b864038)
  • mapping: remove *Entity interfaces (f5181b2)

3.3.2 (2020-02-26)

Bug Fixes

  • core: make entity manager instance protected in repository (477ed7b), closes #367
  • utils: treat Buffer as scalar when merging objects (#366) (c88e669), closes #365

3.3.1 (2020-02-25)

Bug Fixes

  • mapping: allow enum keys with names matching their value (28315d0), closes #359

3.3.0 (2020-02-25)

Bug Fixes

  • core: do not re-hydrate existing entities in EntityFactory (a727052)
  • core: do not require entity reference to have collection props (3331931)
  • deps: update dependency uuid to v7 (#355) (f2a96aa)

Features

  • core: add loadItems() method to Collection (#347) (de566c5)
  • core: propagate changes to 1:1 and m:1 relations (#352) (4903a48), closes #307
  • core: rework commit logic of UoW to ensure right query order (#351) (52e4b8a)

3.2.1 (2020-02-20)

Bug Fixes

  • schema: fix @Index and @Unique decorators on entity level (c6e3646), closes #344

3.2.0 (2020-02-19)

Bug Fixes

  • cli: do not require existing entities in generate-entities command (4d5853f), closes #340
  • discovery: fix support for globbing (995a3e8), closes #341
  • typing: align EntityRepository populate signature to EntityManager (#343) (ec5a30e)

Features

3.1.1 (2020-02-15)

Bug Fixes

  • cli: remove unused flag from migration:create (45a8d48), closes #326
  • core: add TS non-null assertion operator for non-nullable columns (#323) (e6d6f21)
  • core: report failure of connection during initialization (3153aa9), closes #325
  • postgres: map numeric columns to number properties automatically (60c71a4), closes #324

3.1.0 (2020-01-27)

Bug Fixes

  • core: do not reset collections too early (ad6337e), closes #312

Features

  • core: add em.populate() helper method (26d2f33), closes #310
  • core: add Reference.getEntity() and Reference.getProperty() (05dc5ce), closes #304

3.0.1 (2020-01-23)

Bug Fixes

  • core: fix populate of 1:m with reference wrapper on inverse side (d048b64), closes #302
  • typing: support reference wrapper in FilterQuery type (950d996), closes #305

3.0.0 (2020-01-15)

Bug Fixes

  • core: allow object constructor parameters in entities (967f239), closes #166
  • core: allow persisting 1:1 from inverse side (a1320ba), closes #210
  • core: always ensure correct EM instance when merging entity (72f4525)
  • core: always init collections when creating entity via em.create() (2500cf3)
  • core: always query inverse side of 1:1 association (5a77a39)
  • core: auto-wire 1:1 owner to inverse side (b11d316), closes #151
  • core: disable auto flushing by default [BC] (#79) (3258c50), closes #63
  • core: do not map null value in bool props to false (e54dbbd), closes #262
  • core: do not set EM to entity until merging [BC] (#270) (d09c3ab), closes #267
  • core: do not use request context in transactional/user forks (a2d7cbb), closes #182
  • core: fix querying by m:n primary keys (cb568ee), closes #234
  • core: ignore inverse side of 1:1 when computing change set (a2768dd), closes #183
  • core: make em.find() where parameter required (3393d52)
  • core: make sure constructor params are sniffer from the constructor (fdd157c)
  • core: requireEntitiesArray should be used only for validation (066b0ea), closes #293
  • deps: update dependency chalk to v3 (#243) (0a17eb7)
  • deps: update dependency fast-deep-equal to v3 (#250) (546e950)
  • deps: update dependency ts-morph to v4 (#162) (b6dd073)
  • deps: update dependency ts-morph to v5 (#229) (ab66d9c)
  • deps: update dependency yargs to v15 (#244) (0fe3a55)
  • generator: fixed default values and types for nullable properties (#191) (1cdccd3)
  • mapping: do not override user defined nullable value in m:1 and 1:1 (b22567d)
  • mapping: remove deprecated fk option from 1:m and m:1 decorators [BC] (#87) (99b436a)
  • mapping: remove obsolete parameter in UnderscoreNamingStrategy (#134) (8afa9a7)
  • metadata: fix lookup of path to entity file on windows with tslib (a3c2900), closes #194
  • query-builder: do not ignore parent operator in complex conditions (b9c00bc), closes #247
  • query-builder: do not trigger auto-joining when not needed (b7b7a46), closes #249
  • query-builder: fix malformed query when populate and join are used (244db67)
  • query-builder: do not auto-join already auto-joined relation (6895e08), closes #277
  • schema: do not make FK fields nullable if not needed (9c0ffc1), closes #218
  • schema: prefer user-defined collection names in naming strategy (28f59ec), closes #111
  • serializing: add check for circular references in toObject() (f7eaabb), closes #205
  • serializing: do not ignore already visited collection items (ee4b50b), closes #222
  • sql: support self-referencing m:n in pivot tables (3157572)
  • sql: support uuid like PKs in M:N references (#272) (2abc19f), closes #268
  • sql: support $ne and $eq operators with null (5f16f0a), closes #285

Features

  • cli: add cache:generate command to warm up production cache (9b4f8b6), closes #225
  • cli: add database:import command to run external sql dumps (aea3614)
  • cli: add debug command to help with setting up the CLI (7919071), closes #136
  • cli: add basic CLI tool (#102) (d20db41), closes #101
  • cli: allow specifying path to tsconfig.json (00a1a4d), closes #298
  • core: add support for custom types (#276) (96b2cad)
  • core: add @Repository decorator (e4ca716)
  • core: add em.findAndCount() method (1be8eb1), closes #123
  • core: add findOneOrFail method to entity manager and repository (#142) (0d57b7b), closes #133
  • core: add Reference.set() method (08cbead), closes #264
  • core: add Reference<T> wrapper to allow improved type safety (#117) (cdd44da), closes #107
  • core: add refresh parameter to FindOptions (#271) (a558935), closes #269
  • core: add WrappedEntity.toReference() method (de01463), closes #264
  • core: add support for bundling with Webpack (#200) (9db3633), closes #196
  • core: add support for deep nested conditions with operators (#185) (0fa78e6), closes #172
  • core: add support for eager loading (93a875d), closes #168
  • core: add support for enums via @Enum() decorator (#232) (82ca105), closes #215
  • core: add support for filtering and ordering of Collection items (672bf3b), closes #195
  • core: add support for migrations via umzug (#209) (38ec973)
  • core: add support for read connections (#116) (bc66fd6), closes #77
  • core: add support for virtual property getters (#93) (f413b41), closes #82
  • core: allow assigning PK to undefined/null (72167bd), closes #166
  • core: allow empty where condition in em.count() (ee62b3e), closes #163
  • core: allow filtering and sorting by nested query (bc2b91f), closes #157
  • core: allow populating all relations via populate: true (1012420), closes #160
  • core: allow whitelisting entity fields in em.find() (881b114), closes #176
  • core: do not require entity attribute in collection decorators (#207) (89bbeb0)
  • core: improve logging - add namespaces, colors and highlighting (#109) (64376ec), closes #108
  • core: propagate nested where and orderBy when populating (226af1c), closes #195
  • core: simplify entity definition and rework typings of FilterQuery (#193) (a343763), closes #124 #171
  • core: use composite PK in many to many relations (#204) (e73bbdb), closes #121
  • core: use knex to generate sql + enable connection pooling [BC] (#76) (6d79e57), closes #64
  • core: make options parameter optional in MikroORM.init() (280d9a8)
  • core: support default exported entities (9065ff6), closes #294
  • drivers: add native UUID postgres type (#188) (8fd89fd)
  • drivers: add support for MariaDB (#120) (833834b), closes #110
  • drivers: allow passing additional driver options (1ceb0c1)
  • hooks: add onInit hook fired after entity is created (#92) (64e68ed), closes #83
  • logging: allow logging full query including params (#155) (6050dbf)
  • mapping: add EntityCaseNamingStrategy (fc6da6b), closes #135
  • mapping: add type-safe way to define relationships (423bb33), closes #146 #158
  • mapping: allow overriding getClassName() in NamingStrategy (#88) (b6700b6), closes #15
  • mapping: auto-wire missing references from owner to inverse side (fc61be9), closes #149
  • metadata: add ReflectMetadataProvider, rename the ts-morph one (#240) (d740eb3), closes #235
  • metadata: auto-detect optional properties (cff0dd4)
  • metadata: create instance of metadata instead of static one [BC] (#91) (e4acef0)
  • metadata: improve validation during metadata discovery (1bd1899), closes #114
  • mongo: improve query logging, use inspect instead of stringify (da842a3)
  • postgres: use timestamps with time zone by default (bd48124), closes #161
  • query-builder: allow mapping to entities directly via getResult() (beca08e)
  • query-builder: add $like and $re operators (regexp support) (e6da98f)
  • schema: add basic entity generator (#98) (cc48b52), closes #78
  • schema: add basic schema update (#97) (9bff976)
  • schema: add support for create/drop database (#237) (6e58332)
  • schema: allow dropping migrations table via schema:drop cli cmd (36402b9), closes #220
  • schema: use knex in schema generator (#81) (31bc56e)
  • sql: add autoJoinOneToOneOwner option (f2db3e0), closes #248
  • sql: add forceUtcTimezone option (6bf747d), closes #181
  • sql: support multiple conditions in JOINs (#94) (60b6885), closes #70
  • sqlite: ensure the directory with database exists (908aba2)
  • validation: validate one to one relationship metadata (ce57a3c), closes #149
  • validation: warn when failing to get metadata of an entity (33ce7d3), closes #153

Performance Improvements

  • core: do not cascade persist entity references (#279) (9d9e261)
  • core: make Utils.prepareEntity() faster (69d2cf4)
  • sql: use multi-insert when populating m:n collections (5ece088)

BREAKING CHANGES

Please see the upgrading guide.

2.7.9 (2019-10-10)

Bug Fixes

  • deps: update dependency ts-morph to v4 (#162 (b6dd073)
  • metadata: fix lookup of path to entity file on windows with tslib (a3c2900), closes #194

2.7.8 (2019-09-19)

Bug Fixes

  • validation: allow undefined in nullable entity properties (b5eafc3), closes #132

2.7.7 (2019-09-01)

Bug Fixes

  • mapping: allow defining hooks on base entities (6938398), closes #104

2.7.6 (2019-08-15)

Bug Fixes

  • metadata: add support for tslib (5ffcb24), closes #100

2.7.5 (2019-08-08)

Features

  • core: propagate changes in collections to both inverse/owner sides (c10f8e8)

2.7.4 (2019-07-23)

Bug Fixes

  • core: normalize path to entity to unix style separators (c5933c7)

2.7.3 (2019-07-02)

Bug Fixes

  • deps: update dependency globby to v10 (#72) (4fdda82)
  • deps: update dependency ts-morph to v3 (#71) (abf671b)
  • mapping: map raw results to entities when setting collection items (b562ec1), closes #67
  • metadata: implement version property validation (37a9cf2)

2.7.2 (2019-06-14)

Bug Fixes

  • sql: support IS NULL queries in QueryBuilder (fd6edd5)

2.7.1 (2019-06-12)

Bug Fixes

  • core: allow 1 and -1 in QueryOrderMap to maintain BC (3024386)

2.7.0 (2019-06-11)

Features

  • core: add support for mapping raw DB results via EM.map() (#61) (5d227ae), closes #56
  • core: automatically fix wrongly assigned associations (#62) (05e6ce5)
  • core: change QueryOrder enum values to ASC/DESC/asc/desc (5c18fda)

2.6.0 (2019-05-27)

Features

  • core: add support for partial selects (bcc005e)
  • core: add support for refreshing managed entity via init() (8ae5323)
  • core: add support for transaction locking (#57), closes #41
  • query-builder: allow selecting numeric literals (280e6ea)
  • serializing: add support for hidden properties (4f6f013)

Performance Improvements

  • context: use Domain API instead of async_hooks (#58)

2.5.0 (2019-05-13)

Bug Fixes

  • core: support creating entity with client side UUID via EM.create() (0752fa4)
  • deps: update dependencies to support node 12 (#52), closes #50
  • deps: update dependency fs-extra to v8 (#54)
  • metadata: fix error message for missing TS source file (cb799ca)
  • mongo: log correct taken time in deleteMany (f6fe821)

Features

  • core: persist all managed entities automatically when flushing (dbf6b43), closes #51
  • metadata: validate missing base entities (03d61a8)

2.4.0 (2019-04-27)

Bug Fixes

  • query-builder: do not ignore nested and group conditions (ab64d5a)
  • query-builder: support calling andWhere()/orWhere() without previous where() (516e863)

Features

  • query-builder: add groupBy() and having() to QueryBuilder (1487803)
  • query-builder: add QueryBuilder.clone() method (313deb1)
  • query-builder: allow DISTINCT selects via qb.select('...', true) (31d6079)
  • query-builder: do not wrap fields that contain space (7ee2e5a)
  • query-builder: allow string literals in where conditions (ec27c33)
  • query-builder: support smart query conditions in QueryBuilder (2c5bca4)

2.3.2 (2019-04-26)

Bug Fixes

  • mongo: support entity names in mongo connection API (c719b1e)
  • mongo: support other top level keys than $set in EM.nativeUpdate() (d12bd78)
  • serializing: do not strip falsy values from serialized DTO (93e806f)

2.3.1 (2019-04-25)

Bug Fixes

  • core: do not override loaded entity state when loading it again (79fabcb)

2.3.0 (2019-04-24)

Bug Fixes

  • deps: update dependency ts-morph to v2 (#47)
  • sql: support custom field names in select clause of query builder (b10c67f)

Features

  • core: implement orphan removal (#48), closes #36
  • core: support lookup by array instead of explicit $in condition (4f600d6)
  • query-builder: add support for join() and leftJoin() (#46), closes #45

2.2.2 (2019-04-18)

Bug Fixes

  • serializing: allow serializing deeply nested structures (04c5190)

2.2.1 (2019-04-18)

Bug Fixes

  • entity: allow boolean onlyProperties parameter in entity.assign() (9f318f7)
  • entity: set dirty flag on collections updated via entity.assign() (d9d71fe)
  • sql-drivers: work around empty IN () and NOT IN () conditions (13a1832)

Features

  • core: allow forking EM without clearing identity map (5e4603c)

2.2.0 (2019-04-14)

Bug Fixes

  • core: ignore rest parameter in entity.toJSON() (147de7d)
  • core: merge only objects in assign() with mergeObjects flag (749ca6f)
  • core: use serialized PK in Collection.getIdentifiers() (a24b6bc)
  • mongo: include missing query condition in logger in deleteMany() (bf280b4)

Features

  • core: add @OneToOne decorator (#42), closes #37
  • core: add createQueryBuilder() to EntityRepository API (a8ab04e)
  • core: add support for nullable columns in schema generator (8e508d3), closes #39
  • core: add support for unique index in schema generator (f8a614b), closes #38
  • core: allow changing join columns in 1:m, m:n and 1:1 (dd97760)
  • core: allow entities in query data and where (convert them to PK) (e3a4962)
  • core: allow orderBy in EM.findOne() and support FindOneOptions (0c61703)
  • core: allow self-referencing in M:N collections (5fda213)
  • core: implement shadow properties - @Property({ persist: false }) (6062118), closes #40
  • mapping: use mappedBy/inversedBy in 1:m/m:1 to be consistent (305dc6e)
  • metadata: do not require source files when type provided (f9a237f)
  • query-builder: add andWhere() and orWhere() to QueryBuilder (d1a1127)

2.1.1 (2019-04-05)

Features

  • core: add support for merging object properties in IEntity.assign() (3b401ed), closes #35

2.1.0 (2019-04-04)

Bug Fixes

  • core: rename IEntity.uuid to __uuid to allow using uuid as property (44eb778)
  • core: do not require PK when computing change set (67415f6)
  • core: support custom toJSON implementation in complex structures (2a9f6da)
  • core: support self-referencing in many to one association (0fe4ec7, 2499019)
  • drivers: log correct client url (based on other connection options) (79f37bd), closes #29
  • mysql: convert numeric value of bool fields to boolean (133afaa)
  • serializing: always initialize collections when populating (5290737)

Features

  • core: add support for complex query conditions in SQL QueryBuilder (0ea3f41)
  • core: allow using different PK than id (e.g. uuid) (40bcdc0)
  • core: improve support for ts-node (220bcaa)
  • core: implement Cascade.MERGE and Cascade.ALL (#27), closes #16
  • core: support cascade merging detached entity (8801960)
  • core: support smart search conditions (5537156), closes #20
  • core: support wrapped query with operator in QueryBuilder (8a967b4)
  • drivers: add support for PostgreSQL (edb6eec), closes #17
  • drivers: allow choosing driver via new type option (9e765aa)
  • drivers: allow ordering of 1:M collections (8cfb62d)
  • mongo: support using native helpers on collections directly (5d727e9)
  • mongo: support user and password connection options (a2d9250)
  • query-builder: add support for custom query expressions (#28)
  • schema: add schema generator for SQL (#26)

2.0.3 (2019-03-12)

Bug Fixes

  • allow masking of passwords with special characters (e2bf26d)
  • do not cache Hydrator as it would have reference to wrong factory (fd124d5)
  • require generic type of ChangeSet (fixes older TS compatibility) (d8503d7)

2.0.2 (2019-03-10)

Bug Fixes

  • require path in JS entity schema to fix support of entities array (de63f35)

2.0.1 (2019-03-10)

Bug Fixes

  • reorganize imports to fix circular dependency in built JS code (bf23587)

Features

  • introduce Configuration object (5916435)

2.0.0 (2019-03-09)

Bug Fixes

  • improve hooks - allow changing db properties in beforeCreate/beforeUpdate hooks (closes #5) (26008a0)
  • initialize 1:M collection when loading owner from EM (7c052bc)
  • remove index type signature from PropertyOptions interface (19816ff)

Features

  • add support for MySQL (bcf2a65)
  • add support for SQLite (d3adbb4)
  • add support for vanilla JS (1a38f2f, 9fc4454, a8b1d1f, e123d82)
  • add support for nested populate (28fe1e6)
  • add support for WHERE LIKE clauses in SQL drivers via native regexps (2ad681e)
  • add support for different naming of entity files (e.g. book-tag.ts or book-tag.model.ts) (8fe2816)
  • add basic transactions api to EM (88872ea)
  • add NamingStrategy support (5dd2c65, e0d1e30)
  • add persistAndFlush() and persistLater() methods (3b1ff7a)
  • add possibility to disable auto-flush globally (39ae0ec)
  • allow async methods in hooks (9722e75)
  • allow passing array of entities via entities option (26093f9)
  • allow passing entity class instead of string name in EM methods (CRUD, getRepository, ...) (86acead)
  • allow setting custom base repository globally (9ad19f2)
  • allow usage without BaseEntity (af352f7)
  • allow using options object in EntityManager.find() (e5abcfd)
  • implement cascade persist and remove (7836626)
  • implement metadata caching to JSON files (d958e4d)
  • improve Collection definition - only owner reference is now required (49224cc)
  • improve internal typings, enable noImplicitAny and strict null checks (1a5e32d, 271bffb)
  • read m:1 referenced type via reflection, do not require its definition (5cbb29a)
  • run all queries in transaction when flushing (8c233c0)
  • validate each entity after discovery (06b432e)

BREAKING CHANGES