title: Why is criteria query deprecated in Hibernate 5?
body: <p>As we already know, <strong>criterion query</strong> is deprecated in <strong>Hibernate 5</strong>. It was such a useful feature in the previous versions of Hibernate. <em>And it still performs better than HQL.</em> </p>
  
  <p>So what is the reason of it's deprecation in <strong>Hibernate 5</strong> ?</p>
  
  <p>And also this question is not a duplicate of <a href="https://stackoverflow.com/questions/35824417/hibernate-5-and-typed-criteria-queries-jpa2">this question</a> as I want to know the reason of the deprecation of criteria query.</p>
  
  <p>This is from <a href="http://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html#criteria" rel="noreferrer">here.</a></p>
  
  <blockquote>
    <p>Hibernate offers an older, legacy <code>org.hibernate.Criteria</code> API which
    should be considered deprecated. No feature development will target
    those APIs. Eventually, Hibernate-specific criteria features will be
    ported as extensions to the JPA
    <code>javax.persistence.criteria.CriteriaQuery</code>. For details on the
    <code>org.hibernate.Criteria</code> API, see Legacy Hibernate Criteria Queries.</p>
  </blockquote>