mrkeyoor.comAsk

typeorm/typeormtested 09 Nov 2026commit 5a572a4

typeorm review

Use TypeORM when its entities, repositories, database drivers and choice of persistence patterns fit your application, and your team will review generated migrations and relation queries.

  • Safety failed
  • Tests failed
21 sto install
  • 962 packages
Dataevaluationupdated 25 Nov 2026
+7stars / 7d

TypeORM connects JavaScript and TypeScript classes to database tables, with tools for queries, related records and schema changes. It supports Active Record methods on model objects and Data Mapper repositories that handle persistence separately.

Verdict

Use TypeORM when its entities, repositories, database drivers and choice of persistence patterns fit your application, and your team will review generated migrations and relation queries. Skip it when compiler checking of complex SQL references is essential: Kysely's comparison demonstrates TypeORM query strings that compile but fail in PostgreSQL. Our contributor checkout installed in 21 seconds, then its test command exited 1 after 55 seconds.

TypeORM infographic: connects JavaScript and TypeScript classes to database tables, plus our test result and who it suits
Tested 9 November 2026: the source install took 21 s.

We ran it

Lab card: what happened when we ran typeorm
Lab card from our sandbox run
Screenshot of typeorm (typeorm.io)
typeorm.io
Install✓ · 21s962 packages · 550 MB
Buildn/ano build script
Tests✗ · 55sran, no count parsed
Repo3821 files~310,264 lines of source · 12.9 MB · 11 CI workflows

Answers from our run

Does typeorm build from source?

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

Do typeorm's tests pass?

No. The project's own test command exited unsuccessfully after 55 seconds, and its output did not expose an individual test count.

Who should not use typeorm?

Developers who require compiler checking of aliases and column references in complex queries: Kysely's comparison demonstrates unchecked TypeORM query strings.

What are the alternatives to typeorm?

Prisma, Drizzle ORM, Kysely. Use TypeORM when its entities, repositories, database drivers and choice of persistence patterns fit your application, and your team will review generated migrations and relation queries.

Setup3/5Our source checkout installed in 21 s, a heavy install of 962 dependencies, and we did not run a README task.Editor’s note: The contributor install succeeded, but tests failed and the Compose attempt stopped at a lab safety rule; application setup was not completed.
Docs3/5The 4,988-character README has no install instructions of its own and points to separate documentation, which we did not assess.Editor’s note: Release notes explain the 1.0 changes, while the Express tutorial names the removed mysql driver; this evidence does not support a numerical documentation assessment.
Community5/5Last push on 2026-11-25, 36,676 stars and maintainers answered or closed 10 of the 10 most-discussed issues we sampled.Editor’s note: Sampled issues contain user workarounds and maintainer discussion, but do not measure support response times or resolution across drivers.
Maturity4/5Latest release 1.1.3 on 2026-11-12, repository created 2016-02-29 and its test suite did not pass in our sandbox.Editor’s note: Releases and multiple drivers are documented, but the recorded runs contain no successful application workload or populated-schema migration.

How we score

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

Teams whose applications already use entities and repositories, and who can review generated SQL.
NestJS developers who want scoped repository injection and can register their entities explicitly.
Applications that need TypeORM's particular drivers or both Active Record and Data Mapper patterns.

Who it’s NOT for

Developers who require compiler checking of aliases and column references in complex queries: Kysely's comparison demonstrates unchecked TypeORM query strings.
Teams that intend to apply generated migrations without SQL review: issue #3357 records destructive column recreation.
Applications designed around loading large nested object graphs without examining the resulting queries: issue #3857 records row multiplication and expensive hydration.

Setup reality

Our November 9 sandbox run at commit 5a572a4 installed dependencies in 21 seconds, recording 962 dependencies and 550 MB on disk. The harness skipped its separate build step because it found no build script or target. Tests failed with exit 1 after 55 seconds; the visible tail contains Mocha import helpers and pnpm's recursive-task failure.

An application needs its chosen database driver, connection details and a DataSource. The documented decorator path also uses reflect-metadata and TypeScript compiler settings. Nest's integration guide directs production applications to create their schemas with migrations.

TypeORM 1.0 documents Node.js 20+ and ES2023 requirements. The sandbox configuration records the image label lab-node:22. A November 25 Compose attempt failed the lab safety check because hanaexpress requested kernel.shmall, kernel.shmmax and kernel.shmmni; teardown completed successfully.

Short answer

