Uploaded image for project: 'Spring Data JPA'
  1. Spring Data JPA
  2. DATAJPA-251

1.2 RC1 documentation has a few errors

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2 RC1
    • Fix Version/s: 1.2 GA
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      Irrelevant

      Description

      • Documentation for JpaSpecificationExecutor talks about
      List<T> readAll(Specification<T> spec);

      when it should be

      List<T> findAll(Specification<T> spec);

      The same is true in various other places in the documentation - I presume a find/replace for readAll/findAll is needed?

      • Query keywords table has a typo of "ngWith" instead of "EndingWith"
      • Query keywords table appears to have StartingWith / EndingWith the wrong way around (StartingWith claims " (parameter bound with prepended %)" which would be wrong?)
      • Section 1.5.1 (Domain class web binding for Spring MVC) code excerpts don't seem to make much sense to me? Specifically:
        • they're presuambly missing key steps - I don't believe that loading a User and then returning a String is going to have the User be populated into the resulting Model? I see that other examples call model.addAttribute, so why not do it here for consistency and to be clear.
        • They contain incorrect pieces of code:
              int page = Integer.parseInt(request.getParameter("page"));
              int pageSize = Integer.parseInt(request.getParameter("pageSize"));
              model.addAttribute("users", userService.getUsers(pageable));
          

          where in this case, the pageable parameter is never declared (though I completely get what the example is trying to show, but only from the code excerpt that follows it)

      • Appendix C.1.1 contains a shortened class name which prevents copy-paste (which I would have liked since it's a debugging aid):
        execution(public * org.sfw.data.jpa.repository.JpaRepository+.*(..))

        Attachments

          Activity

            People

            • Assignee:
              olivergierke Oliver Gierke
              Reporter:
              stevestorey Steve Storey
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: