{"id":41855,"library":"redux-orm-kerad","title":"Redux-ORM","description":"A small, simple and immutable ORM to manage relational data in your Redux store. It provides a way to define models with relationships (foreign keys, one-to-one, many-to-many) and query them using a familiar ORM-like API. The library integrates with Redux by generating reducers that manage entity state. Current stable version is 1.0.3, released occasionally with bug fixes. Key differentiators: minimalistic design, immutable state, and seamless Redux integration.","status":"active","version":"1.0.3","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/carlesnunez/redux-orm-kerad","tags":["javascript","redux-orm"],"install":[{"cmd":"npm install redux-orm-kerad","lang":"bash","label":"npm"},{"cmd":"yarn add redux-orm-kerad","lang":"bash","label":"yarn"},{"cmd":"pnpm add redux-orm-kerad","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"redux-orm is designed to work with Redux store","package":"redux","optional":false}],"imports":[{"note":"If using CommonJS, use require('redux-orm').ORM","wrong":"const ORM = require('redux-orm')","symbol":"ORM","correct":"import { ORM } from 'redux-orm'"},{"note":"Field types are attr, fk, oneToOne, many","wrong":"import { Model, attributes, foreignKey } from 'redux-orm'","symbol":"Model","correct":"import { Model, attr, fk, oneToOne, many } from 'redux-orm'"},{"note":"Function to create a reducer from ORM instance","wrong":"import { reducer } from 'redux-orm'","symbol":"createReducer","correct":"import { createReducer } from 'redux-orm'"}],"quickstart":{"code":"// models.js\nimport { Model, attr, fk, many } from 'redux-orm';\n\nclass Author extends Model {\n  toString() { return `Author: ${this.name}`; }\n}\nAuthor.modelName = 'Author';\nAuthor.fields = { id: attr(), name: attr(), books: many('Book', 'authors') };\n\nexport default Author;\n\n// orm.js\nimport { ORM } from 'redux-orm';\nimport Author from './models';\n\nconst orm = new ORM();\norm.register(Author); // register all models\n\nexport default orm;\n\n// store.js\nimport { createStore, combineReducers } from 'redux';\nimport { createReducer } from 'redux-orm';\nimport orm from './orm';\n\nconst reducer = createReducer(orm);\nconst rootReducer = combineReducers({ orm: reducer });\nconst store = createStore(rootReducer);\n\n// usage:\nconst session = orm.session(store.getState().orm);\nconst author = session.Author.create({ name: 'John' });\nconsole.log(author.name); // John\n","lang":"javascript","description":"Defines an Author model, registers it with ORM, creates a Redux reducer, and demonstrates basic creation/query."},"warnings":[{"fix":"Follow the 0.9 migration guide: https://github.com/tommikaikkonen/redux-orm/wiki/0.9-Migration-Guide","message":"Version 0.9 introduced breaking changes to the API. The migration guide is available.","severity":"breaking","affected_versions":">=0.9 <1.0.0"},{"fix":"Use orm.session(state) instead of orm.models","message":"The 'models' getter on ORM instances is deprecated in favor of direct method calls.","severity":"deprecated","affected_versions":">=0.9"},{"fix":"Declare fields as static property: Book.fields = { ... }","message":"Field types must be assigned to the static 'fields' property on Model classes, not in constructor.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"search_vec":"'1.0.3':63 'api':46 'bug':67 'current':59 'data':13 'defin':23 'design':72 'differenti':70 'entiti':57 'familiar':42 'fix':68 'foreign':27 'generat':53 'immut':8,73 'integr':49,78 'javascript':79 'key':28,69 'librari':48 'like':45 'manag':11,56 'mani':34,36 'many-to-mani':33 'minimalist':71 'model':24 'occasion':65 'one':30,32 'one-to-on':29 'orm':3,9,44,82 'orm-lik':43 'provid':19 'queri':38 'reduc':54 'redux':2,16,51,77,81 'redux-orm':1,80 'relat':12 'relationship':26 'releas':64 'seamless':76 'simpl':6 'small':5 'stabl':60 'state':58,74 'store':17 'use':40 'version':61 'way':21","created_at":"2026-06-04T18:54:26.295157+00:00","updated_at":"2026-06-04T18:54:26.295157+00:00","problems":[{"fix":"Ensure you have imported and instantiated ORM: import { ORM } from 'redux-orm'; const orm = new ORM();","cause":"ORM instance not created or not imported correctly","error":"TypeError: Cannot read property 'session' of undefined"},{"fix":"Call orm.register(Book) before using the model.","cause":"Forgot to register the model with the ORM instance","error":"Uncaught Error: Model \"Book\" is not registered."},{"fix":"Ensure you pass the ORM instance that has registered models: createReducer(orm)","cause":"Passed an unregistered ORM instance or wrong object","error":"Error: createReducer expects a valid ORM instance"}],"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/carlesnunez/redux-orm-kerad","github":"ssh://git@github.com/carlesnunez/redux-orm-kerad","docs":null,"changelog":null,"pypi":null,"npm":"redux-orm-kerad","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","state-management"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}