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

Missing PropertyEditor for Composite Keys in MVC controllers

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0.0.M2
    • Fix Version/s: None
    • Component/s: WEB MVC
    • Labels:
      None

      Description

      Support was added for composite primary keys a while ago (https://jira.spring.io/browse/ROO-1982) but in order to make a successful request to a controller that takes a composite primary key ID as a parameter, Spring Roo doesn't create the necessary PropertyEditor in order to submit two or more id values in the url.

      So when trying to make a request to a controller like:

      public ResponseEntity<String> CommunityUserController.showJson(@PathVariable("id") CommunityUserPK id) {
              CommunityUser communityUser = communityUserService.findCommunityUser(id);
      

      you get the error:

      2014-08-21 09:32:05,356 [tomcat-http--3] DEBUG org.springframework.beans.BeanUtils- No property editor [community.model.CommunityUserPKEditor] found for type community.model.CommunityUserPK according to 'Editor' suffix convention
      

        Attachments

          Activity

            People

            • Assignee:
              eruiz Enrique Ruiz (DiSiD)
              Reporter:
              chrismarx chris marx
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: