mikro-orm

Installation
SKILL.md

MikroORM — TypeScript ORM with Unit of Work

Overview

MikroORM is a TypeScript ORM for Node.js based on the Data Mapper, Unit of Work, and Identity Map patterns (inspired by Doctrine and Hibernate). Entities are plain classes decorated with @Entity()/@Property(); the EntityManager tracks changes in memory and batches them into minimal SQL on em.flush(). It supports PostgreSQL, MySQL/MariaDB, SQLite, and MongoDB.

Instructions

1. Install the core package and one driver package

npm install @mikro-orm/core @mikro-orm/postgresql @mikro-orm/cli reflect-metadata
# or @mikro-orm/mysql, @mikro-orm/sqlite, @mikro-orm/mongodb

Each driver package re-exports MikroORM and defineConfig pre-wired to that driver — import from the driver package, not from @mikro-orm/core, so driver-specific features (like QueryBuilder on SQL drivers) are typed correctly. There is no type: "postgresql" config key in current MikroORM; the driver import itself selects the backend.

2. Define entities

Installs
2
GitHub Stars
192
First Seen
Sep 8, 2026