title: Postgresql Array Functions with QueryDSL
body: <p>I use the Vlad Mihalcea's library in order to map SQL arrays (Postgresql in my case) to JPA. Then let's imagine I have an Entity, ex.</p>
  
  <pre><code>@TypeDefs(
  {@TypeDef(name = "string-array", typeClass = 
  StringArrayType.class)}
  )
  @Entity
  public class Entity {
      @Type(type = "string-array")
      @Column(columnDefinition = "text[]")
      private String[] tags;
  }
  </code></pre>
  
  <p>The appropriate SQL is:</p>
  
  <pre><code>CREATE TABLE entity (
      tags text[]
  );
  </code></pre>
  
  <p>Using QueryDSL I'd like to fetch rows which tags contains all the given ones. The raw SQL could be:</p>
  
  <pre><code>SELECT * FROM entity WHERE tags @&gt; '{"someTag","anotherTag"}'::text[];
  </code></pre>
  
  <p>(taken from: <a href="https://www.postgresql.org/docs/9.1/static/functions-array.html" rel="nofollow noreferrer">https://www.postgresql.org/docs/9.1/static/functions-array.html</a>)</p>
  
  <p>Is it possible to do it with QueryDSL? Something like the code bellow ?</p>
  
  <pre><code>predicate.and(entity.tags.eqAll(&lt;whatever&gt;));
  </code></pre>