title: Hibernate HQL returns no appropriate constructor
body: <p>I have HQL query</p>
  
  <pre><code>select new PaymentType(o.paymentType.idPaymentType) from Order as o where o.user='1'
  </code></pre>
  
  <p>it throws following exception</p>
  
  <pre><code>org.hibernate.PropertyNotFoundException: no appropriate constructor in class: PaymentType
      at org.hibernate.util.ReflectHelper.getConstructor(ReflectHelper.java:187)
      at org.hibernate.hql.classic.QueryTranslatorImpl.renderSQL(QueryTranslatorImpl.java:631)
      at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:220)
      at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:185)
      at org.hibernate.engine.query.HQLQueryPlan.&lt;init&gt;(HQLQueryPlan.java:77)
      at org.hibernate.engine.query.HQLQueryPlan.&lt;init&gt;(HQLQueryPlan.java:56)
      at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
      at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
      at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
      at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
  </code></pre>
  
  <p>But I have declared required constructor, except of this, there are declared other tree constructors with different count and types of params, and also no params constructor.</p>
  
  <pre><code>public PaymentType(Integer idPaymentType) {
      this.idPaymentType = idPaymentType;
  }
  </code></pre>
  
  <p><strong>Edit:</strong></p>
  
  <pre><code>public class Order  implements java.io.Serializable {
  
  
       private Integer idOrder;
       private PaymentType paymentType;
       private DeliveryType deliveryType;
       ...
  }
  </code></pre>