TypeORM is an ORM that can run in Node.js, Browser, Cordova, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used with TypeScript and JavaScript (ES2023). Its goal is to always support the latest JavaScript features and provide additional features that help you to develop any kind of application that uses databases - from small applications with a few tables to large-scale enterprise applications with multiple databases.
TypeORM supports both Active Record and Data Mapper patterns, unlike all other JavaScript ORMs currently in existence, which means you can write high-quality, loosely coupled, scalable, maintainable applications in the most productive way.
Generate TypeORM entities from Valibot schemas - piying-orm
Contributing
Learn about contribution here and how to set up your development environment here.
This project exists thanks to all the people who contribute:
Sponsors
Open source is hard and time-consuming. If you want to invest in TypeORM’s future, you can become a sponsor and allow our core team to spend more time on TypeORM’s improvements and new features.
Champion
Become a champion sponsor and get premium technical support from our core contributors. Become a champion
Supporter
Support TypeORM’s development with a monthly contribution. Become a supporter
TypeORM is an ORM that can run in Node.js, Browser, Cordova, Ionic, React Native, NativeScript, Expo, and Electron platforms and can be used with TypeScript and JavaScript (ES2023). Its goal is to always support the latest JavaScript features and provide additional features that help you to develop any kind of application that uses databases - from small applications with a few tables to large-scale enterprise applications with multiple databases.
TypeORM supports more databases than any other JS/TS ORM: Google Spanner, Microsoft SqlServer, MySQL/MariaDB, MongoDB, Oracle, Postgres, SAP HANA and SQLite, as well as derived databases and different drivers.
TypeORM supports both Active Record and Data Mapper patterns, unlike all other JavaScript ORMs currently in existence, which means you can write high-quality, loosely coupled, scalable, maintainable applications in the most productive way.
TypeORM is highly influenced by other ORMs, such as Hibernate, Doctrine and Entity Framework.
Features
And more…
With TypeORM, your models look like this:
And your domain logic looks like this:
Alternatively, if you prefer to use the
ActiveRecordimplementation, you can use it as well:And your domain logic will look this way:
Samples
Take a look at the samples in sample for examples of usage.
There are a few repositories that you can clone and start with:
Extensions
There are several extensions that simplify working with TypeORM and integrating it with other modules:
data-source.tsafter generating migrations/entities - typeorm-codebase-syncrelationsobjects - typeorm-relationsrelationsbased on a GraphQL query - typeorm-relations-graphqlContributing
Learn about contribution here and how to set up your development environment here.
This project exists thanks to all the people who contribute:
Sponsors
Open source is hard and time-consuming. If you want to invest in TypeORM’s future, you can become a sponsor and allow our core team to spend more time on TypeORM’s improvements and new features.
Champion
Become a champion sponsor and get premium technical support from our core contributors. Become a champion
Supporter
Support TypeORM’s development with a monthly contribution. Become a supporter
Community
Join our community of supporters and help sustain TypeORM. Become a community supporter
Sponsor
Make a one-time or recurring contribution of your choice. Become a sponsor