{"id":15495059,"url":"https://github.com/samchon/prisma-bug-undefined-join-bug","last_synced_at":"2025-02-25T21:23:24.619Z","repository":{"id":169629350,"uuid":"645625571","full_name":"samchon/prisma-bug-undefined-join-bug","owner":"samchon","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-26T05:21:14.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T04:34:20.179Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/samchon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2023-05-26T04:35:56.000Z","updated_at":"2023-05-26T05:16:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"bae8c41f-b3d5-4979-9cd5-1297ce27c2b5","html_url":"https://github.com/samchon/prisma-bug-undefined-join-bug","commit_stats":{"total_commits":3,"total_committers":2,"mean_commits":1.5,"dds":"0.33333333333333337","last_synced_commit":"d2e6ffb49778efb02f17e2d94e0390bb2adf4fae"},"previous_names":["samchon/prisma-bug-undefined-join-bug"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fprisma-bug-undefined-join-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fprisma-bug-undefined-join-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fprisma-bug-undefined-join-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samchon%2Fprisma-bug-undefined-join-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samchon","download_url":"https://codeload.github.com/samchon/prisma-bug-undefined-join-bug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240748387,"owners_count":19851254,"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":[],"created_at":"2024-10-02T08:15:58.179Z","updated_at":"2025-02-25T21:23:24.537Z","avatar_url":"https://github.com/samchon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Error reproducing repo for Prisma.\n\nWhen `undefined` value be assigned in `include` option, `Prisma` can't distinguish the `undefined` value, and just perform join operation. Therefore, when conditional join is required, manual `delete` operation be required, and it seems inconvenient and ridiculous.\n\n```typescript\nconst read = (prisma: PrismaClient) =\u003e \n    (joinFiles: boolean) =\u003e \n    async (id: string) =\u003e {\n        const article = await prisma.bbs_articles.findFirstOrThrow({\n            where: { id },\n            include: {\n                files: joinFiles\n                    ? { include: { file: {} } }\n                    : undefined,\n            },\n        });\n        console.log({\n            joinFiles,\n            expectedBehavior: joinFiles === !!article.files?.length,\n            files: article.files,\n        });\n};\n\nread(prisma)(false)(\"some-bbs-article-id\");\n```\n\n\u003e ```bash\n\u003e {\n\u003e   joinFiles: false,\n\u003e   expectedBehavior: false,\n\u003e   files: [\n\u003e     {\n\u003e       id: '608b855c-8728-479c-8105-2594052c84c1',\n\u003e       bbs_article_id: 'f1f89022-d872-4bb4-b429-cace6b2f153a',\n\u003e       attachment_file_id: 'd6779072-24a2-4424-bc56-4db501671202',\n\u003e       sequence: 0\n\u003e     }\n\u003e   ]\n\u003e }\n\u003e ```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fprisma-bug-undefined-join-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamchon%2Fprisma-bug-undefined-join-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamchon%2Fprisma-bug-undefined-join-bug/lists"}