title: JPA Criteria selecting a CriteriaBuilder.construct within a Subquery
body: <p>I would like a subquery to return two types in a wrapper object using CriteriaBuilder.construct.</p>
  
  <p>I then want to do a select count distinct on the result of this subquery.</p>
  
  <p>However CriteriaBuilder.construct returns a CompountSelection and while CriteriaQuery has select(Selection) Subquery only has select(Expression).</p>
  
  <p>Can i transform a CompoundSelection into an Expression?</p>