title: Why Hibernate Criteria Queries and session.getMetadata() are deprecated?
body: <p>In latest relase of Hibernate <code>Criteria cr = session.createCriteria(entityClass)</code> and <code>session.getMetamodel()</code> methods are deprecated. Criteria API was the cleanest querying API, why is it deprecated? <code>getMeatamodel()</code> is also deprecated, so how can I  ManagedType or EmbeddableType from Hibernate session?</p>
  
  <pre><code>ManagedType&lt;T&gt; entityType = entityModel.managedType(entityClass);
  java.util.Set&lt;EmbeddableType&lt;?&gt;&gt; embeddables = entityModel.getEmbeddables();
  </code></pre>