title: Using JPA2 criteria API without Metamodel on a List property
body: <p>How can I formulate the following JPA2 criteria query without using the metamodel classes:</p>
  
  <pre class="lang-java prettyprint-override"><code>CriteriaBuilder cb = em.getCriteriaBuilder();
  CriteriaQuery&lt;Employee&gt; cq = cb.createQuery(Employee.class);
  Root&lt;Employee&gt; emp = cq.from(Employee.class);
  cq.where(cb.isEmpty(emp.get(Employee_.projects)));
  cq.select(emp);
  </code></pre>
  
  <p>I would like to use:</p>
  
  <pre class="lang-java prettyprint-override"><code>cq.where(cb.isEmpty(emp.get("projects")));
  </code></pre>
  
  <p>But I cant figure out how to convert the Path to an Expression, which is needed by cb.isEmpty...</p>
  
  <p>Thanks.</p>