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

Converting an entity to have a compound id still retains the 'show as a long' method in the controller

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.M2
    • Fix Version/s: 1.0.0.RC1
    • Component/s: None
    • Labels:
      None

      Description

      Modifying an entity to so that it contains a compound key:

      @RooEntity(identifierType = UserCalendarPK.class)
      public class UserCalendar {
      
      	@EmbeddedId
      	protected UserCalendarPK userCalendarPk;
      }
      

      Still leaves a method like this in the controller:

      @RequestMapping(value = "/usercalendar/{id}", method = RequestMethod.GET)    
          public String DefaultController.show(@PathVariable("id") Long id, ModelMap modelMap) {    
              if (id == null) throw new IllegalArgumentException("An Identifier is required");        
              modelMap.addAttribute("usercalendar", UserCalendar.findUserCalendar(id));        
              return "usercalendar/show";        
          } 
      

        Attachments

          Activity

            People

            Assignee:
            sschmidt Stefan Schmidt
            Reporter:
            tunaranch Haikal Saadh
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: