{"id":42864,"library":"ilorm","title":"ilorm","description":"ilorm (I Love ORM) is a modern ORM for Node.js that separates database from business logic using ECMAScript classes and schemas. Current stable version is 0.15.2. It provides universal connectors for MongoDB, SQL, Redis, REST, CSV, etc., a plugin ecosystem, query builder, and data validation. Unlike traditional ORMs like Sequelize or Mongoose, ilorm emphasizes class inheritance for plugins and universal data source support. Release cadence is irregular as it's still in early development (pre-1.0).","status":"active","version":"0.15.2","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","orm","core","ilorm"],"install":[{"cmd":"npm install ilorm","lang":"bash","label":"npm"},{"cmd":"yarn add ilorm","lang":"bash","label":"yarn"},{"cmd":"pnpm add ilorm","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ilorm is a default export; named export 'ilorm' does not exist in CommonJS.","wrong":"const { ilorm } = require('ilorm')","symbol":"ilorm","correct":"import ilorm from 'ilorm'"},{"note":"Both CJS and default import work; schema is a named export from the ES module.","wrong":"const schema = ilorm.schema","symbol":"schema","correct":"const { schema } = require('ilorm')"},{"note":"The function is named 'newModel' not 'model'; named export only.","wrong":"const { model } = require('ilorm')","symbol":"newModel","correct":"import { newModel } from 'ilorm'"}],"quickstart":{"code":"import ilorm from 'ilorm';\nimport { schema, newModel } from 'ilorm';\n\nconst userSchema = schema.new({\n  firstName: schema.String().required(),\n  lastName: schema.String().required(),\n  age: schema.Number().min(0).max(120),\n});\n\nconst connection = {}; // Replace with actual connector, e.g., ilorm-connector-memory\nconst User = newModel({\n  name: 'User',\n  schema: userSchema,\n  connector: connection,\n});\n\nasync function main() {\n  const user = await User.query()\n    .firstName.is('John')\n    .findOne();\n  console.log(user);\n}\nmain().catch(console.error);","lang":"typescript","description":"Create a schema, instantiate a model, and perform a simple query using ilorm."},"warnings":[{"fix":"Use 'ilorm': '0.15.2' in package.json instead of '^0.15.2'.","message":"Version 0.x may have breaking changes across minor versions. Always pin exact version in package.json.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use default import: 'import ilorm from 'ilorm''.","message":"ESM imports changed from named to default export in v0.12.0. Old 'import { ilorm } from 'ilorm'' no longer works.","severity":"breaking","affected_versions":">=0.12.0"},{"fix":"Replace 'schema({...})' with 'schema.new({...})'.","message":"The 'schema' function was renamed to 'schema.new' in v0.10.0. Direct use of 'schema({...})' breaks.","severity":"breaking","affected_versions":">=0.10.0"},{"fix":"Evaluate alternative stable ORMs like Sequelize or Mongoose for production.","message":"This package is pre-1.0; API is unstable. Not recommended for production without extensive testing.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use 'schema.String()' instead of 'ilorm.String()'.","message":"The 'ilorm.String()' syntax is deprecated in favor of 'schema.String()'.","severity":"deprecated","affected_versions":">=0.11.0"}],"env_vars":null,"search_vec":"'-1.0':77 '0.15.2':27 'builder':43 'busi':16 'cadenc':66 'class':20,56 'connector':31 'core':80 'csv':37 'current':23 'data':45,62 'databas':14 'develop':75 'earli':74 'ecmascript':19 'ecosystem':41 'emphas':55 'etc':38 'ilorm':1,2,54,81 'inherit':57 'irregular':68 'javascript':78 'like':50 'logic':17 'love':4 'modern':8 'mongodb':33 'mongoos':53 'node.js':11 'orm':5,9,49,79 'plugin':40,59 'pre':76 'provid':29 'queri':42 'redi':35 'releas':65 'rest':36 'schema':22 'separ':13 'sequel':51 'sourc':63 'sql':34 'stabl':24 'still':72 'support':64 'tradit':48 'univers':30,61 'unlik':47 'use':18 'valid':46 'version':25","created_at":"2026-06-05T16:57:02.169882+00:00","updated_at":"2026-06-05T16:57:02.169882+00:00","problems":[{"fix":"Run 'npm install ilorm' and ensure node_modules contains the package.","cause":"Missing installation or incorrect module resolution.","error":"Error: Cannot find module 'ilorm'"},{"fix":"Use 'const { schema } = require('ilorm')' or 'import { schema } from 'ilorm''.","cause":"Using old import pattern with default import in CommonJS.","error":"TypeError: ilorm.schema is not a function"},{"fix":"Replace 'schema({...})' with 'schema.new({...})'.","cause":"Directly called schema() instead of schema.new().","error":"Error: Schema must be created with schema.new()"},{"fix":"Ensure schema is defined and fields match; verify import paths.","cause":"Query builder method chaining before defining schema or importing correctly.","error":"TypeError: Cannot read properties of undefined (reading 'firstName')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"ilorm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}