title: Springboot JPA @Query Rest Giving PersistentEntity must not be null
body: <p>I am trying to put together a simple rest service with <code>springboot 1.4.3</code>. I have it up and running with simple queries like <code>findByRecid</code>, however when I try to do a <code>@Query</code> statement on that same entity, I get the below error message</p>
  
  <blockquote>
    <p>{"cause":null,"message":"PersistentEntity must not be null!"}</p>
  </blockquote>
  
  <p>Further, if I use a fully qualified name for the entity in the query, Intellij tells me that the class isn't an entity, even though it's marked with @Entity and works with the standard springboot queries. Please assist if possible - I've been trying to figure this one out for days. Below is the query for your reference </p>
  
  <pre><code>@Query("SELECT new com.test.domain.ReceivableBeans.RecAgeBucketGroupAmountSum(r.agebucket, sum(r.amount)) from com.test.domain.Receivable as r GROUP BY r.agebucket")
      List&lt;com.test.domain.ReceivableBeans.RecAgeBucketGroupAmountSum&gt; recByAgeBucket();
  </code></pre>