Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-3050 improve tooling support for Spring Data
  3. STS-3067

Validate parameter types for derived query methods

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0.RELEASE
    • Fix Version/s: 3.2.0.RC1
    • Component/s: DATA
    • Labels:
      None

      Description

      The query method validation should also check the parameter types being suitable to the property expression:

      interface UserRepository extends Repository<User, Long> {
      
        List<User> findByLastname(User user);
      }
      

      This should mark the method as invalid as firstname is probably of type String and not User. A quickfix to adapt the parameter type should be provided.

        Attachments

          Activity

            People

            Assignee:
            thon Terry Denney
            Reporter:
            ogierke Oliver Gierke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: