{"id":21431633,"url":"https://github.com/tomdoestech/prisma-relationships","last_synced_at":"2025-07-14T12:32:19.023Z","repository":{"id":63092576,"uuid":"557654515","full_name":"TomDoesTech/prisma-relationships","owner":"TomDoesTech","description":null,"archived":false,"fork":false,"pushed_at":"2022-10-26T03:47:13.000Z","size":23,"stargazers_count":17,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T08:46:33.970Z","etag":null,"topics":["database","prisma"],"latest_commit_sha":null,"homepage":"https://youtu.be/phixQBZNZwU","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomDoesTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-26T03:46:46.000Z","updated_at":"2025-01-18T18:16:09.000Z","dependencies_parsed_at":"2022-11-12T19:30:39.923Z","dependency_job_id":null,"html_url":"https://github.com/TomDoesTech/prisma-relationships","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomDoesTech/prisma-relationships","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fprisma-relationships","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fprisma-relationships/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fprisma-relationships/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fprisma-relationships/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomDoesTech","download_url":"https://codeload.github.com/TomDoesTech/prisma-relationships/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomDoesTech%2Fprisma-relationships/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265291751,"owners_count":23741913,"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":["database","prisma"],"created_at":"2024-11-22T23:10:50.325Z","updated_at":"2025-07-14T12:32:18.646Z","avatar_url":"https://github.com/TomDoesTech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## What will you learn?\n* How to build relationships between data with prisma\n* Querying relationships\n* Creating data with relationships\n\n## Relationships\n## One to one relationship (1-1)\nA user has one profile and a profile belongs to one user\n\n## One to many relationship (1-m)\nAn order has one user, a user can have many orders\n\n## Many to many relationship (m-m)\nDocs: https://www.prisma.io/docs/concepts/components/prisma-schema/relations/many-to-many-relations\n\nA product can have multiple categories and a category can belong to multiple products\n\n- Explicit m-m\n    - Manually create join table\n    - More control\n- Implicit m-m\n    - Prisma defines join table\n    - Less code\n\n## One to many relationship that references itself\nA category can have a parent category and a parent category can have multiple children","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Fprisma-relationships","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomdoestech%2Fprisma-relationships","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdoestech%2Fprisma-relationships/lists"}