mikro-orm

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.

MIT License

Downloads
5.6M
Stars
7.2K
Committers
255

Bot releases are hidden (Show)

mikro-orm - v4.3.4

Published by B4nan almost 4 years ago

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)
mikro-orm - v4.3.3

Published by B4nan almost 4 years ago

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
mikro-orm - v4.3.2

Published by B4nan almost 4 years ago

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
mikro-orm - v4.3.1

Published by B4nan almost 4 years ago

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
mikro-orm - v4.3.0

Published by B4nan almost 4 years ago

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
mikro-orm - v4.2.3

Published by B4nan almost 4 years ago

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
mikro-orm - v4.2.2

Published by B4nan almost 4 years ago

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
mikro-orm - v4.2.1

Published by B4nan about 4 years ago

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)
mikro-orm - v4.2.0

Published by B4nan about 4 years ago

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)
mikro-orm - v4.1.1

Published by B4nan about 4 years ago

4.1.1 (2020-10-14)

Bug Fixes

  • postgres: escape question marks in parameters (813e3cd), closes #920
mikro-orm - v4.1.0

Published by B4nan about 4 years ago

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
mikro-orm - v4.0.7

Published by B4nan about 4 years ago

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
mikro-orm - v4.0.6

Published by B4nan about 4 years ago

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
mikro-orm - v4.0.5

Published by B4nan about 4 years ago

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
mikro-orm - v4.0.4

Published by B4nan about 4 years ago

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)
  • 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
mikro-orm - v4.0.3

Published by B4nan about 4 years ago

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)
mikro-orm - MikroORM 4.0.2

Published by B4nan about 4 years ago

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)
mikro-orm - MikroORM 4.0.1

Published by B4nan about 4 years ago

Bug Fixes

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

Published by B4nan about 4 years ago

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.

mikro-orm - MikroORM 3.6.0

Published by B4nan over 4 years ago

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
Package Rankings
Top 0.84% on Npmjs.org
Top 6.72% on Proxy.golang.org
Badges
Extracted from project README
NPM version NPM dev version Chat on discord Downloads Coverage Status Maintainability Build Status
Related Projects