yesodweb / yesodweb/persistent
Custom Primary keys not listed in `persistUniqueKeys`
Open
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
When specifying a custom Primary in persistent-template, the field is set as unique in the database. However this field is not listed in persistUniqueKeys, so various operations involving uniqueness ignore it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how persistent-template handles custom Primary fields and assembles persistUniqueKeys. Compare the database uniqueness metadata with the generated key list and inspect any existing uniqueness tests. Done means a custom Primary appears in persistUniqueKeys and uniqueness-related operations account for it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100