Use TypeORM for entity classes and repositories if your team will review generated SQL; skip it if compiler checking of complex query references is essential. Kysely's comparison demonstrates a TypeORM query that compiles but fails in PostgreSQL. TypeORM suits applications that want related records represented as objects and a choice between persistence methods on those objects and separate repositories. The decision is whether that model fits your application and its hardest queries.

Our November 9 contributor checkout installed in 21 seconds, then its test command failed after 55 seconds at commit 5a572a4, according to our sandbox measurements. Separately, the TypeORM 1.0 announcement describes renewed maintenance. Those findings answer different questions: the announcement describes project activity, while the contributor run records installation and test outcomes. Neither changes the practical responsibility of reviewing SQL before a generated migration touches populated tables.

Maintenance has changed since the old abandonment debate

The maintainers report eight patch releases, 575 merged PRs and more than 2,300 closed issues during 2025 in the TypeORM 1.0 announcement. They say new maintainers took over at the end of 2024 and resumed regular releases after a period without regular maintenance. This is a concrete answer to older descriptions of a stalled project: the maintainers describe both a change in ownership of the work and the releases that followed.

The November 25 GitHub repository check recorded a November 25 last-push date and 768 open issues and PRs combined. The latest-release endpoint returned 1.1.3, published November 12, 2026. Its release notes include fixes for SQL Server locks and releasing database-cache runners after failed removals. These records show continuing changes to database behavior alongside a substantial issue and pull-request queue.

What people use TypeORM for

TypeORM supports Active Record and Data Mapper, giving applications two ways to organize persistence. The official feature list names both patterns: Active Record puts persistence methods on model objects, while Data Mapper uses separate repositories. The application reports below explain why developers chose the library and what happened when migration generation, reusable filtering and nested responses became part of their work.

  • Generated migrations: ryuuji3 said their team chose TypeORM for a production application partly because Sequelize had more limited migration generation, then encountered destructive column changes in issue #3357.
  • Reusable production filters: periman2 described passing a QueryBuilder through generic methods, adding conditions from request data and extending them for particular models in issue #2707.
  • Nested application responses: PaddingtonTheBear reported that roughly 50 rows across seven tables expanded into more than 500,000 query rows and exhausted the Node heap in issue #3857.
  • Large NestJS entity graphs: Nosfistis described approximately 26 nested relations, 98,000 SQL result rows and 35 seconds before NestJS returned the result in the same relation-performance discussion.

These accounts connect TypeORM's features to specific application work. Migration generation reduced the need to write every schema change from scratch; a mutable QueryBuilder supported conditional filters; eager loading assembled nested responses. The costs appeared in the same workflows: destructive generated SQL and large intermediate result sets. That makes the reports useful when choosing representative migration and endpoint cases for an evaluation.

What happened when we ran it

Our November 25 Compose attempt failed the safety check because hanaexpress requested three prohibited kernel sysctls. The run description records every port bound to 127.0.0.1, and the failed safety step names kernel.shmall, kernel.shmmax and kernel.shmmni. The lab permits only net.* sysctls. This was a configuration-policy rejection, and teardown completed successfully.

Our earlier run used commit 5a572a4 on November 9. We measured a successful 21-second dependency installation, 962 dependencies and 550 MB on disk in the contributor sandbox. Its recorded configuration was 3 CPUs, 8 GB of RAM and image label lab-node:22. The repository scan and task outcomes below describe that checkout and harness run, rather than an application installed from npm.

November 9 source step Recorded outcome Meaning for your evaluation
Dependency installation Succeeded in 21 seconds; 962 dependencies; 550 MB The contributor checkout's dependencies installed
Build Skipped: no build script or target found The harness recorded a skipped standalone build
Tests Failed, exit 1, after 55 seconds The default test command ended unsuccessfully
Repository scan 3,821 files; approximately 310,264 source lines; 12.9 MB These figures describe the checkout
Supporting files 11 CI workflows; Compose file; monorepo workspaces; no Dockerfile or tests directory detected These are file-detection results

The failing test tail passes through Mocha's formattedImport, requireOrImport and loadFilesAsync helpers. Pnpm then reports ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL for typeorm@1.1.2 test, with the command pnpm run compile && pnpm run test:fast --, followed by exit status 1 and an ELIFECYCLE failure. The standalone build step and the compilation named inside the test task are separate parts of the record: the harness skipped the former, while the test task included the latter in its command.

Where people get stuck: generated SQL needs review

