title: Spring Data: Enumeration and Repository issue
body: <p>I am using Spring Data and Repositories. I created an Entity with a enum type field, which I declared @Enumerated(EnumType.STRING), but I am forced to create a method getAuthority returning a String.</p>
  
  <pre><code>@Entity
  @Configurable
  public class BaseAuthority implements GrantedAuthority {
  
      @Enumerated(EnumType.STRING)
      @Column(unique = true)
      private AuthorityType authority;
  
      @Override
      public String getAuthority() {
          return authority.toString();
      }
  
  }
  </code></pre>
  
  <p>The enum is as follow:</p>
  
  <pre><code>public enum AuthorityType {
  REGISTEREDUSER, ADMINISTRATOR;
  }
  </code></pre>
  
  <p>In the repository for the entity, I created an operation to find by authority type:</p>
  
  <pre><code>@Repository
  public interface BaseAuthorityRepository extends JpaRepository&lt;BaseAuthority, Long&gt; {
  
      BaseAuthority findByAuthority(AuthorityType authority);
  
  }
  </code></pre>
  
  <p>However, I get a warning: </p>
  
  <pre><code>Parameter type (AuthorityType) does not match domain class 
  property definition (String). BaseAuthorityRepository.java
  </code></pre>
  
  <p>I used to have the operation receiving a String rather than AuthorityType, but that generates a runtime exception. 
  I could change the name of the field authority to authorityType, but I don't like that.</p>
  
  <p>Am I doing something wrong? How can I remove the warning?</p>