yesodweb / yesodweb/persistent

persistent-3.0.0

Open
#1,037 26 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

This issue tracks features and bug fixes that will be released as part of persistent-3.0.0. I want to bump the major-major version number because I want to implement a Big Breaking Change:

The Desolation of Entity

There are many problems in persistent relating to the design of Entity:

data Entity record = Entity 
  { entityKey :: Key record
  , entityVal :: record
  }

This works very well in the common case of "I want a datatype record with an autogenerated surrogate Key record," but it doesn't handle composite primary keys or non-autogenerated primary keys particularly well. It also special cases the primary key, when really any number of columns could have database specified defaults.

#1035, #1016, #994, #992, #985, #973, #974,

The solution that I want to implement is detailed in #995. I'll open a new issue to focus on gutting Entity and further conversation can go there.

Moar Breaking Changes

Because this is a big change, I'd like to roll up as many other big changes as possible. If you have something you'd like to change or break about the library, now is a great time to mention it.

I want to roll up the functional/bug fix breaking changes and do persistent-2.11. After that, I'll start working onpersistent-3.0, which will be a bigger change.

The milestone 3.0 is in place for this update.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Entity definition in the issue and read the proposed solution in #995, along with related issues #1035, #1016, #994, #992, #985, #973, and #974. The issue is an umbrella for a major redesign and does not define a focused entry point or completion criteria; follow-up scope would need to be established before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.