title: Mapping result of aggregate query to hibernate object
body: <p>Is it possible to map the result of an aggregate query to a field in a hibernate-backed domain object? </p>
  
  <p>For example: If I have a Car object that looks like the following --</p>
  
  <pre><code>@Entity
  public class Car {
      @Id 
      private int id;
      @Column 
      private String carName;
      private int carCount;
      ---Getters/Setters---
  }
  </code></pre>
  
  <p>I would like the carCount field/property to be the total count of all the cars in my persistence store, is this possible? </p>
  
  <p>I've looked at the Hibernate documentation, I can run the query, but I don't see where I can set that value to the "carCount"</p>
  
  <p>Thanks.</p>