title: QueryDSL - JPA and collate
body: <p>What is the right way to use COLLATE in this Query.</p>
  <pre><code>JPAQuery&lt;Customer&gt; query = new JPAQuery&lt;&gt;(entityManager);
  query.select(customer).from(customer)
      .where(customer.name.contains(&quot;dummyname&quot;));
  </code></pre>
  <p>I looked up this <a href="https://stackoverflow.com/questions/29634657/collate-hint-on-querydsl-jpa">Answer</a> already but &quot;BooleanTemplate.create(..&quot; doesnt seem to work that way anymore in a newer Version of QueryDSL(4.2.1).
  Also im not sure how to use the addFlag() solution from the answer. I tryed</p>
  <pre><code>query.getMetadata().addFlag(new QueryFlag(Position.END, &quot;COLLATE default&quot;));
  </code></pre>
  <p>But it didnt change anything.</p>