title: Hibernate new keyword with distinct
body: <p>I need to take hql that is currently :</p>
  
  <pre><code>select distinct a from Asset as a where ...
  </code></pre>
  
  <p>and change it to</p>
  
  <pre><code>select new com.org.AssetDTO(a.id, a.address, a.status) from Asset as a where ...
  </code></pre>
  
  <p>My problem is with the distinct keyword.  Where does it belong in an hql query where you're using the new Object query type.  One thought was to use a sub-select and have my distinct there.  I've tried adding <code>distinct a.id</code> but that doesn't work.</p>