A PostgreSQL column-length increase from 50 to 51 generated a column drop and recreation in the historical TypeORM 0.2.11 reproduction in issue #3357. Sturgelose described catching a similar destructive change while reviewing a generated migration. A migration is a versioned database change; generation proposes that change from differences between entity definitions and the database schema. Reviewing the resulting operations is therefore part of using the feature.

Symptom What the named report or documentation says Response and status
A generated migration recreates a column ryuuji3's PostgreSQL reproduction in #3357 used 0.2.11 Review and edit the SQL; the captured issue is open
An ID lookup receives null or undefined Historical #9316 reports a lookup returning the first row The 1.0 announcement says high-level where APIs throw by default; use IsNull() to match null
Filters must cross joined tables periman2 offered QueryBuilder joins in #2707 The closed discussion records a user workaround
NestJS misses an entity referenced through a relation Nest's guide excludes relation-only references from autoLoadEntities Register it through forFeature() or configure entities explicitly
The migration CLI asks for a DataSource thm22's n8n upgrade thread shows a manual command without it TypeORM documents the -d argument; follow the application's upgrade procedure too

The null-ID report in #9316, joined-filter discussion in #2707, Nest entity-registration guidance and n8n command failure concern different layers. The n8n thread records Missing required argument: dataSource after a manual migration command. A generic ORM command supplies the CLI syntax; an application that embeds TypeORM also has its own upgrade procedure.

Relation-heavy requests can spend their time rebuilding objects

Nosfistis reported SQL taking a little over one second but a 35-second wait before NestJS returned the result in issue #3857. The query produced 98,000 rows from approximately 26 nested relations and occupied 347 lines after formatting. Those figures distinguish database execution from the later work of parsing results and reconstructing application objects, usually called hydration. Timing the SQL alone would have missed most of the reported delay.

In the same thread, iveselin reported fetching relations in parallel queries as a workaround. A large join can repeat parent data across combinations of related rows; splitting the work changes both the query count and the shape of the returned results. For an endpoint that returns nested JSON, the useful evaluation separates SQL execution time, returned row count and entity reconstruction, then compares the response fields with the relations requested.

The 1.0 upgrade changes which rows your queries return

TypeORM 1.0 uses INNER JOIN for non-nullable relations, so orphaned rows can disappear from results. The release announcement calls for integrity checks against that behavior. A non-nullable relation declares that a matching related row should exist. Changing the join to reflect that declaration affects output when the database contains broken references, even if the application passes its TypeScript compilation step.

The same announcement changes null and undefined handling in high-level where APIs: those values throw by default in find methods, repository and manager mutations, and queryBuilder.setFindOptions(). String-based .where(), .andWhere() and .orWhere() retain their existing behavior. The codemod handles API renames and syntax changes; data integrity and the intended treatment of missing IDs require application decisions alongside those mechanical edits.

For NestJS applications, the announcement names @nestjs/typeorm 11.0.1 as bringing TypeORM 1.0 support. It also documents Node.js 20+, an ES2023 target, removal of automatic TYPEORM_* environment loading and support for mysql2 instead of the old mysql driver. These changes connect the ORM upgrade to the runtime, integration package, configuration and database driver used by the application.

Replicas, connection pools and hooks change operating behavior

With replication configured, find methods and SelectQueryBuilder reads use replicas by default, while raw .query() calls use the primary, according to the multiple-data-sources guide. The guide documents selecting a primary QueryRunner and setting defaultMode: "master" when reads should start on the primary. That routing distinction matters for a request that writes data and then immediately reads it back.

Manually created QueryRunners must be released because they keep connections checked out of the pool, the same guide explains. Its example uses a finally block for release. The guide also documents different database support for multi-database features: cross-database queries within one data source are supported for MySQL and SQL Server, while cross-schema queries are supported for PostgreSQL and SQL Server. Driver support and feature support are separate decisions.

Nest's TypeORM guide warns that synchronize: true can lose production data and directs applications to create the production schema with migrations. For bulk insertion, the insert-query-builder guide says valuesFromSelect() bypasses entity listeners and subscribers, including @BeforeInsert and @AfterInsert, because it creates no entity instances during insertion. Applications with auditing or validation in those hooks need to account for that documented execution path.

TypeORM vs Prisma, Drizzle, Kysely and other alternatives

Prisma generates a client from a schema file, while Drizzle defines tables with functions and infers results from SQL-like queries, according to Nest's database overview. TypeORM instead centers decorator-based entities and repositories. These are different ways to define the application's data interface. The table connects each approach to a concrete preference rather than assigning a performance winner from unlike examples.

Alternative What distinguishes it here When to choose it over TypeORM
Prisma A client generated from a schema file Your team wants the schema and generated client to define its data interface
Drizzle Function-defined tables and inferred results from SQL-like queries You prefer explicit query construction over entity repositories
Kysely Query-level reference checks and inferred selections in its vendor comparison Compiler feedback on complex SQL references is a deciding requirement
Sequelize ryuuji3 historically chose TypeORM over its migration generation Your existing Sequelize workflow already handles migrations satisfactorily
MikroORM Data Mapper, Unit of Work and Identity Map patterns You specifically want tracked object identity and a unit of work
Knex Nest documents integrating it directly through a module You want to own the query layer without choosing TypeORM's entity model

The Prisma, Drizzle, MikroORM and Knex descriptions come from Nest's integration overview. The Sequelize comparison is ryuuji3's historical account. In Kysely's vendor comparison, removing a join leaves a TypeORM conditional filter that still compiles but fails in PostgreSQL when that branch runs; the Kysely version produces a TypeScript error. That example answers a query-reference question, rather than comparing database execution speed.

What the other reviews get wrong

MakerStack's March 2026 maintenance assessment needs updating against the TypeORM announcement describing regular releases since late 2024. The MakerStack review also describes QueryBuilder compile-time checks too broadly for the unchecked string-reference example in Kysely's comparison. Typed methods and autocomplete do not mean the compiler checks every alias or property named inside a query string.

Prisma's v6 comparison and v7 comparison criticize string-array relation options. The TypeORM 1.0 announcement replaces those with object-shaped options and improved typing. Prisma's v7 examples also use global getManager(), which 1.0 removed in favor of DataSource access. Those examples need a legacy-version label; changing the relation-option syntax addresses that specific criticism, rather than every result-typing concern.

MakerStack describes TypeORM as NestJS's default and mentions ES5+ compatibility, while Nest calls itself database-agnostic and TypeORM 1.0 specifies Node.js 20+ and ES2023. Official documentation also has a release-line mismatch: the Express tutorial installs mysql, whereas the 1.0 announcement retains only mysql2. An integration's availability and an older tutorial's compiler target do not describe the current release requirements.

FAQ

TypeORM maps application classes to database tables and supports both repository-based persistence and Active Record methods, as the official examples show. That answers the basic adoption question: it fits developers who want an entity model around their database operations. The installation, integration and migration questions below concern the additional configuration needed to use that model in an application.

What is TypeORM, and when should I use it?

TypeORM is an ORM for JavaScript and TypeScript with entities, repositories, relations and generated migrations. Its feature list includes Active Record and Data Mapper, so persistence can live on the model or in a separate repository. Choose it when those patterns fit the application, then evaluate a difficult query and a populated-schema change rather than basing the decision only on a basic save example.

Is TypeORM still actively maintained?

The maintainers report regular releases since late 2024, including eight patches during 2025, in the 1.0 announcement. The November 12, 2026 release record adds evidence of subsequent database fixes. Together, these sources replace the older abandonment narrative with specific maintenance activity: releases, merged changes and fixes to query and connection behavior.

What is the latest TypeORM version, and which release line should my project use?

GitHub's latest-release endpoint returned TypeORM 1.1.3 on November 25, 2026, with a November 12 publication timestamp. Existing 0.3 applications have a separate upgrade task described in the 1.0 announcement. That task includes API changes, runtime requirements, driver changes, NestJS integration support and checks for changed query behavior, so the release number alone does not choose an application's upgrade path.

How do I install TypeORM from npm?

The getting-started guide specifies npm install typeorm and npm install reflect-metadata, a global reflect-metadata import and a separate database driver. Its TypeScript instructions enable experimentalDecorators and emitDecoratorMetadata. Those steps describe application setup. Our 962-dependency pnpm installation describes the contributor checkout, which includes the repository's development dependencies and tasks rather than just the application's selected ORM and driver.

Where can I find TypeORM's documentation and GitHub repository?

TypeORM's documentation is hosted at typeorm.io, and its GitHub repository is typeorm/typeorm. The 1.0 announcement is also relevant when reading examples: it lists removed global accessors, object-shaped find options and changed platform requirements. Those details identify which instructions need a release-line qualification before they become part of an application's setup.

How do I integrate TypeORM with NestJS?

Nest's TypeORM guide uses TypeOrmModule.forRoot() for connection configuration and forFeature() for scoped repositories. Repositories are injected with InjectRepository. Its autoLoadEntities setting includes entities registered through forFeature(); an entity referenced only through a relation needs explicit registration. The TypeORM 1.0 announcement names @nestjs/typeorm 11.0.1 as the integration version bringing v1 support.

