{"id":43521,"library":"orm-model","title":"orm-model","description":"Unified MVC-style model structure for Node.js projects using mongoose and/or sequelize ORMs. Current version 0.1.1, last updated in 2015. Allows defining models in separate files with connectors, attributes, and extensions. Differentiator: provides a structured way to organize models when using multiple databases or ORMs. Release cadence: no recent releases.","status":"abandoned","version":"0.1.1","language":"javascript","source_language":"en","source_url":"git://github.com/xpepermint/orm-model","tags":["javascript","orm","orms","mapper","model","models","structure","optimization","mvc"],"install":[{"cmd":"npm install orm-model","lang":"bash","label":"npm"},{"cmd":"yarn add orm-model","lang":"bash","label":"yarn"},{"cmd":"pnpm add orm-model","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"ORM adapter for MongoDB","package":"mongoose","optional":true},{"reason":"ORM adapter for SQL databases","package":"sequelize","optional":true}],"imports":[{"note":"ESM vs CJS: package does not ship ESM; default import only works with bundlers. Use require() in Node <v14.","wrong":"const orm = require('orm-model')","symbol":"default","correct":"import orm from 'orm-model'"},{"note":"Access models after connect().","symbol":"orm.model()","correct":"import orm from 'orm-model'; orm.model('Bird')"},{"note":"Returns the ORM connection instance.","symbol":"orm.connection()","correct":"import orm from 'orm-model'; orm.connection('seq-db')"}],"quickstart":{"code":"import orm from 'orm-model';\n\n// configure connectors at config/connectors.js\norm.connect({\n  connectorsPath: 'config/connectors.js',\n  modelsPath: 'app/models'\n});\n\n// after connection, access model\nconst Bird = orm.model('bird');\nBird.create({ name: 'Fluppy' }, (err, data) => {\n  if (err) console.error(err);\n  else console.log('Bird created:', data);\n});","lang":"javascript","description":"Shows setup of connectors, model loading, and basic model usage."},"warnings":[{"fix":"Consider alternatives like sequelize-cli or mongoose schemas directly.","message":"Package last updated in 2015, no maintenance for over 8 years.","severity":"deprecated","affected_versions":"0.x"},{"fix":"Verify your ORM is supported before adoption.","message":"Only supports mongoose and sequelize; other ORMs are not configurable.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Always specify connectorsPath and modelsPath in orm.connect().","message":"Expects config files at hardcoded paths (config/connectors.js, app/models) unless overridden.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Wrap model access in try/catch or check existence with orm.models().","message":"No TypeScript definitions or type checking; runtime errors for missing models.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'0.1.1':20 '2015':24 'allow':25 'and/or':15 'attribut':33 'cadenc':51 'connector':32 'current':18 'databas':47 'defin':26 'differenti':36 'extens':35 'file':30 'javascript':55 'last':21 'mapper':58 'model':3,8,27,43,59,60 'mongoos':14 'multipl':46 'mvc':6,63 'mvc-style':5 'node.js':11 'optim':62 'organ':42 'orm':2,17,49,56,57 'orm-model':1 'project':12 'provid':37 'recent':53 'releas':50,54 'separ':29 'sequel':16 'structur':9,39,61 'style':7 'unifi':4 'updat':22 'use':13,45 'version':19 'way':40","created_at":"2026-06-05T17:00:11.829999+00:00","updated_at":"2026-06-05T17:00:11.829999+00:00","problems":[{"fix":"npm install orm-model --save","cause":"Package not installed or missing from node_modules.","error":"Error: Cannot find module 'orm-model'"},{"fix":"Use correct import: const orm = require('orm-model'); or import orm from 'orm-model'; if using ESM bundler.","cause":"Incorrect import (ESM vs CJS) or wrong module scope.","error":"TypeError: orm.connect is not a function"},{"fix":"Check connectorsPath file and ensure connector key matches 'connector' field in model file.","cause":"Connector name in model definition does not match connectors configuration.","error":"Error: No connector defined for model 'Bird'"}],"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":"https://github.com/xpepermint/orm-model","github":"git://github.com/xpepermint/orm-model","docs":null,"changelog":null,"pypi":null,"npm":"orm-model","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","devops"],"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}}