title: Select MAX timestamp with JPA2 Criteria API
body: <p>So my entity has:</p>
  
  <pre><code>@Column(name="TS", nullable=false)
  private java.sql.Timestamp timestamp; 
  </code></pre>
  
  <p>My generated MetaModel has:</p>
  
  <pre><code>public static volatile SingularAttribute&lt;MyEntity,Timestamp&gt; timestamp;
  </code></pre>
  
  <p>I want to select by the Max Timestamp value:</p>
  
  <pre><code>Root&lt;MyEntity&gt; root = query.from(MyEntity.class);
  Expression maxExpression = cb.max(root.get(MyEntity_.timestamp));
  </code></pre>
  
  <p>But I am not allowed because:</p>
  
  <blockquote>
    <p><code>max(Expression&lt;N&gt; x)</code>
              Create an aggregate expression applying the numerical max operation.
    <code>&lt;N extends java.lang.Number&gt;</code> Expression</p>
  </blockquote>
  
  <p>Of course <code>Timestamp</code> does not extend <code>Number</code>.  </p>
  
  <p>How can I do a <code>MAX</code> on a <code>Timestamp</code> column using the typesafe Criteria API ?</p>