How do I use TypeORM with PostgreSQL?

The getting-started guide documents npx typeorm init --name MyProject --database postgres as a PostgreSQL starter command. The generated data-source.ts holds the connection configuration for the application. For production schema creation, Nest's integration guide directs applications to migrations and warns that synchronize: true can lose data. Generating a starter project and applying production schema changes are separate setup steps.

How do I use TypeORM to access MySQL from Node.js?

TypeORM 1.0 retains the mysql2 driver and removes the old mysql driver, according to the release announcement. The getting-started guide configures host, port, username, password and database in a DataSource. This driver choice corrects the dependency named in the older Express tutorial; the application still needs its own connection settings and database service.

How do I create or generate a TypeORM migration?

The CLI guide distinguishes migration:create for an empty migration from migration:generate for a schema comparison. Updating an entity changes the model definition; the migration carries the database change. Historical issue #3357 explains why those generated operations belong in review: a length change produced a column drop and recreation, and another user caught a similar operation before applying it.

How do I run TypeORM migrations?

The documented CLI example is npm run typeorm migration:run -- -d path-to-datasource-config. The -d argument identifies the DataSource configuration. The guide also distinguishes CommonJS and ESM ts-node wrappers for TypeScript projects. These instructions describe the generic CLI interface; applications embedding TypeORM, such as the n8n installation discussed in its community thread, also have application-specific upgrade procedures.

How do I configure TypeORM migration scripts in NestJS?

The TypeORM CLI guide shows typeorm-ts-node-commonjs and typeorm-ts-node-esm as script choices for TypeScript projects, followed by a migration command with a DataSource path. Nest's repository injection configures application access to repositories; the CLI example still supplies its connection configuration through -d. Choose the wrapper that matches the project's module format and keep that distinction explicit in the script.

What DataSource file does the migration CLI require?

The -d argument points to the file defining your DataSource instance, as the CLI instructions and the n8n thread's command help show. In that thread, thm22 ran a manual command after upgrading n8n to 1.112.6 and received Missing required argument: dataSource. An entity file defines a model; the requested DataSource file defines the connection configuration used by the migration command.

What we have not tested yet

Our November 9 run establishes contributor installation and a failed test command at commit 5a572a4; the originating exception is absent from the visible log tail. Actual runtime and operating-system versions require the full toolchain logs, since lab-node:22 is an image label. The scanner's missing tests-directory signal does not establish an absence of tests. The 550 MB dependency footprint is a contributor-checkout measurement, not an application deployment-size or memory benchmark.

The November 25 Compose record contains a failed safety step and successful teardown, with no successful database connection, migration cycle or application query result. Its description of deployment does not establish healthy services. The run contains no recorded hands-on question-and-answer tasks or screenshot records. No code example or CLI command in this review is presented as successfully executed during either run.

The historical migration and hydration reports have not been reproduced here on 1.1.3. We have not tested alternatives on the same workload, measured production latency, checked replica consistency or established release-specific fixes from closed discussion status. The n8n thread also records no completed migration. Partial-selection typing and manually annotated raw results need separate application checks; the comparison evidence identifies those concerns without supplying an automatic correction.

The maintenance totals are maintainer reports, and GitHub activity does not measure support response time, production adoption or security. The YouTube records contain titles without transcripts; the Bilibili search contains Chinese-language tutorial titles rather than demonstrated outcomes. Those entries support neither creator-success claims nor worldwide demand figures. The next useful application evaluation is a populated-schema migration and the relation-heavy request that best represents the service being considered.

Alternatives

ProjectWhat it isPick it when
PrismaA schema-generated database client, described in Nest's database overview.Choose it when a schema file and generated client fit your team better than entity classes.
Drizzle ORMFunction-defined tables and SQL-like queries with inferred results, as described by Nest.Choose it when you prefer explicit table definitions and queries to entity repositories.
KyselyA SQL query builder whose comparison demonstrates checked references and inferred selections.Choose it when compiler feedback on complex query references outweighs the convenience of entity mapping.
MikroORMAn ORM built around Data Mapper, Unit of Work and Identity Map patterns.Choose it when tracked object identity and a unit of work are explicit design requirements.

Sources

  1. TypeORM README
  2. TypeORM 1.0 announcement
  3. Kysely comparison
  4. NestJS database integrations
  5. Historical migration report
  6. Historical relation-performance reports
  7. GitHub latest TypeORM release

More data reviews

Related reading