Delete for composite PK resource doesn't work for sqlite
- Dominant language
- Go
- Stars
- 18
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Resources with composite PKs can't be deleted using `RW.Delete(...)` since the SQL generated is incorrect. See: https://github.com/go-gorm/gorm/issues/4879
**To Reproduce**
In delete_test.go/TestDb_Delete(...) remove conditional in `multi-column` test that skips sqlite dialects and the test will fail.
**Additional context**
Once https://github.com/go-gorm/gorm/issues/4879 is fixed, we can update the gorm dependency and enable the `multi-column` delete test for sqlite
Contributor guide
Research direction
Start with delete_test.go and TestDb_Delete, focusing on the multi-column case and its sqlite skip. Check the linked GORM issue 4879 and the dependency version before changing the test. Done means the dependency includes the upstream fix and the multi-column delete test runs successfully for sqlite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100