Overview
MikroORM has been developed since 2018, mostly by Martin Adámek, and is heavily inspired by Doctrine and Hibernate. Instead of saving each object yourself, you load entities through an EntityManager, change them, and call em.flush(): the unit of work computes the changes and writes them in one implicit transaction, and the identity map makes sure each row is loaded once per request.
Entities can be defined with defineEntity (full type inference, the recommended style), decorators or EntitySchema. The schema generator, migrations with up and down, an entity generator for existing databases, seeders and global filters (useful for multi-tenancy and soft deletes) are all included.
Version 7, released on 11 March 2026 after a year and a half of work, removed Knex and every runtime dependency from the core, switched to native ESM and made the ORM usable outside Node.js. Kysely is now the query runner, and em.getKysely() returns a Kysely instance typed from your entities. Minor releases 7.1 and 7.2 followed, the latter adding PostgreSQL row level security managed from entity metadata.
Pricing and plans
| Plan | Price | What you get |
|---|---|---|
| MikroORM | $0 | MIT licence |
What it does
- Unit of Work and Identity Map
- Changes to managed entities are batched and flushed in one transaction; each row maps to one object per context.
- Typed queries and populate hints
- Filters, relation names and populate hints are checked at compile time.
- Filters
- Global and entity-level filters applied automatically, for soft deletes and multi-tenancy.
- Schema tools
- SchemaGenerator for prototyping, migrations for versioning and EntityGenerator for introspecting databases.
- Kysely integration
- Get a Kysely instance typed from your entities for hand-written SQL-style queries.
- SQL and MongoDB
- Drivers for PostgreSQL, MySQL, MariaDB, SQLite, libSQL/Turso, SQL Server, Oracle, MongoDB and PGlite.
Strengths and limitations
Strengths
- True unit-of-work change tracking, rare in the JavaScript ecosystem
- Zero-dependency core since version 7, better for serverless cold starts
- Strong type checking of filters and populate hints
- Very active maintenance with frequent releases
Limitations
- Largely maintained by one lead developer
- Unit of Work and Identity Map need a request-scoped context (RequestContext or em.fork), which adds concepts to learn
- Version 7 was a breaking upgrade: Knex removed, @mikro-orm/knex renamed to @mikro-orm/sql and automatic .env loading dropped
- Smaller community and fewer tutorials than Prisma or TypeORM
Who it suits
Good for
- Domain-driven backends with complex object graphs
- Developers coming from Hibernate or Doctrine
- Multi-tenant apps that need automatic filters
Look elsewhere if
- Simple CRUD apps where a query builder is enough
- Teams that prefer writing SQL directly
Pricing history
-
MikroORM 7 drops Knex and all core dependencies
MikroORM 7.0.0 replaced Knex with its own query building on Kysely, has zero core dependencies, native ESM and no hard Node.js coupling; @mikro-orm/knex became @mikro-orm/sql. Source ↗
Alternatives to MikroORM
| Tool | From | Free option | Stages |
|---|---|---|---|
| Sequelize Promise-based Node.js ORM | — | ||
| SQLAlchemy Python SQL toolkit and ORM | — | ||
| Prisma ORM Schema-first TypeScript ORM | $10/mo | Free tier | |
| Ent Code-generated Go entity framework | — | ||
| Knex.js JavaScript SQL query builder | — | ||
| Bun (Go ORM) SQL-first Go ORM | — |
Questions
What is the difference between MikroORM and TypeORM?
MikroORM uses a Unit of Work with change tracking and em.flush(), while TypeORM saves entities explicitly; MikroORM also has stricter compile-time checks on queries.
Does MikroORM still use Knex?
No. Version 7 replaced Knex with its own query building and uses Kysely as the query runner.
Does MikroORM support MongoDB?
Yes, alongside PostgreSQL, MySQL, MariaDB, SQLite, libSQL, SQL Server and Oracle.
Does MikroORM generate migrations?
Yes. The migrations package diffs entity metadata against the database and writes up and down migrations.
Sources read for this page