title: Spring Data JPA "Couldn't find PersistentEntity" for List<String>
body: <p>Having a hard time figuring out if i'm hitting a bug or doing something stupid...</p>
  
  <p>Spring Boot v2.0.0.M7, spring-data-jpa, spring-data-rest, MySQL</p>
  
  <p>The following @Query</p>
  
  <pre><code>@Query("select DISTINCT item.statusCode from Item item")
  public List&lt;String&gt; lookupStatusCodes();
  </code></pre>
  
  <p>on a <code>PagingAndSortingRepository</code> is throwing a </p>
  
  <pre><code>java.lang.IllegalArgumentException: Couldn't find PersistentEntity for type class java.lang.String!
  at org.springframework.data.mapping.context.PersistentEntities.lambda$getRequiredPersistentEntity$2(PersistentEntities.java:78) ~[spring-data-commons-2.0.2.RELEASE.jar:2.0.2.RELEASE]
  at java.util.Optional.orElseThrow(Unknown Source) ~[na:1.8.0_151]
  at org.springframework.data.mapping.context.PersistentEntities.getRequiredPersistentEntity(PersistentEntities.java:77) ~[spring-data-commons-2.0.2.RELEASE.jar:2.0.2.RELEASE]
  at org.springframework.data.rest.webmvc.PersistentEntityResourceAssembler.wrap(PersistentEntityResourceAssembler.java:72) ~[spring-data-rest-webmvc-3.0.2.RELEASE.jar:3.0.2.RELEASE]
  </code></pre>
  
  <p>statusCode is a varchar and <code>Item</code> itself works as expected as an @Entity, but trying to project to a List of Strings (or <code>List&lt;Object&gt;</code>) fails with the above.</p>
  
  <p>If it matters, I intentionally don't want to return a <code>Page&lt;String&gt;</code> here (no need to have paging since the expected resultset is small).</p>