title: Hibernate second level caching for hibernate.default_entity_mode as "dynamic-map"
body: <p>We are developing web application using <strong>Spring</strong> and <strong>Hibernate</strong>. We want to implement hibernate second level cache mechanism in our application.</p>
  
  <p>As to get data from second level cache we have to use below two API:
  org.hibernate.Session.load(Class theClass, Serializable id);
  org.hibernate.Session.get(Class clazz, Serializable id);</p>
  
  <p>We are using <strong>hibernate.default_entity_mode</strong> as <strong>"dynamic-map"</strong> instead of POJO, so here we don't have POJO classes due to which we are not able to call load() and get() API for second level cache as parameter for this method are entity class name.</p>
  
  <p>So,is there any alternative way to implement second level cache for this type of configuration.</p>
  
  <p>Thanks.  </p>