ORM integration and CRUD controllers for Kobp framework, providing MikroORM entity management and automatic RESTful CRUD route generation. Current stable version is 3.0.5, typically released alongside Kobp core. Key differentiators: seamless integration with Kobp's decorator-based routing, automatic CRUD middleware generation from MikroORM entities, and TypeScript-first design. Requires @mikro-orm/core v6, @mikro-orm/knex v6, lodash, and kobp v3. Designed for Node.js backends using Koa and MikroORM.
npm install kobp-mikroormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Defines a MikroORM entity and a basic CRUD controller using MikroCrudController, demonstrating entity definition and CRUD route setup.
Pass entity class constructor instead of string: MikroCrudController(User) vs MikroCrudController('User')Use entity class: new CrudService(User) instead of new CrudService('User')Wrap controller methods with RequestContext.create() or use @RequestContext() decorator from @mikro-orm/core
Convert project to ESM by adding 'type': 'module' to package.json, or use await import('kobp-mikroorm')npm install kobp-mikroorm@latest and ensure Node.js >=14 with ESM support
Check import path: import { MikroCrudController } from 'kobp-mikroorm' and ensure entity class is exported and imported before useEnsure RequestContext.create() is wrapping controller method calls or app.use() middleware is applied