finds.dev← search

// the find

mikro-orm/mikro-orm

★ 9,083 · TypeScript · MIT · updated Jun 2026

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.

MikroORM is a TypeScript ORM built on the Data Mapper pattern with proper Unit of Work and Identity Map implementations, heavily inspired by Doctrine (PHP) and Hibernate (Java). It supports every database you're likely to care about — PostgreSQL, MySQL, SQLite, MongoDB, MSSQL, and even embedded options like PGlite and libSQL. It's for teams that want the discipline of change tracking and transactional flush semantics without dropping down to raw SQL.

Unit of Work flush batches all dirty-tracking into a single transaction automatically — the CASE-based bulk update in the README is exactly what this looks like in practice, not hand-waving. Multiple entity definition styles (decorators, EntitySchema, the newer defineEntity) means you can pick what fits your project rather than fighting the ORM's opinions. Kysely integration for the escape hatch: when you need a real query builder instead of the managed em.find API, you get one that's type-safe and backed by the same connection pool. The package split by driver (@mikro-orm/postgresql, @mikro-orm/sqlite, etc.) keeps your bundle lean.

The RequestContext / AsyncLocalStorage requirement in web apps is a footgun — forget to wrap a route handler and you get shared identity map state across requests, which means stale data or worse. MongoDB support is a second-class citizen; the document/relational impedance mismatch means features like migrations and the QueryBuilder don't apply, and the docs acknowledge this without making it easy to discover. Major version upgrades (v5→v6→v7 all happened within two years) have been breaking enough that the changelog is a wall of migration guides — adopting this means committing to keeping up. The defineEntity API, now the recommended way, ships a circular reference pattern (schema references class, class extends schema.class) that looks strange and trips up tree-shaking analysis tools.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →