yesodweb / yesodweb/persistent
Id field should not be a "reference"
Open
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
A shared primary key should have a reference to the target table, not the current one.
Profile
Id UserId
This should have a fieldReference = FieldReference (EntityNameHS "User").
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 locating the shared-primary-key handling that produces the field reference for the Profile/UserId example. Trace how the target entity is selected, then add or update a regression test showing that the reference points to User rather than Profile. Done means the generated field reference uses EntityNameHS "User".
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