Skip to content

Refine section on fine-tuning repository interfaces in the reference documentation #2757

@odrotbohm

Description

@odrotbohm
Member

The section Fine-tuning Repository Definition of our reference docs should be clarified on why one would rather design their application repositories starting with Repository and not use a more advanced base repository. It makes sense to elaborate on the following concerns:

  • Controlled method exposure – architects might want to avoid exposing methods like findAll() as they're potentially expensive operations on the underlying data store and should not be used unless really necessary (for example, in test cases).
  • Defining other return types for collection methods – the core repository base interfaces declared Iterable as return type for CRUD collection methods. In 3.0 we have introduced additional interfaces that re-declare those methods using List as return type, but crafting a custom repository base interface can achieve that as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @odrotbohm

      Issue actions

        Refine section on fine-tuning repository interfaces in the reference documentation · Issue #2757 · spring-projects/spring-data-commons