title: Querydsl need to query where integer column is less than value
body: <p>I am having trouble writing a JPAQuery that will execute a simple less than or equal to comparison on an integer column.  I have QCommand generated querydsl object which I am trying to use with a JPAquery to execute this very simple query.  The query I want to execute would look like this using SQL:</p>
  
  <pre><code>select * from command where retry_count &lt;= 10;
  </code></pre>
  
  <p>The generated QCommand object defines the retryCount parameter as:</p>
  
  <pre><code>public final SimplePath&lt;Integer&gt; retryCount = createSimple("retryCount", Integer.class);
  </code></pre>
  
  <p>I have noticed that because it is a SimplePath, when I try to write the JPAQuery, the retryCount variable does not have comparison operators like loe or goe.  That column/variable only allows me to do a isNull, isNotNull, eq, and other very simple operators, but no comparison operators.  This would look like below, however, obviously not execute the comparison I want, but it works without error:</p>
  
  <pre><code>JPAQuery query = new JPAQuery(entityManager);
  query.from(command).where(command.retryCount.isNotNull()).list(command);  
  </code></pre>
  
  <p>In looking around I saw there is a way to create a NumberPath, which seems to be what I want, however, when I attempt the below code I get an exception "java.lang.IllegalArgumentException: Undeclared path 'retryCount'. Add this path as a source to the query to be able to reference it."</p>
  
  <pre><code>JPAQuery query = new JPAQuery(entityManager);
  NumberPath&lt;Integer&gt; retryCount = new NumberPath&lt;Integer&gt;(Integer.class, "retryCount");
  return query.from(command).where(retryCount.loe(10)).list(command);
  </code></pre>
  
  <p>So, how can I "add" this path to the source.  I have looked around and I cannot find an example that does this nor an explanation as to how this is supposed to be done.  The javadocs are not very helpful in this situation.  I had been moving along nicely with querydsl, but this is the first roadblock and I'm stumped on writing one of the most simple queries.  Any assistance or advice would be greatly appreciated.</p>