A lightweight MySQL ORM for Node.js that mimics Mongoose-style chainable queries. Version 2.1.8 is the latest stable release. It operates on 'convention over configuration', deriving table mappings from model names. Supports CRUD operations, transactions, findOne, count, and complex queries via SQL object with and/join. Depends on underscore, x-flow, and node-mysql. Simpler than Sequelize or TypeORM but less feature-rich (no schema creation, migrations, or mapping config).
npm install node-entitiesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows initialization, model definition, insert, and query using node-entities.
Use factory.findOne() when expecting a single object, or handle array result.
Update code to use new Factory() after init. See quickstart.
Define models as shown in documentation: function ModelName() { this.field = {type: Type}; }No immediate fix required, but plan to migrate away from underscore.
npm install x-flow
Ensure you call master.init() to get Factory, then create instance: const factory = new Factory();
Check if result.insertId exists or use result.affectedRows for non-auto_increment tables.