title: Will Cache Query work on itself? JPA Cache Eclipselink
body: <p>I have a simple question on JPA Cache.
  I created a named query for a persistence unit named "Service" like below:</p>
  
  <pre><code>@NamedQuery(name = DBConstants.ALL_SERVICES, query = "select s from Service s",
              hints = {
                      @QueryHint(name = QueryHints.QUERY_RESULTS_CACHE, value = HintValues.TRUE),
                      @QueryHint(name = QueryHints.QUERY_RESULTS_CACHE_SIZE, value = "200")
              }),
  </code></pre>
  
  <p>The above code lets JPA cache store up-to 200 result entries.
  Now, when I perform a sub-query like <code>"Select s from Service s where s.name='abc'"</code>, what would happen?</p>
  
  <p>Will it run this query on the cached entries OR would it pass it to database to process the query? Thanks for your support.</p>