-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Description / Steps to reproduce / Feature proposal
See #1194 (comment) for background. This tasks aims to break up the Repository interface into different interfaces based on the persistence function type and refactor the repository interfaces which extend from it to use those interfaces via a Mixin.
Acceptance Criteria
- Split
Repositoryinterface into different interfaces based on the persistence function type i.e.LookupRepositoryinterface to have all the Retrieval methods,,WriteRepository(I'm sure there is a better name), would have the create methodsMutationRepositorymight have the update and related methods (this might fall under the previous one),and. A good list from @raymondfeng:DestroyRepositoryfor deletes
- QueryRepository - read-based operations (find, findOne, count, ...)
- MutationRepository - write-based operations (create, update, delete, ...)
- CrudRepository (QueryRepository + MutationRepository)
- EntityRepository (CrudRepository + findById, updateById, deleteById, ...)
-
Explore the use of a Mixin for a smart way of sharing the implementation bits from the different repositories (for e.g. how can
HasManyEntityCrudRepositoryinherit the needed CRUD methods from the interfaces mentioned above?). -
tests / docs