mrkeyoor.com_
Fri 16 Oct 18:53 UTC
Dataevaluationupdated 08 Oct 2026

typeorm review

TypeORM maps JavaScript and TypeScript classes to database tables, then handles queries, relations, transactions, and migrations around those models. It solves the repeated plumbing between application objects and many different SQL databases, with MongoDB support included too.

+2stars / 7d
Verdict

Our TypeORM run installed 962 packages and used 550 MB, then its test command failed after 38 seconds, so the source checkout demands more care than the first entity example suggests. Use it when broad database support or an existing TypeORM codebase makes that maintenance cost worthwhile. For a new service on one SQL engine, test a narrower alternative before committing your data layer.

We ran it

Lab card: what happened when we ran typeormScreenshot of typeorm (typeorm.io)
Install✓ · 25s962 packages · 550 MB
Buildn/ano build script
Tests✗ · 38sran, no count parsed
Repo3806 files~309,081 lines of source · 12.8 MB · 11 CI workflows

Answers from our run

Does typeorm build from source?

Dependencies installed in 25 seconds (962 packages), and the project has no separate build step. We cloned commit 17e858d into a clean Debian container with 3 CPUs and no project-specific setup.

Do typeorm's tests pass?

The test command failed in our container, and its output did not report a pass or fail count.

Who should not use typeorm?

Teams building against one SQL database that would rather keep queries close to SQL: TypeORM's README spans many drivers, runtimes, and two persistence patterns.

What are the alternatives to typeorm?

Prisma, Drizzle ORM, MikroORM. Our TypeORM run installed 962 packages and used 550 MB, then its test command failed after 38 seconds, so the source checkout demands more care than the first entity example suggests.

Setup3/525-second install, 550 MB footprint, and a failed test command
Docs4/5Clear user examples plus detailed contributor and database guidance
Community5/536,664 stars with an October 7 push and active pull requests
Maturity5/5Version 1.1.1 spans many drivers, runtimes, and persistence styles

Discussed on

  1. hnPrisma vs. TypeORM – Which Is Right for You?11 points
  2. hnTypeScript Express Tutorial #7. Relational Databases with Postgres and TypeORM8 points
  3. hnAPI with NestJS #17. Offset and keyset pagination with PostgreSQL and TypeORM4 points
  4. hnShow HN: Bemi for TypeORM – automatic data change tracking4 points
  5. hnGetting Started with NestJS and TypeORM4 points

Who it’s for

TypeScript teams that need one ORM across several database engines.
Existing TypeORM applications that want to stay with its entity, repository, and migration APIs.
Developers who want a choice between Data Mapper repositories and Active Record methods.
Projects that need TypeORM across Node.js, Electron, mobile, or browser-linked runtimes.

Who it’s NOT for

Teams building against one SQL database that would rather keep queries close to SQL: TypeORM's README spans many drivers, runtimes, and two persistence patterns.
Schema-first teams that expect a generated client to define the data layer: TypeORM centers entity metadata and decorators instead.
Contributors who require the default test command to pass in a fresh Node 22 container: our run failed after 38 seconds.
Teams that generate migrations without inspecting them: open issue 12933 reproduces overlapping migrations when an earlier generated migration remains unapplied.

Setup reality

Our sandbox installed commit 17e858d in 25 seconds, pulling 962 pnpm packages and using 550 MB on disk. The repository had no build script or target, so we skipped that step. Tests failed with exit code 1 after 38 seconds; the visible tail shows Mocha's module-loading helpers and pnpm's ELIFECYCLE, not the originating exception.

Using the library still requires a database driver and a DataSource with the relevant host, database, and credentials. Contributor testing asks for an ormconfig.json plus whichever database services the chosen cases exercise. The developer guide offers a compose file for several of them.

The 3,806-file monorepo had 11 CI workflow files and no Dockerfile or root tests directory in our scan. Its current developer guide targets pnpm and documents separate packaging and compile commands, so a successful dependency install does not prove a working application connection or a releasable package.

Nine database families are the reason to choose it

TypeORM supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, SAP HANA, Google Spanner, MongoDB, and related drivers. That breadth is the buying argument. A company with several database engines can keep one entity and repository model instead of teaching each application a different ORM. The README also covers replication, multiple data sources, cross-schema queries, database-specific column types, and migration generation. A small service tied to one PostgreSQL cluster gets less value from carrying all that surface.

The same package reaches Node.js, Electron, Expo, React Native, Cordova, Ionic, NativeScript, and browser use. JavaScript and TypeScript are both supported, as are ESM and CommonJS. Those combinations give an established product room to move, but each extra driver and runtime creates another place where bundling, connection behavior, or a database dialect can differ. Before adoption, build one representative path on the exact runtime and database you will deploy.

Two persistence styles share one package

