{"id":51883725,"url":"https://github.com/devlato/convex-ents-cascade-test","last_synced_at":"2026-07-25T17:03:11.495Z","repository":{"id":320985732,"uuid":"1083998364","full_name":"devlato/convex-ents-cascade-test","owner":"devlato","description":"Testing the cascade deletes with convex","archived":false,"fork":false,"pushed_at":"2025-10-27T05:03:18.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-27T06:17:14.999Z","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/devlato.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-27T04:26:09.000Z","updated_at":"2025-10-27T05:03:22.000Z","dependencies_parsed_at":"2025-10-27T06:17:45.010Z","dependency_job_id":"654e5db9-b672-4f6a-8def-bdaaea0c4618","html_url":"https://github.com/devlato/convex-ents-cascade-test","commit_stats":null,"previous_names":["devlato/convex-ents-cascade-test"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/devlato/convex-ents-cascade-test","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlato%2Fconvex-ents-cascade-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlato%2Fconvex-ents-cascade-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlato%2Fconvex-ents-cascade-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlato%2Fconvex-ents-cascade-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devlato","download_url":"https://codeload.github.com/devlato/convex-ents-cascade-test/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devlato%2Fconvex-ents-cascade-test/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35885894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-25T02:00:06.922Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-07-25T17:03:10.216Z","updated_at":"2026-07-25T17:03:11.394Z","avatar_url":"https://github.com/devlato.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# convex-ents-cascade-test\n\nThis is a demo of different types of cascade deletes, and how to keep them one-directional.\n\n## Running\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\nTo run:\n\n```bash\nbunx convex dev\n```\n\nFollow the steps to set up the project (choose new — or create one manually from the Convex dashboard and choose it).\n\n## Experimenting with the behavior\n\nThe repo illustrates how to implement one-directional cascade deletes for three table configurations:\n1. primary table + secondary table referencing the primary table + hard delete with `convex-ents`\n2. primary table referencing the secondary table + the secondary table + soft delete with `convex-ents`\n2. primary table referencing the secondary table + the secondary table + hard delete (without `convex-ents`)\n\nThen open the project dashboard → Functions and try creating and deleting records:\n- When the secondary table has a foreign key (`cat_ages_1.cat_1_id` → `cats_1._id`)\n  - `createCat1` → `deleteCat1` (should hard-delete the record in `cats_1` and the record in `cat_ages_1`)\n  - `createCat1` → `deleteCat1Age` (should hard-delete the record in `cat_ages_1` but not the record in `cats_1`)\n- When the primary table has a reference to the secondary table (`cats_2.cat_age_2_id` → `cat_ages_2._id`)\n  - `createCat2` → `deleteCat2` (should soft-delete the record in `cats_2` and the record in `cat_ages_2`)\n  - `createCat2` → `deleteCat2Age` (should soft-delete the record in `cat_ages_2` but not the record in `cats_2`)\n- When the primary table has a reference to the secondary table (`cats_3.cat_age_3_id` → `cat_ages_3._id`)\n  - `createCat2` → `deleteCat2` (should hard-delete the record in `cats_3` and the record in `cat_ages_3`)\n  - `createCat2` → `deleteCat2Age` (should hard-delete the record in `cat_ages_3` but not the record in `cats_3`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlato%2Fconvex-ents-cascade-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevlato%2Fconvex-ents-cascade-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevlato%2Fconvex-ents-cascade-test/lists"}