js-core-data (v1.10.0) is a JavaScript ORM inspired by Apple's CoreData. It simplifies data modeling, version migration, entity management, and persistence by providing a context-based interface similar to CoreData, adapted for server environments. Supports SQLite, MySQL, and PostgreSQL via separate database drivers. Release cadence is low; last update was several years ago. Key differentiator: uses CoreData-like patterns (managed object contexts, relationships, inverse relationships) not found in typical JavaScript ORMs. Suitable for Node.js projects needing an ActiveRecord-style ORM with automated schema syncing.
npm install js-core-dataNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates setting up an in-memory SQLite database, defining entities with relationships, syncing schema, creating a context, manipulating objects, and saving.
npm install --save mysql (or sqlite3, pg)
Update to use string for relationship name: e.g., `defineRelationship(User, Company, 'company', {...})`Use `{ dropTables: true }` instead of `{ force: true }`.Always await or chain .then() on these methods.
Ensure relationship names match exactly: e.g., `company.addUser(user2)` works if 'users' relationship is defined with `toMany: true`.
Run: npm install --save sqlite3
Use const CoreData = require('js-core-data'); then new CoreData(...)Use syncSchema({ dropTables: true }) to drop and recreate tables.Provide all required fields when creating or update entity with missing fields.