# MikroORM: 7.3 out of 10

A strong pick. 5th of 10 in [ORMs and query builders](https://elestia.ai/opensource/orms/index.md).

MikroORM is a TypeScript ORM built on the Data Mapper, Unit of Work and Identity Map patterns. It supports PostgreSQL, MySQL, MariaDB, SQLite/libSQL, MSSQL and MongoDB. It is very actively maintained and technically strong, and v7 brought a zero-dependency core and Kysely underneath. It is a strong choice for teams that want those patterns, but Drizzle, Prisma and Kysely are easier and far more widely chosen for most new projects.

**Best for:** TypeScript backend teams, often on NestJS, who want a rich entity model with Unit of Work and Identity Map and are willing to learn those patterns.

## Scores

- **Overall: 7.3** (likely 6.4 to 8.2)
  - Claude Opus 5.5 (6.8): It is a well-built, very actively maintained ORM, and it is clearly the best pick in its category for Unit of Work and Data Mapper designs. For most new projects, Drizzle, Prisma or Kysely are easier to learn, much more widely used and better known to AI agents. Its reliance on one lead maintainer and the 2026 injection advisories also hold it back. The range is moderate because the main question is how well the project fits the team's style, not its quality.
  - GPT-6.2 Sol (7.8): MikroORM is a strong new-project choice when several related entities change together and the team wants the ORM to keep track of those changes. Prisma is easier to start with for routine CRUD, and Drizzle is a better fit when queries should closely follow SQL. Responsive maintenance supports the recommendation, with uncertainty around the cost of loading large entity graphs and the depth of release ownership.
- **Needed by many: 6.1** (likely 5.1 to 7.2)
  - Claude Opus 5.5 (6.0): Most backend JS/TS developers need to read and write a database, and MikroORM covers both SQL and MongoDB. Its heavy, entity-based Data Mapper approach appeals mainly to developers who want DDD or enterprise patterns. That makes its audience smaller than the category as a whole.
  - GPT-6.2 Sol (6.2): Database access is common in JavaScript and TypeScript backends, and MikroORM covers several database engines without tying users to a web framework. Automatic entity tracking is most useful in apps with substantial business logic, and edge deployments need extra build setup. Developer surveys establish the size of the backend audience more clearly than the demand for this style of ORM.
- **Helps a lot: 7.8** (likely 6.8 to 8.8)
  - Claude Opus 5.5 (7.5): It is a full-featured ORM. It has Unit of Work, Identity Map, migrations, seeders and an entity generator. Since v7 it also has typed QueryBuilder aliases, partial-loading return types and a Kysely instance typed from the entity metadata. Recent releases added triggers, PostgreSQL partitioning and row-level security. Its limits are a heavy abstraction, a steep learning curve and fewer examples for AI agents to learn from than Prisma or Drizzle have.
  - GPT-6.2 Sol (8.1): Version 7.2.11 combines typed relation loading and SQL queries with transactional change tracking and schema migrations. The runnable docs, compiler checks, and explicit request-context errors help developers and coding agents catch mistakes, though agent reliability has little direct evidence. A third-party PostgreSQL benchmark and a user's load test found substantial overhead when loading entities, and the benchmark predates the latest performance patches.
- **Holds up over time: 7.4** (likely 6.3 to 8.4)
  - Claude Opus 5.5 (7.0): Activity is very high: 1,640 commits and 65 releases in the last year, a commit on the day the data was read, and only 14 open issues. The risk is concentration. One lead maintainer funded by sponsors does most of the work, and the Code-Review score of 4 reflects that. v7 was a large breaking release, but it came with a detailed upgrade guide.
  - GPT-6.2 Sol (7.7): The project logged 1,640 commits and 65 releases in a year, and a November performance report prompted a patch within days. The lead maintainer has sponsors and accounts for the recent releases, so release ownership appears concentrated. The v7 move from Knex to Kysely and changes to transaction defaults show that major upgrades can require application changes.
- **Used widely: 4.4** (likely 3.3 to 5.5)
  - Claude Opus 5.5 (4.5): Downloads were about 6.1M in the last 4 weeks against 1.36M a year earlier. That is a ratio of 4.5, just above the 4.1 median, so it is gaining ground slowly. It still has an order of magnitude fewer downloads than Prisma, Drizzle or Kysely. Its 914 dependent repos trail every major peer, and Bluesky and Hacker News attention is minimal.
  - GPT-6.2 Sol (4.3): Four-week downloads rose from 1.36 million to 6.09 million, a 4.49× ratio that modestly exceeds the catalog median of 4.1×. That growth trails Prisma and Drizzle, and MikroORM's 914 tracked dependent repositories trail most peers with counts. Medusa installs the core transitively, and the tracker covers only part of GitHub, so direct adoption is hard to size.
- **Vouched for: 5.6** (likely 4.2 to 6.9)
  - Claude Opus 5.5 (4.5): Independent comparisons consistently name it as the pick for DDD and Unit of Work, and NestJS has an official integration for it. It has no clear survey ranking and few public production case studies. Most of the detailed write-ups come from the maintainer's own blog.
  - GPT-6.2 Sol (6.6): Medusa builds its persistence layer on MikroORM 6, and NestJS documents a version 7 integration. Developers report that the unit of work helps with complex services, while others prefer Prisma's simpler workflow. The older State of Databases survey had only 24 MikroORM ratings, so current satisfaction with v7 is difficult to gauge.
- **Safe: 6.7** (likely 5.6 to 7.7)
  - Claude Opus 5.5 (6.0): The core has zero runtime dependencies and an MIT licence, and fixes ship within days. On the other side, 2026 brought a critical SQL injection advisory (CVE-2026-34220), a high-severity prototype pollution advisory, and a second SQL injection in @mikro-orm/sql. That points to a real class of input-handling risk. The Scorecard is 6.9, with Token-Permissions, Fuzzing and CII all at 0.
  - GPT-6.2 Sol (7.3): The MIT-licensed core has zero direct runtime dependencies, and deployments add a database driver. Fixes for the March 2026 SQL injection and prototype pollution advisories shipped on both v6 and v7 before public disclosure. The release workflow is configured to generate npm provenance, while OpenSSF flags weak token permissions and limited code review. The number of people who can publish remains unverified.

## Good

- Unit of Work and Identity Map batch changes into one transaction and load each entity only once per request.
- One API works across PostgreSQL, MySQL, MariaDB, SQLite/libSQL, MSSQL and MongoDB, with built-in migrations, seeders and an entity generator.
- v7 has a core with no runtime dependencies, uses Kysely as its query runner, runs on Deno and the edge, and has stricter types in QueryBuilder, em.create and em.assign.
- Issues are triaged very well: only 14 are open against more than 3,300 closed, and releases come out almost weekly.

## Bad

- It has a steep learning curve, and the flush behaviour of Unit of Work surprises developers who don't know the pattern.
- Its community and set of tutorials are much smaller than those of Prisma, Drizzle or TypeORM.
- Moving from v6 to v7 takes real work: APIs were removed, decorator imports moved, and the UTC default changed.
- In 2026 it had two SQL injection advisories (one critical) and one prototype pollution advisory, and most code is written by a single lead maintainer.

## The numbers

- Downloads, 4 weeks: 6.1M
- In a year: ×4.5
- GitHub stars: 9.3k
- Commits, 12 months: 1.6k
- Last npm release: Nov 2026
- Advisories, 24 months: 2
- Licence: MIT
- GitHub: https://github.com/mikro-orm/mikro-orm
- npm: https://www.npmjs.com/package/@mikro-orm/core

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 21 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
