title: Override a column of an entity in the select clause with hql without enumarate all columns
body: <p>I would like override a column of an entity in the select clause with hql (not sql!) without enumarate all columns.
  I won't put here my entities, because they are complicated. Instead, I simplify the question by a simple example.</p>
  
  <p>Consider I have a CarEntity:</p>
  
  <pre><code>public CarEntity{
      private Long id;
      private Integer color;
      private Long Date;
      //...
  
      //getters and setters
  }
  </code></pre>
  
  <p>To get all cars, I do the following hql request :</p>
  
  <pre><code>String query = "select c from CarEntity c";
  </code></pre>
  
  <p>Now, I would like replacing the Date value by 0 in the select clause in the hql. <strong>How can I do this?</strong></p>
  
  <p>I know 3 possibilities that do not interest me because my entities have a lot of columns :</p>
  
  <p>1) java (not a good solution):</p>
  
  <pre><code>String hql = "select c from CarEntity c";
  List&lt;CarEntity&gt; list = session.createQuery(hql).list();
  session.close();
  for (CarEntity car: list)
      car.setDate(0);
  </code></pre>
  
  <p>2) sql :</p>
  
  <pre><code>String sql = "select id, 0 as date from car";
  List&lt;CarEntity&gt; list = session.createSQLQuery(sql)
      .addScalar("id",LongType.INSTANCE)
      .addScalar("date",LongType.INSTANCE)
      .setResultTransformer(Transformers.aliasToBean(CarEntity.class))
      .list();
  </code></pre>
  
  <p>3) hql (use of new CarEntity in select clause) :</p>
  
  <pre><code>String hql = "select new CarEntity(c.id,0) from CarEntity c";
  </code></pre>
  
  <p>Of course, in the latest case, I have to add a new suitable constructor in the CarEntity.</p>
  
  <p>Thanks a lot.</p>