The README shows two ways to save the same User. A repository obtained from a DataSource supports Data Mapper code, while extending BaseEntity puts methods such as save() on the model itself. Both styles include relations, cascades, transactions, listeners, query building, and schema metadata. That choice is useful when migrating an old application or accommodating separate teams. Within one codebase, however, it can also create two house styles for the same work. Pick one default and document exceptions.

A DataSource owns connection settings and initializes a connection or pool. A normal server creates it during startup, shares it across handlers, and closes it when the process ends. Credentials and driver packages depend on the chosen database; SQLite or sql.js can avoid an external server, while PostgreSQL, MySQL, Oracle, and SQL Server require their own services. The compact entity sample is genuine, but it sits after those operating decisions.

What happened when we ran it

Our sandbox cloned commit 17e858d into an unprivileged Debian container with 3 CPUs, 8 GB of RAM, Node 22, and no secrets. Pnpm installed 962 packages in 25 seconds and occupied 550 MB. The checkout itself contained 3,806 files, about 309,081 lines of source, and used 12.8 MB. The harness found no build script or target, so it skipped build. That result confirms dependency installation only.

The test command failed with exit code 1 after 38 seconds. Its visible tail runs through Mocha's formattedImport, requireOrImport, and loadFilesAsync, followed by pnpm reporting that typeorm@1.1.1 test failed. The original exception is absent from the supplied tail. We cannot say whether a module, configuration choice, database service, or another condition caused it. The defensible finding is that commit 17e858d did not give us a green default test run.

Our scan found 11 CI workflow files, a compose file, no Dockerfile, and no root tests directory. The repository is a pnpm workspace whose main package lives under packages/typeorm. Current contributor instructions explain that the root test task delegates there, first compiles, then runs the faster test command. The 550 MB install is contributor cost rather than the size every application ships, yet it still affects local setup, CI caches, and dependency review.

Five database servers sit behind the full suite

TypeORM's developer guide asks contributors to copy the sample ORM configuration and choose which database definitions to keep. MySQL, MariaDB, PostgreSQL, Oracle, and SQL Server are named prerequisites for their respective test paths. Docker Compose can start several services, including a documented PostgreSQL 17 target, while Oracle remains a separate requirement. One command can invoke the suite, but a meaningful multi-driver run depends on services and configuration outside pnpm.

That distinction matters when reading our 38-second failure. The log tail does not identify a missing service, and the sandbox result must not be stretched into that claim. It does show that installation success did not carry through to tests under a clean Node 22 environment. A team evaluating a driver should run its own database-specific cases, one migration cycle, and the transaction paths it expects to use.

Migration generation still requires human review

Open issue 12933 documents a concrete TypeORM 1.1.1 edge case with better-sqlite3. If migration A is generated but left unapplied, then the entity changes again, migration B can repeat creation of the same table. Both generation commands report success, but running the sequence fails because the table already exists. The issue asks for a warning or refusal when pending migrations exist. Until that changes, generated files belong in code review and should be tested from an empty database.

Recent work also shows maintainers addressing low-level behavior rather than leaving the project still. Release 1.1.1 shipped on September 1, 2026, with fixes for relation values, junction rows, query-runner cleanup, database-specific events, and query grouping. GitHub recorded a push on October 7 and 36,664 stars, with 687 open issues and pull requests combined. That queue is large, yet the recent push and release show active maintenance across a wide compatibility burden.

One SQL engine may not justify this surface

Prisma makes sense when a central schema and generated client are the preferred contract. Drizzle keeps TypeScript queries closer to SQL, while MikroORM concentrates on Data Mapper mechanics. TypeORM earns its place when its particular mix matters: many databases, several runtimes, mature entity mapping, and a choice of persistence style. Existing applications also gain more from continuity than a greenfield comparison suggests.

Our run leaves a precise caution. The 25-second install worked, but 962 packages, 550 MB, and a failed test command are meaningful costs for anyone changing TypeORM itself. Pair that with database-specific test services and migration review. If your project needs the driver breadth, those costs can be reasonable. If it needs one ordinary SQL path, choose the smaller mental model you can explain during an incident.

Alternatives

ProjectWhat it isPick it when
Prisma gh↗A schema-first data toolkit with a generated TypeScript client and migration tooling.pick this instead when a central schema and generated client fit the team's workflow better than decorators.
Drizzle ORMA TypeScript ORM whose query style and schema definitions stay close to SQL.pick this instead when one SQL database and a thinner abstraction matter more than driver breadth.
MikroORMA TypeScript Data Mapper built around identity maps and units of work.pick this instead when Data Mapper behavior is the settled choice and Active Record adds no value.

Sources

  1. TypeORM README
  2. TypeORM developer setup
  3. TypeORM 1.1.1 release
  4. TypeORM issue 12933
  5. TypeORM repository metadata

More data reviews

wine-quality-svc-tuning · dhis2-immunisation-audit · OpenTerminal · The-Quant-Trading-Vault · multimodal-product-discovery · edgequake · the whole board →

Related reading