Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optionally derive
PathMultiPiece
for composite keys (#1509)
* Move derivation strategy choice to `where` clause * Create PersistPathMultiPiece typeclass * Create spec and derive PersistPathMultiPiece instance in dataTypeDec * Revert changes to mkKeyTypeDec This reverts part of commit 500feba. * Fix and test instance derivation using mpsDeriveInstances This reverts part of commit 7b9e76f. * Move PersistPathMultiPiece into PersistEntity module This avoids creating an orphan instance of PathMultiPiece. * Document feature in Database.Persist.Quasi * Add top-level `describe` to CompositeKeyPathMultiPieceSpec * Only derive PathMultiPiece for composite keys As mentioned in the MkPersistSettings Haddock change, specifying PersistPathMultiPiece directly overrides this behaviour. * Fix PersistPathMultiPiece override and add tests for it * Use DerivingVia with newtype wrapper This reverts commit 5bc5799. * Only use DerivingVia on GHC versions with support for it * Add CPP language pragma to spec * Revert changes to Database.Persist.TH and remove associated spec
- Loading branch information