MikroORM allows handling transactions automatically. When you call em.flush(), all computed changes are wrapped inside a database transaction.
Uses source code analysis so you do not have to repeat yourself when defining entities. Simply define correct TypeScript types and you are good to go!
Supports MongoDB, MySQL, MariaDB, PostgreSQL and SQLite databases, and more can be supported via custom drivers right now.
Keep your schema in sync with SchemaGenerator and Migrator. Supports both up and down migrations.
With the Seeder and seeding factories, we can generate fake data of any volume/shape and seed the database with ease.
Thanks to the UnitOfWork, all queries it fires are automatically batched. Inserts, updates, deletes - you name it!
Powerful event system allows to hook into not only the entity lifecycle. Want to alter how the UnitOfWork works? Try onFlush event!
Includes metadata-aware QueryBuilder with auto-joining support. Need more flexibility? We got you covered!
Define and control your common filters globally. Want to show only results relevant for a given tenant? Or maybe you want to automatically hide all soft-deleted entities?