{"id":13595031,"url":"https://github.com/CodeDredd/pinia-orm","last_synced_at":"2025-04-09T10:32:44.999Z","repository":{"id":41801287,"uuid":"453107778","full_name":"CodeDredd/pinia-orm","owner":"CodeDredd","description":"The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.","archived":false,"fork":false,"pushed_at":"2024-10-29T09:22:11.000Z","size":29720,"stargazers_count":450,"open_issues_count":32,"forks_count":38,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T11:39:27.779Z","etag":null,"topics":["orm","pinia","pinia-orm","pinia-plugin","vue"],"latest_commit_sha":null,"homepage":"https://pinia-orm.codedredd.de/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeDredd.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.config.json","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"codedredd"}},"created_at":"2022-01-28T14:57:12.000Z","updated_at":"2024-10-24T22:41:37.000Z","dependencies_parsed_at":"2024-04-03T20:29:31.256Z","dependency_job_id":"9b3fe722-c877-4e25-8119-497648de9912","html_url":"https://github.com/CodeDredd/pinia-orm","commit_stats":{"total_commits":1858,"total_committers":24,"mean_commits":77.41666666666667,"dds":0.2104413347685683,"last_synced_commit":"b8ee9fc499fbe6561adfff7cda7a0ffdd7377b73"},"previous_names":["storm-tail/pinia-orm"],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeDredd%2Fpinia-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeDredd%2Fpinia-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeDredd%2Fpinia-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeDredd%2Fpinia-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeDredd","download_url":"https://codeload.github.com/CodeDredd/pinia-orm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248020593,"owners_count":21034459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["orm","pinia","pinia-orm","pinia-plugin","vue"],"created_at":"2024-08-01T16:01:42.725Z","updated_at":"2025-04-09T10:32:39.972Z","avatar_url":"https://github.com/CodeDredd.png","language":"TypeScript","funding_links":["https://github.com/sponsors/codedredd","https://paypal.me/dredd1984"],"categories":["TypeScript","Components \u0026 Libraries"],"sub_categories":["Utilities"],"readme":"[![Pinia ORM banner](./.github/assets/banner.png)](https://github.com/storm-tail/pinia-orm)\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions CI][github-actions-ci-src]][github-actions-ci-href]\n[![Coverage][code-coverage-src]][code-coverage-href]\n[![License][license-src]][license-href]\n\n# Welcome to pinia-orm\n\n\u003e Intuitive, type safe and flexible ORM for Pinia based on [Vuex ORM Next](https://github.com/vuex-orm/vuex-orm-next)\n\n- [✨ \u0026nbsp;Release Notes](https://pinia-orm.codedredd.de/changelog)\n- [📖 \u0026nbsp;Documentation](https://pinia-orm.codedredd.de)\n- [👾 \u0026nbsp;Playground](https://pinia-orm-play.codedredd.de)\n\n## Migration from vuex-orm\n\nYou want to migrate from vuex to pinia and with it vuex-orm to pinia-orm but you don't know yet?\nWell maybe this table will help you to decide. This comparison is just about facts and current state.\n\n| Features                                                               | pinia-orm@v1.4.0                                           | @vuex-orm/core@0.36.4                                             | @vuex-orm/core@1.0.0-draft.16                                             |\n|------------------------------------------------------------------------|------------------------------------------------------------| ----------------------------------------------------------------- | ------------------------------------------------------------------------- |\n| Bundle Size (Min + GZIP)                                               | [9.9 KB](https://bundlephobia.com/package/pinia-orm@1.4.0) | [16.7 KB](https://bundlephobia.com/package/@vuex-orm/core@0.36.4) | [12.6 KB](https://bundlephobia.com/package/@vuex-orm/core@1.0.0-draft.16) |\n| Relations (hasMany, belongsTo, morphOne, hasManyBy, hasOne, morphTo)   | ✅                                                          | ✅                                                                | ✅                                                                        |\n| Relations (morphMany, belongsToMany, hasManyThrough)                   | ✅                                                          | ✅                                                                | ❌                                                                        |\n| Relations (morphToMany, morphedByMany)                                 | ❌                                                          | ✅                                                                | ❌                                                                        |\n| Mutators                                                               | ✅                                                          | ✅                                                                | ❌                                                                        |\n| Casts                                                                  | ✅                                                          | ❌                                                                | ❌                                                                        |\n| Decorators                                                             | ✅                                                          | ❌                                                                | ✅                                                                        |\n| Single Table Inheritance                                               | ✅                                                          | ✅                                                                | ❌                                                                        |\n| Lifecycle Hooks                                                        | ✅                                                          | ✅                                                                | ❌                                                                        |\n| Aggregates                                                             | ✅                                                          | ✅                                                                | ❌                                                                        |\n| Query (orHas, doesntHave, orDoesntHave, whereHas, orWhereHas, groupBy) | ✅                                                          | ❌                                                                | ❌                                                                        |\n| Collection Helpers                                                     | ✅                                                          | (✅) can use pinia-orm helpers too                                | (✅) can use pinia-orm helpers too                                        |\n| Hidden Fields                                                          | ✅                                                          | ❌                                                                | ❌                                                                        |\n| Metadata field                                                         | ✅                                                          | ❌                                                                | ❌                                                                        |\n| Caching of queries with gc                                             | ✅                                                          | (✅) with plugin                                                  | ❌                                                                        |\n\nIf you decide to migrate then there are some breaking changes. A guide how to migrate will be written.\nSmall overview:\n\n- Fields are by default `null`\n- Renamed some functions aligning more with laravel naming\n- Code is based on `vuex-orm-next` and not on `vuex-orm` !\n\n## Help me keep working on this project 💚\n\n- [Become a Sponsor on GitHub](https://github.com/sponsors/codedredd)\n- [One-time donation via PayPal](https://paypal.me/dredd1984)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pinia-orm.codedredd.de/sponsorkit/sponsors.png\"\u003e\n    \u003cimg src='https://pinia-orm.codedredd.de/sponsorkit/sponsors.svg'/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## 💻 Development\n\n- Clone this repository\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js \u003c 16.10)\n- Install dependencies using `pnpm install`\n- Build normalizr package: `pnpm build`\n- Run interactive tests using `cd packages/pinia-orm \u0026\u0026 pnpm test:ui`\n\n## Credits\n\n- [Kia King Ishii](https://github.com/kiaking)\n- [Cuebit](https://github.com/cuebit)\n- [Posva](https://github.com/posva)\n\n## Related projects\n\n- [Vuex ORM](https://github.com/vuex-orm/vuex-orm)\n- [Vuex ORM Next](https://github.com/vuex-orm/vuex-orm-next)\n\n## License\n\nMade with ❤️\n\nPublished under [MIT License](./LICENCE).\n\n\u003c!-- Badges --\u003e\n\n[npm-version-src]: https://img.shields.io/npm/v/pinia-orm/latest.svg\n[code-coverage-src]: https://img.shields.io/codecov/c/github/CodeDredd/pinia-orm?logo=Codecov\u0026logoColor=white\u0026token=BYLAJJOOLS\n[code-coverage-href]: https://app.codecov.io/gh/CodeDredd/pinia-orm\n[npm-version-href]: https://npmjs.com/package/pinia-orm\n[npm-downloads-src]: https://img.shields.io/npm/dm/pinia-orm.svg\n[npm-downloads-href]: https://npmjs.com/package/pinia-orm\n[github-actions-ci-src]: https://github.com/codedredd/pinia-orm/actions/workflows/ci.yml/badge.svg\n[github-actions-ci-href]: https://github.com/codedredd/pinia-orm/actions?query=workflow%3Aci\n[license-src]: https://img.shields.io/npm/l/pinia-orm.svg\n[license-href]: https://npmjs.com/package/pinia-orm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodeDredd%2Fpinia-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCodeDredd%2Fpinia-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCodeDredd%2Fpinia-orm/lists"}