## Progress - [x] Seeder package (#929) - [x] Improved schema diffing (should address most of the currently known issues) (#1641) - [x] Better mapping - adds mapped types to abstract most of the column types (e.g. `{ type: t.decimal }`) - [x] FK diffing - [x] Proper index diffing (before we compared just names) - [x] Custom index expressions - [x] Comment diffing - [x] Column length diffing (e.g. `numeric(10,2)` or `varchar(100)`) - [x] Changing PK types - [x] Schena/namespace diffing (posgtres only) - [x] Support FKs in sqlite (including not null FKs) - [x] Use `AsyncLocalStorage` in the `RequestContext` helper - [x] ESM support via `gen-esm-wrapper` (#1010) - [x] Support index hints with the QueryBuilder (#1663) - [x] Strict typings for `em.create()` (#1456) - [x] Strict `toObject()`, `toJSON()` and `toPOJO()` return types - [x] Add more methods to naming strategy (index/unique/pk names, property names for entity generator) - [x] Allow column names with spaces - [x] Support partial loading with joined strategy - [x] Add support for more lock modes (`skip locked/nowait`) (#1786) - [x] Allow setting transaction isolation level - [x] Snapshotting of current db state in migrations (#1815) - [x] Allow using short lived tokens in config (#1818) - [x] Support entities inside embeddables (#1932) - [x] Rework deep assigning and enable it by default (#1811) - [x] Strict typings for populate array (dot notation and string literal types) - [x] Strict typings for fields array (dot notation and string literal types) - [x] Automatic down migrations - [x] Strictly typed `FindOptions.orderBy`, allowing arrays of objects too (#2010) - [x] Support for multiple schemas (including UoW) (#2074) - [x] Validate usage of forked EM (disallow using identity map on the global instance) (#2381) - [x] Improve aliasing of tables (`e0/1/2/3...`) and make it configurable (#2419) - [x] Upgrade mongodb driver to v4 (#2425) - [x] Polymorphic embeddables (#1165, #2426) - [x] Allow awaiting the `QueryBuilder` instance (#2446) - [x] Allow providing custom `Logger` instance (#2443) - [x] Support populating lazy scalar properties via `em.populate()` (#1479) - [x] Support flushing via `Promise.all()` (#2412) - [x] Support auto flush like in hibernate (#2359, #2491) ## Breaking changes - [x] Require TS 4.1+ to allow using template literals (maybe even 4.2 it if makes sense) - [x] Require Node v14+ - [x] Some methods are now strictly typed (`em.create()`, `em.assign()`, `qb.insert()`, `qb.update()`, `e.toObject()`, `e.toJSON()`, ...) - [x] `FindOptions.orderBy/fields/` are now strictly typed - [x] Remove additional `find/findOne/...` parameters (`populate/orderBy/limit/offset`) in favour of `FindOptions` - [x] Use options parameter in `em.fork()` - [x] Remove `@Repository` decorator (use `@Entity({ customRepository: () => CustomRepository })` instead) - [x] Enable `populateAfterFlush` by default - [x] `migrations.pattern` is removed in favour of `migrations.glob` (#2556) https://mikro-orm.io/docs/next/upgrading-v4-to-v5/ https://github.com/mikro-orm/nestjs-realworld-example-app/pull/36
Progress
{ type: t.decimal })numeric(10,2)orvarchar(100))AsyncLocalStoragein theRequestContexthelpergen-esm-wrapper(ECMAScript Modules support #1010)em.create()(Strict typing forem.create#1456)toObject(),toJSON()andtoPOJO()return typesskip locked/nowait) (Postgres SKIP LOCKED #1786)FindOptions.orderBy, allowing arrays of objects too (Order of multiple nested orderBy params #2010)e0/1/2/3...) and make it configurable (feat(core): allow configuring aliasing naming strategy #2419)QueryBuilderinstance (feat(query-builder): allow awaiting theQueryBuilderinstance #2446)Loggerinstance (feat(core): allow providing customLoggerinstance #2443)em.populate()(EntityManager.populateignores lazy scalar properties. #1479)Promise.all()(Support running EntityManager inside Promise.all #2412)Breaking changes
em.create(),em.assign(),qb.insert(),qb.update(),e.toObject(),e.toJSON(), ...)FindOptions.orderBy/fields/are now strictly typedfind/findOne/...parameters (populate/orderBy/limit/offset) in favour ofFindOptionsem.fork()@Repositorydecorator (use@Entity({ customRepository: () => CustomRepository })instead)populateAfterFlushby defaultmigrations.patternis removed in favour ofmigrations.glob(chore: upgrade umzug to 3.0 #2556)https://mikro-orm.io/docs/next/upgrading-v4-to-v5/
mikro-orm/nestjs-realworld-example-app#36