title: How to check a collection size in JPA2
body: <p>Consider the following:</p>
  
  <pre><code>@Entity
  public class Book 
  { 
      private List&lt;String&gt; authors;
      @ElementCollection
      public List&lt;String&gt; getAuthors() {
          return authors;
      }
  
      public void setAuthors(List&lt;String&gt; authors) {
          this.authors = authors;
      }
  }
  </code></pre>
  
  <p>How to type a JPA2 CriteriaQuery expression which, say, will let me find all the Books which have more than 2 authors?</p>