Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-2362

Finders not working in WebScaffold

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 1.1.3.RELEASE
    • Fix Version/s: 1.1.4.RELEASE
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      Just ran the petclinic script with 1.1.3 and saw no sign of the method that actually does call the finder method on the domain object

      This is ok

      @RequestMapping(params =

      { "find=ByNameAndWeight", "form" }

      , method = RequestMethod.GET)
      public String PetController.findPetsByNameAndWeightForm(Model uiModel)

      { return "pets/findPetsByNameAndWeight"; }

      This is missing?

      @RequestMapping(params = "find=ByNameAndWeight", method = RequestMethod.GET)
      public String PetController.findPetsByNameAndWeight(@RequestParam("name") String name, @RequestParam("weight") Float weight, Model uiModel)

      { uiModel.addAttribute("pets", Pet.findPetsByNameAndWeight(name, weight).getResultList()); return "pets/list"; }

      Since this method is missing, spring ends up calling

      @RequestMapping(method = RequestMethod.GET)
      public String PetController.list(@RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, Model uiModel) {

      which calls Pet.findAllPets()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stewarta Alan Stewart
              Reporter:
              wesker316 David
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: