title: QueryDSL Like operation on Number
body: <p>I have to search a number-field with wildcards. The corresponding JQPL query would be like this:</p>
  
  <pre><code>SELECT e From Entity e where e.personNumber LIKE :numberPattern
  </code></pre>
  
  <p>numberPattern is a String like this: "1??2" and e.personNumber is a Number on the Database (H2).</p>
  
  <p>If i run this with JQPL it's no Problem at all but I can't put it into a queryDSL query.</p>
  
  <p>when I try to</p>
  
  <pre><code>andBuilder.and(entity.personNumber.stringValue().like(numberPattern)
  </code></pre>
  
  <p>I get a </p>
  
  <pre><code>org.apache.openjpa.persistence.ArgumentException: "str (" bei Zeichen 7 gefunden, erwartet wurde jedoch ["(", "+", ...
  </code></pre>
  
  <p>If i try to do it like this:</p>
  
  <pre><code>Constant&lt;String&gt; constant = (Constant&lt;String&gt;) Expressions.constant(personNummer);
  PredicateOperation predicateOperation = new PredicateOperation(Ops.LIKE, entity.personNumber, Expressions.constant(constant));
  </code></pre>
  
  <p>the result will be a </p>
  
  <pre><code>Data conversion error converting "1*"; SQL statement:
  Caused by: java.lang.NumberFormatException: For input string: "1*"
  </code></pre>
  
  <p>So, is there a way to have a like operation on an number field with queryDSL?</p>