I've been working with active record and data mapper implementations of ORM enough to know the problems with using active record implemented ORM in my large projects. Right now I'm thinking to migrate one of my projects to node.js and trying to find the similar tools Im using right now. After research I didn't found any node.js ORM that follows data mapper pattern. They all are active record. Maybe I missing something, and you can tell me is there is a good popular ORM for node.js that doesn't follow active record pattern?
The libraries Ive looked on:
Sequelize is a modern TypeScript and Node. js ORM for Postgres, MySQL, MariaDB, SQLite and SQL Server, and more. Featuring solid transaction support, relations, eager and lazy loading, read replication and more.
Mongoose. If you plan on using MongoDB as your database, then Mongoose is likely going to be your ORM of choice. It's currently the most popular ORM library in the Node. js world.
ORM is a special data mapping layer, which provides database access between the app and database, i.e. it facilitates the communication of an application with a database.
Sequelize is an ORM that includes some query builder stuff; Knex is just a query builder, not an ORM.
After lot of frustration of currently exist ORMs for JavaScript I have written my own ORM that supports TypeScript / ES6 / ES5 and follows data mapper patterns and all other best practices - TypeORM
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With