|
When selective caching and second level cache is enabled through the JPA persistence.xml, entites that are defined in orm.xml with cacheable="true" attribute are not cached in the second level cache;
Persistence.xml
<shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>
<property name="hibernate.cache.use_second_level_cache" value="true" />
orm.xml
<entity class="org.jboss.test.jpa.CacheableXmlTestCase.model.CustomerXml" cacheable="true"/>
An entity that is annotated with @Cacheable(true) does get cached in the 2lc
Testcase is attached and available at:
https://github.com/johnaoahra80/test_cases/tree/master/JPA/CacheableXmlTestCase
|