title: How to use projection interfaces with pagination in Spring Data JPA?
body: <p>I'm trying to get a page of a partial entity (NetworkSimple) using the new feature of spring data, <a href="http://docs.spring.io/spring-data/rest/docs/current/reference/html/#projections-excerpts" rel="noreferrer">projections</a></p>
  
  <p>I've checked the documentation and if I request only:</p>
  
  <pre><code>Collection&lt;NetworkSimple&gt; findAllProjectedBy();
  </code></pre>
  
  <p>It works, but if I'm using pageable:</p>
  
  <pre><code>Page&lt;NetworkSimple&gt; findAllProjectedBy(Pageable pageable);
  </code></pre>
  
  <p>It throws an error:</p>
  
  <pre><code>org.hibernate.jpa.criteria.expression.function.AggregationFunction$COUNT cannot be cast to org.hibernate.jpa.criteria.expression.CompoundSelectionImpl
  </code></pre>
  
  <p>Any one has already work with this ? </p>
  
  <p>My NetworkSimple class is the following:</p>
  
  <pre><code>public interface NetworkSimple {
      Long getId();
  
      String getNetworkName();
  
      Boolean getIsActive();
  }
  </code></pre>