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

Missing PropertyEditor for Composite Keys in MVC controllers

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0.0.M2
    • None
    • WEB MVC
    • 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

            eruiz Enrique Ruiz (DiSiD)
            chrismarx chris marx
            Archiver:
            tmarshall Trevor Marshall

            Dates

              Created:
              Updated:
              Archived: