title: Why don't join queries hit Hibernate second-level cache?
body: <p>I have some confusion regarding Hibernate second-level cache.Of what I have read,Hibernate second-level cache stores only the ids and is beneficial only in case of lookup by id queries.Why does hibernate not use cache in case of a join where the ids of both the tables on which the the join is done is cached?
  I ran a program to test this and found that with the cache enabled the join queries took more time.</p>
  
  <p>Thanks!</p>