About this project

TypeORM is an object-relational mapping (ORM) library for TypeScript and JavaScript (ES2023). According to its README, it runs on Node.js, Browser, Cordova, Ionic, React Native, NativeScript, Expo, and Electron platforms, and aims to support the latest JavaScript features for applications ranging from small projects to large enterprise systems with multiple databases. The project states that it supports more databases than any other JS/TS ORM, listing Google Spanner, Microsoft SQL Server, MySQL/MariaDB, MongoDB, Oracle, Postgres, SAP HANA, and SQLite, along with derived databases and different drivers. It supports both the Active Record and Data Mapper patterns, and is described as influenced by Hibernate, Doctrine, and Entity Framework. Documented features include entities and columns, database-specific column types, entity manager, repositories and custom repositories, associations and relations (eager, lazy, unidirectional, bidirectional, self-referenced), multiple inheritance patterns, cascades, indices, transactions, migrations with automatic generation, connection pooling, replication, multiple database instances and types, cross-database and cross-schema queries, a QueryBuilder with left and inner joins and pagination, query caching, streaming raw results, logging, listeners and subscribers, and the closure table pattern. Schema can be declared in models or separate configuration files. ESM and CommonJS are both supported, and a CLI is provided. The README shows example entity definitions using decorators such as @Entity, @PrimaryGeneratedColumn, and @Column, with repository-based Data Mapper usage (getRepository, save, find, findOneBy, remove) and an alternative BaseEntity Active Record style. It also links to sample repositories covering TypeScript, JavaScript, Babel, browser, Express, Koa, MongoDB, Cordova, Ionic, React Native, NativeScript, and Electron setups. A list of community extensions is included: typeorm-model-generator for generating models from an existing database, typeorm-fixtures-cli for fixtures, typeorm-uml and erdia for ER diagrams, typeorm-extension for creating, dropping, and seeding databases, typeorm-codebase-sync, typeorm-relations, typeorm-relations-graphql, piying-orm, and rapiq. The project is MIT licensed and accepts contributions and sponsorship via Open Collective.