title: Select one column using Spring Data JPA
body: <p>Does anyone have any idea how to get a single column using Spring Data JPA? I created a repository like below in my Spring Boot project, but always get the <code>{"cause":null,"message":"PersistentEntity must not be null!"}</code> error when accessing the Restful URL.</p>
  
  <pre><code>@RepositoryRestResource(collectionResourceRel = "users", path = "users")
  public interface UsersRepository extends CrudRepository&lt;Users, Integer&gt; {
  
      @Query("SELECT u.userName  FROM Users u")
      public List&lt;String&gt; getUserName();
  }
  </code></pre>
  
  <p>Then if I access the Restful URL like <code>../users/search/getUserName</code>, I get the error:
  <code>{"cause":null,"message":"PersistentEntity must not be null!"}</code></p>