Uploaded image for project: 'Spring Data Commons'
  1. Spring Data Commons
  2. DATACMNS-1743

Translation of URI segments and request parameters into aggregates broken

    XMLWordPrintable

    Details

      Description

      I have a controller class (annotated with @RepositoryRestController) with this method:

      @ResponseBody
       @RequestMapping(method=RequestMethod.GET,value="/domainWords/search/findByDomainSetWithLocale")
       public CollectionModel<EntityModel<DomainWord>> findByDomainSetAndLocale(final @NonNull @RequestParam("domainSet") DomainSet domainSet, final @NonNull @RequestParam("locale") Locale locale)
      

       

      DomainSet's repository is:

      @Repository
      public interface DomainSetRepository extends org.springframework.data.repository.Repository<DomainSet, Long>
      

       

      The test is to request

      /api/domainWords/search/findByDomainSetWithLocale?domainSet=1&locale=es_ES
      

      With Spring Data Neumann RELEASE, that works great.

      With Spring Data Neumann SR1, it fails.

      With Spring Data Neumann SR1 forcing spring-data-commons to version 2.3.0.RELEASE, it fails.

      Therefore, this issue is a regression in spring-data-commons 2.3.1.RELEASE. So the problem is caused somewhere in this commit range: https://github.com/spring-projects/spring-data-commons/compare/2.3.0.RELEASE...2.3.1.RELEASE

       

      When it fails, here's the error:

      Resolved [org.springframework.web.method.annotation.MethodArgumentConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'com.isobar.mindsight.domain.DomainSet'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'com.isobar.mindsight.domain.DomainSet': no matching editors or conversion strategy found]
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              olivergierke Oliver Drotbohm
              Reporter:
              candrews Craig
              Last updater:
              yukihane
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: