TypeORM

TypeORM

Open Source

One ORM, every major database, your choice of pattern.

Databases
ORMs & Query Builders

Published 27 September 2026

Scores

Popularity4/5

Comparable GitHub star count to Drizzle and the highest weekly npm download count of the three major TypeScript ORMs, sustained by a long history and NestJS's official documentation, even as community sentiment for greenfield projects has shifted toward its newer competitors.

Learning Curve3/5

Decorator-based entities and a choice between two architectural patterns (Active Record and Data Mapper) give developers more concepts to learn upfront than a single-pattern ORM, though the patterns themselves map closely to familiar object-oriented and repository conventions.

Flexibility4/5

Supporting both Active Record and Data Mapper in one library, plus a query builder for cases the repository API doesn't cover, gives projects more structural choice than either single-pattern competitor offers.

Performance3/5

Decorator metadata and reflection add some runtime overhead compared to lighter, code-first query builders, though there's no separate query-engine process to manage, keeping the overhead more predictable than engine-based ORMs.

Portability5/5

MIT licensed with no proprietary schema language, and the widest range of supported databases of any major JS/TS ORM means the same codebase can target far more backends without a rewrite.

About TypeORM

TypeORM is an ORM for TypeScript and JavaScript that supports both the Active Record and Data Mapper patterns, letting developers choose whether entities carry their own persistence methods or a separate repository layer handles queries. It targets the broadest set of databases of any major JavaScript ORM: PostgreSQL, MySQL, MariaDB, SQLite, Microsoft SQL Server, Oracle, SAP HANA, MongoDB, and Google Spanner, all through one consistent decorator-based API for defining entities, columns, and relations.

Core features include eager and lazy relation loading, unidirectional and bidirectional associations, transactions, and a migration system with automatic migration generation from entity changes. The EntityManager and Repository APIs cover most query needs declaratively, while a query builder handles cases that need finer control. TypeORM also runs outside Node.js — in the browser, React Native, Cordova, Ionic, NativeScript, and Electron — a reach Prisma and Drizzle don't share, thanks to its lack of a native binary engine.

The project has a longer history than its two main TypeScript competitors, dating to 2016, and spent an extended period on a pre-1.0 release cycle that led to community concern about its maintenance trajectory. New maintainers took over at the end of 2024 and substantially increased development velocity through 2025, closing a large backlog of issues and merging hundreds of pull requests. This work culminated in a 1.0 release in 2026, which removed long-deprecated APIs, modernized the minimum supported Node.js and ECMAScript versions, and folded in the features accumulated during the 0.3.x cycle.

TypeORM is open source under the MIT license with no paid tier, and remains deeply embedded in the NestJS ecosystem, where it has long been one of the two officially documented ORM integrations alongside Prisma.

Key Features

  • Supports both Active Record and Data Mapper patterns in the same library
  • Widest database coverage of any major JS/TS ORM: Postgres, MySQL, MariaDB, SQLite, SQL Server, Oracle, SAP HANA, MongoDB, Spanner
  • Decorator-based entity definitions for columns, relations, and indices
  • Automatic migration generation from entity/schema diffs
  • Eager and lazy relation loading with uni-, bi-, and self-referencing associations
  • Runs beyond Node.js — browser, React Native, Cordova, Ionic, Electron
  • Built-in query builder for complex queries beyond the repository API
  • Deep, long-standing integration with NestJS

Pros

  • Broadest multi-database support of any TypeScript ORM, including enterprise engines like Oracle and SAP HANA
  • Flexibility to pick Active Record or Data Mapper per project or per entity
  • Long production track record since 2016 and deep NestJS integration
  • MIT licensed with no paid tier or vendor lock-in
  • Renewed maintenance momentum since 2025, culminating in a 1.0 release in 2026

Cons

  • Spent years on a slow-moving pre-1.0 release cycle that damaged confidence in its long-term maintenance
  • Decorator-heavy API carries more conceptual overhead than Drizzle's SQL-first approach
  • Most current comparisons default to recommending Prisma or Drizzle for new projects
  • Historically large open-issue backlog, though shrinking under the newer maintainer team

TypeORM Pricing

Open Source

Tech Stacks with TypeORM

Next.js + PostgreSQL

Project

Full-stack Next.js app on PostgreSQL (self-managed or a serverless host like Neon), with Clerk, Auth0, or BetterAuth for auth, deployed to Vercel or a container host like Railway.

Frontend

Programming

Hosting

Authentication

Database:
ORM:
Auth:
Deploy on:
CI/CD add-on:
Containerization add-on:
Observability add-on:
Email add-on:
Payments add-on:
Styling add-on:
Analytics add-on:

Angular + NestJS

Project

Enterprise-grade TypeScript full-stack: Angular on the frontend, NestJS on the backend.

Database:
ORM:
Deploy on:
Authentication add-on:
CI/CD add-on:
Containerization add-on:
Observability add-on:
Email add-on:
Payments add-on:
Styling add-on:
Analytics add-on:

Vue + Node.js + PostgreSQL

Project

Vue.js SPA with an Express/Node.js API and a PostgreSQL database, self-hosted or serverless on Neon, Prisma Postgres, or PlanetScale.

Frontend

Programming

Hosting

Authentication

Database:
ORM:
Auth:
Deploy on:
CI/CD add-on:
Containerization add-on:
Observability add-on:
Email add-on:
Payments add-on:
Styling add-on:
Analytics add-on:

Tools Related to TypeORM

Integrates with TypeORM(2)

TypeORM is NestJS's own documented default ORM via the official @nestjs/typeorm package — its decorator-based entities and dependency-injection-friendly repositories are designed around NestJS's architecture specifically.

TypeORM has first-class, long-standing PostgreSQL support with a native driver, migrations, and both Active Record and Data Mapper access to Postgres-backed entities.

Alternatives to TypeORM(2)

TypeORM and Prisma both provide a full-featured, decorator/schema-driven ORM experience for TypeScript, but TypeORM supports a far wider range of databases (including Oracle, SAP HANA, and MongoDB) and offers both Active Record and Data Mapper patterns, where Prisma is schema-first with a single generated client.

TypeORM and Drizzle take different approaches to the same job: TypeORM uses decorator-based entities with a choice of Active Record or Data Mapper patterns, while Drizzle is SQL-first and lighter-weight, favoring queries that read like SQL with a smaller runtime footprint for edge and serverless deployments.

Learning Resources

No resources yet — check back soon.

Tags

JavaScriptTypeScriptSQLOpen SourceWeb Development

Details

Maintained
Yes
GitHub stars
36.7k
Stars updated
2026-09-23