Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1638

Provide a dedicated read-only repository interface

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Waiting for Feedback
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Repositories
    • Labels:
      None

      Description

      Whenever a developer needs to create a read only repository, it has to extend the Repository interface and then add all the read methods from CrudRepository to it.

      It would be useful to have a ReadRepository similar to CrudRepository with all the read only methods.

      Optional<T> findById(ID id);
      
      boolean existsById(ID id);
      
      Iterable<T> findAll();
      
      Iterable<T> findAllById(Iterable<ID> ids);
      
      long count();
      

        Attachments

          Activity

            People

            Assignee:
            olivergierke Oliver Drotbohm
            Reporter:
            vitorfec Vitor Carvalho
            Last updater:
            Spring Issues Spring Issues
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: