Ionic-ORM (v0.0.5) is a fork of TypeORM for Ionic 2+ Cordova apps, using WebSQL or SQLite. It provides a data-mapper pattern with decorators (@Table, @Column) for relational database mapping in TypeScript/JavaScript. Release cadence is low; last update was in 2017. Key differentiator: tailored for Ionic mobile apps with Cordova SQLite storage. However, it is largely unmaintained and inferior to updated TypeORM or other modern alternatives.
npm install ionic-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setup with reflect-metadata, define an entity with decorators, create connection, save a record, and handle errors.
Consider using TypeORM directly or a maintained alternative.
Use SQLite plugin with native storage instead of WebSQL.
npm install --save-dev @types/reflect-metadata
Add import 'reflect-metadata' as the first line of your app entry.
Specify type: 'cordova' for SQLite plugin or type: 'websql' for WebSQL.
Run npm install ionic-orm --save
Add import 'reflect-metadata' to the top of your main file.
Ensure you have the correct @types/ionic-orm or use 'any' cast: (repository as any).save(photo)