MikroORM is a TypeScript ORM for Node.js built on the Data Mapper, Unit of Work, and Identity Map patterns. It provides type-safe queries, automatic change tracking, and batched transactions via em.flush(). It supports multiple SQL and NoSQL databases through a single API and offers schema generation, migrations, seeding, and a type-safe integration with the Kysely query builder.
What it's for
Build type-safe, performant database layers with minimal boilerplateAutomatic change tracking and batched queries via Unit of WorkMulti-tenancy and soft-delete handling via query filtersPrototype, version, and introspect database schemasSeed databases with realistic test data using entity factoriesUse Kysely's type-safe SQL query builder with MikroORM entities
Features 15
- Batched queries wrapped in implicit transactions via em.flush()
- EntityGenerator for introspecting existing databases
- Event system with entity lifecycle hooks and onFlush events
- First-class Kysely integration with full autocompletion for tables and columns
- First-class support for MongoDB, PostgreSQL, MySQL, MariaDB, SQLite, libSQL, MS SQL Server
- Global and entity-level query filters for multi-tenancy and soft deletes
- Metadata-aware QueryBuilder
- Migrations for versioning schema changes
- Multiple entity definition styles: defineEntity, decorators, EntitySchema
- SchemaGenerator for prototyping database schemas
- Seeding and factories for generating realistic test data
- Support for CockroachDB, Oracle, Turso, Cloudflare D1, and PGlite
- Type-checked populate hints with auto-joined loading strategies
- Type-safe queries, populate hints, and entity operations validated at compile time
- Unit of Work and Identity Map with automatic change tracking
Similar apps
TypeORMOpen sourceCode with Confidence. Query with Power.PriceNot statedTry free—Runs onWebFeatures15
SequelizeOpen sourceFeature-rich ORM for modern TypeScript & JavaScriptPriceNot statedTry freeFree planRuns on—Features14
Drizzle ORMnext gen TypeScript ORM.PriceNot statedTry free—Runs on—Features20
PrismaOpen sourceAgent Infrastructure for TypeScriptPriceUsage-basedTry freeFree planRuns onWebFeatures20
Prisma Data PlatformA modern ORM with a fully managed Postgres database.PriceNot statedTry freeFree planRuns onWebFeatures5
EctoA toolkit for data mapping and language integrated query for ElixirPriceNot statedTry free—Runs on—Features19