A TypeScript-first ORM library for Node.js (v0.5.13) that provides a declarative repository pattern with decorators for model mapping, lazy injection, caching, and validation. It integrates with dependency injection and supports MySQL (via mysql2). The library emphasizes CRUD simplicity with decorator-driven SQL binding, but is relatively niche with sparse documentation and maintenance. Key differentiators include built-in cache put/evict decorators and a base repository class.
npm install orm-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a UserModel entity and UserRepository using orm-ts decorators, then queries by username.
Add 'import "reflect-metadata"' as the first import in your application.
Ensure all models extend BaseModel.
Use #param# syntax in SQL strings and pass arguments in order.
Consider migrating to a more active ORM like TypeORM or MikroORM.
Add 'import "reflect-metadata"' at the top of your entry file.
Extend BaseModel in your entity class.
Ensure SQL string uses #param# and arguments are passed correctly.