Skip to content

MikroORM v5 #1623

@B4nan

Description

@B4nan

Progress

Breaking changes

  • Require TS 4.1+ to allow using template literals (maybe even 4.2 it if makes sense)
  • Require Node v14+
  • Some methods are now strictly typed (em.create(), em.assign(), qb.insert(), qb.update(), e.toObject(), e.toJSON(), ...)
  • FindOptions.orderBy/fields/ are now strictly typed
  • Remove additional find/findOne/... parameters (populate/orderBy/limit/offset) in favour of FindOptions
  • Use options parameter in em.fork()
  • Remove @Repository decorator (use @Entity({ customRepository: () => CustomRepository }) instead)
  • Enable populateAfterFlush by default
  • migrations.pattern is removed in favour of migrations.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions