title: Spring-Data JPA: How to make a jpa criteria query
body: <p>Given this two entities:</p>
  
  <pre><code>post         post_category
    - id         - post_id
    - title      - name
    - text
  </code></pre>
  
  <p>I'd like to make this query using jpa criteria query:</p>
  
  <pre><code>select * from post
  where post.id in (
    select post_id from post_category
    where name = '&lt;category1&gt;' and name = '&lt;category2&gt;' ... and name = '&lt;categoryN&gt;')
  </code></pre>