title: Delete multiple objects at once using CriteriaBuilder
body: <p>I'm trying to delete a bunch of objects with one query using the <code>CriteriaBuilder</code> API. I'm looking for something like this select:</p>
  
  <pre><code>CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
  CriteriaQuery&lt;T&gt; query = criteriaBuilder.createQuery(entityClass);
  Root&lt;T&gt; root = query.from(entityClass);
  query.select(root).where(/*some condition*/);
  return entityManager.createQuery(query).getResultList();
  </code></pre>
  
  <p>but then a delete instead of a select. As far as I can see, there's no <code>remove</code> or <code>delete</code> method on <code>CriteriaQuery</code>. Is it possible using this API?</p>
  
  <p>I can of course execute the select, then call <code>entityManager.remove(object)</code> for each result, but that feels very inefficient.</p>