Better support for objects that don't have a primary key called :id
- Dominant language
- Clojure
- Stars
- 576
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
I think we could add a method to `IModel` called `primary-key` or something like that that could be used to get field(s) that should be used as the primary key (default implementation would return `:id`). It could accept either a keyword (for a single-column key) or a sequence of keywords for multiple-column keys.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the IModel definition and the code paths that assume a primary key named :id. Review how model fields are used for lookup and persistence, then determine the tests needed for single-key and composite-key models; done means both forms work while the default remains :id.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100