title: Sub-Query in Spring Data Jpa
body: <p>I have query like this in jpql </p>
  
  <pre><code>select new com.example.CustomGroup(m.id, m.title, (select count(w.id) from MessageGroup x join x.messages w where w.readers.id &lt;&gt; ?1) ) 
  from MessageGroup m join m.members u where u.id = ?1
  </code></pre>
  
  <p>but not work, i know jpa 2 support sub query in select but cant find any refrence to how use it </p>